MCPcopy Create free account
hub / github.com/OWASP/APTS / get_domain_dirs

Function get_domain_dirs

scripts/export_requirements.py:64–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62SOURCE = "OWASP Autonomous Penetration Testing Standard"
63
64def get_domain_dirs():
65 domain_dirs = {}
66 if not os.path.exists(STANDARD_DIR):
67 return domain_dirs
68
69 for item in os.listdir(STANDARD_DIR):
70 if os.path.isdir(os.path.join(STANDARD_DIR, item)):
71 match = re.match(r'^\d+_(.*)$', item)
72 if match:
73 domain_name = match.group(1).replace('_', ' ')
74 domain_dirs[item] = domain_name
75
76 # Sort by the numeric prefix
77 return dict(sorted(domain_dirs.items(), key=lambda x: int(x[0].split('_')[0])))
78
79
80def export_all():

Callers 1

export_allFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected