diff --git a/python_cli/sniffle/advdata/constants_generator.py b/python_cli/sniffle/advdata/constants_generator.py index 5a6950a..5cd102c 100755 --- a/python_cli/sniffle/advdata/constants_generator.py +++ b/python_cli/sniffle/advdata/constants_generator.py @@ -67,22 +67,26 @@ def pretty_print_dict(d, key_digits=4): return "\n".join(lines) def main(): + print("Fetching company identifiers") comp_ids_yaml = fetch_assigned_numbers("company_identifiers/company_identifiers.yaml") company_identifiers = {} for c in decode_yaml(comp_ids_yaml)["company_identifiers"]: company_identifiers[c["value"]] = c["name"] + print("Fetching AD types") ad_types_yaml = fetch_assigned_numbers("core/ad_types.yaml") ad_types = {} for t in decode_yaml(ad_types_yaml)["ad_types"]: ad_types[t["value"]] = t["name"] + print("Fetching service UUIDs") service_uuids_yaml = fetch_assigned_numbers("uuids/service_uuids.yaml") service_uuids16 = {} for u in decode_yaml(service_uuids_yaml)["uuids"]: service_uuids16[u["uuid"]] = u["name"] constants_file_path = os.path.join(os.path.dirname(__file__), "constants.py") + print("Writing", constants_file_path) with open(constants_file_path, 'w') as f: f.write("# Auto generated by constants_generator.py\n\n") f.write("company_identifiers = ")