MCPcopy Index your code
hub / github.com/idank/explainshell / gen_amass_cmd

Function gen_amass_cmd

tools/loadtest.py:72–88  ·  view source on GitHub ↗

amass-enum pipeline (meta-webindexer shape).

(rng: random.Random)

Source from the content-addressed store, hash-verified

70
71
72def gen_amass_cmd(rng: random.Random) -> str:
73 """amass-enum pipeline (meta-webindexer shape)."""
74 c1, c2, c3 = (_pick(CAT_VARIANTS + READ_VARIANTS, rng) for _ in range(3))
75 s1, s2, s3, s4 = (_pick(SORT_VARIANTS, rng) for _ in range(4))
76 a1, a2 = _pick(AWK_VARIANTS, rng), _pick(AWK_VARIANTS, rng)
77 t1 = _pick(TR_VARIANTS, rng)
78 se1, se2, se3 = (_pick(SED_VARIANTS, rng) for _ in range(3))
79 cu1, cu2 = _pick(CUT_VARIANTS, rng), _pick(CUT_VARIANTS, rng)
80 return (
81 f"amass enum -src -ip -active -brute -d navy.mil -o domain ; "
82 f"{c1} domain | {cu1} -d']' -f 2 | {a1} '{{print $1}}' | {s1} -u > hosts-amass.txt ; "
83 f"{c2} domain | {cu2} -d']' -f2 | {a2} '{{print $2}}' | {t1} ',' '\\n' | {s2} -u > ips-amass.txt ; "
84 f"curl -s \"https://crt.sh/?q=%.navy.mil&output=json\" | jq '.[].name_value' | "
85 f"{se1} 's/\\\"//g' | {se2} 's/\\*\\.//g' | {s3} -u > hosts-crtsh.txt ; "
86 f"{se3} 's/$/.navy.mil/' dns-Jhaddix.txt_cleaned > hosts-wordlist.txt ; "
87 f"{c3} hosts-amass.txt hosts-crtsh.txt hosts-wordlist.txt | {s4} -u > hosts-all.txt"
88 )
89
90
91def gen_git_clone_cmd(rng: random.Random) -> str:

Callers

nothing calls this directly

Calls 2

_pickFunction · 0.85
rangeFunction · 0.85

Tested by

no test coverage detected