From 32d0671421c441810fef223f9eba6f46d37b4d47 Mon Sep 17 00:00:00 2001 From: fukusuket <41001169+fukusuket@users.noreply.github.com> Date: Fri, 14 Jul 2023 00:56:21 +0900 Subject: [PATCH 1/2] fix: [doc] fix LAUNCH.sh typo --- doc/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/README.md b/doc/README.md index d6b707e8..aee47955 100644 --- a/doc/README.md +++ b/doc/README.md @@ -89,12 +89,12 @@ Available Importers: 5. Launch ail-framework, pystemon and PystemonImporter.py (all within the virtual environment): - Option 1 (recommended): ``` - ./ail-framework/bin/LAUNCH.py -l #starts ail-framework - ./ail-framework/bin/LAUNCH.py -f #starts pystemon and the PystemonImporter.py + ./ail-framework/bin/LAUNCH.sh -l #starts ail-framework + ./ail-framework/bin/LAUNCH.sh -f #starts pystemon and the PystemonImporter.py ``` - Option 2 (may require two terminal windows): ``` - ./ail-framework/bin/LAUNCH.py -l #starts ail-framework + ./ail-framework/bin/LAUNCH.sh -l #starts ail-framework ./pystemon/pystemon.py ./ail-framework/bin/importer/PystemonImporter.py ``` From 22dff19004ff0410aba59315562b6f1457503085 Mon Sep 17 00:00:00 2001 From: fukusuket <41001169+fukusuket@users.noreply.github.com> Date: Fri, 14 Jul 2023 18:28:34 +0900 Subject: [PATCH 2/2] fix: [domain search] returns an empty string when searched with invalid characters --- bin/lib/objects/Domains.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/lib/objects/Domains.py b/bin/lib/objects/Domains.py index ede2cbea..dc216617 100755 --- a/bin/lib/objects/Domains.py +++ b/bin/lib/objects/Domains.py @@ -595,21 +595,22 @@ def get_domains_up_by_filers(domain_types, date_from=None, date_to=None, tags=[] return None def sanitize_domain_name_to_search(name_to_search, domain_type): + if not name_to_search: + return "" if domain_type == 'onion': r_name = r'[a-z0-9\.]+' else: r_name = r'[a-zA-Z0-9-_\.]+' # invalid domain name if not re.fullmatch(r_name, name_to_search): - res = re.match(r_name, name_to_search) - return {'search': name_to_search, 'error': res.string.replace( res[0], '')} + return "" return name_to_search.replace('.', '\.') def search_domain_by_name(name_to_search, domain_types, r_pos=False): domains = {} for domain_type in domain_types: r_name = sanitize_domain_name_to_search(name_to_search, domain_type) - if not name_to_search or isinstance(r_name, dict): + if not r_name: break r_name = re.compile(r_name) for domain in get_domains_up_by_type(domain_type):