diff --git a/shuffle-tools/1.2.0/api.yaml b/shuffle-tools/1.2.0/api.yaml index 66704dd8..b67bc534 100644 --- a/shuffle-tools/1.2.0/api.yaml +++ b/shuffle-tools/1.2.0/api.yaml @@ -1,7 +1,7 @@ --- app_version: 1.2.0 name: Shuffle Tools -description: A tool app for Shuffle. Gives access to most missing features along with Liquid. +description: A tool app for Shuffle. Gives access to most missing features along with Liquid. tags: - Testing - Shuffle diff --git a/shuffle-tools/1.2.0/src/app.py b/shuffle-tools/1.2.0/src/app.py index 2708309c..5b19f78d 100644 --- a/shuffle-tools/1.2.0/src/app.py +++ b/shuffle-tools/1.2.0/src/app.py @@ -684,8 +684,6 @@ def filter_list(self, input_list, field, check, value, opposite): new_list.append(item) found = True break - else: - print("Nothing matching") if not found: failed_list.append(item) @@ -1533,7 +1531,7 @@ def fix_json(self, json_data): del json_data[key] except Exception as e: - print("[DEBUG] Problem in JSON (fix_json): %s" % e) + pass return json_data @@ -1587,8 +1585,6 @@ def compare_relative_date( ): if timestamp== "None": return False - - print("Converting input date.") if date_format == "autodetect": input_dt = dateutil_parser(timestamp).replace(tzinfo=None) @@ -1632,12 +1628,7 @@ def compare_relative_date( comparison_dt = formatted_dt + delta #comparison_dt = datetime.datetime.utcnow() - print("{} {} {} is {}. Delta: {}".format(offset, units, direction, comparison_dt, delta)) - diff = int((input_dt - comparison_dt).total_seconds()) - print( - "\nDifference between {} and {} is {} seconds ({} days)\n".format(timestamp, comparison_dt, diff, int(diff/86400)) - ) if units == "seconds": diff = diff @@ -1675,19 +1666,6 @@ def compare_relative_date( if direction == "ahead" and diff != 0: result = not (result) - print( - "At {}, is {} {} to {} {} {}? {}. Diff {}".format( - formatted_dt, - timestamp, - equality_test, - offset, - units, - direction, - result, - diff, - ) - ) - parsed_string = "%s %s %s %s" % (equality_test, offset, units, direction) newdiff = diff if newdiff < 0: @@ -1804,11 +1782,8 @@ def check_cache_contains(self, key, value, append): except json.decoder.JSONDecodeError as e: parsedvalue = [str(allvalues["value"])] except Exception as e: - print("Error parsing JSON - overriding: %s" % e) parsedvalue = [str(allvalues["value"])] - print("In ELSE2: '%s'" % parsedvalue) - try: for item in parsedvalue: #return "%s %s" % (item, value) @@ -1835,7 +1810,6 @@ def check_cache_contains(self, key, value, append): # Lol break except Exception as e: - print("Error in check_cache_contains: %s" % e) parsedvalue = [str(parsedvalue)] append = True @@ -1888,7 +1862,6 @@ def check_cache_contains(self, key, value, append): #return allvalues except Exception as e: - print("[ERROR] Failed to handle cache contains: %s" % e) return { "success": False, "key": key, @@ -2197,7 +2170,6 @@ def get_jwt(sa_keyfile, #signer = crypt.RSASigner.from_service_account_file(sa_keyfile) signer = crypt.RSASigner.from_string(sa_keyfile) jwt_token = jwt.encode(signer, payload) - # print(jwt_token.decode('utf-8')) return jwt_token @@ -2435,7 +2407,6 @@ def run_ssh_command(self, host, port, user_name, private_key_file_id, password, except Exception as e: return {"success":"false","message":str(e)} else: - #print("AUTH WITH PASSWORD") try: ssh_client.connect(hostname=host,username=user_name,port=port, password=str(password)) except Exception as e: @@ -2540,14 +2511,10 @@ def _format_result(self, result): for i in val: final_result[key].append(i) elif isinstance(val, dict): - #print(key,":::",val) if key in final_result: if isinstance(val, dict): for k,v in val.items(): - #print("k:",k,"v:",v) val[k].append(v) - #print(val) - #final_result[key].append([i for i in val if len(val) > 0]) else: final_result[key] = val @@ -2560,7 +2527,6 @@ def _with_concurency(self, array_of_strings, ioc_types): # Workers dont matter..? # What can we use instead? - print("Strings:", len(array_of_strings)) workers = 4 with concurrent.futures.ThreadPoolExecutor(max_workers=workers) as executor: @@ -2577,7 +2543,6 @@ def _with_concurency(self, array_of_strings, ioc_types): # Retrieve the results if needed results = [future.result() for future in futures] - #print("Total time taken:", time.perf_counter()-start) return self._format_result(results) # FIXME: Make this good and actually faster than normal @@ -2646,7 +2611,7 @@ def parse_ioc_new(self, input_string, input_type="all"): try: newarray[i]["is_private_ip"] = ipaddress.ip_address(item["data"]).is_private except Exception as e: - print("Error parsing %s: %s" % (item["data"], e)) + pass try: newarray = json.dumps(newarray)