alterx
alterx copied to clipboard
Expected output is missing
test_subs.txt:
abc.site.com
xyz.site.com
def.ghi.site.com
test.yml:
patterns:
- "{{word}}-{{sub}}.{{suffix}}"
payloads:
word:
- "1"
- "a"
- "ab"
Command:
alterx -l test_subs.txt -ac test.yml | sort
Output:
1-abc.site.com
1-def.ghi.site.com
1-xyz.site.com
ab-def.ghi.site.com
ab-xyz.site.com
a-def.ghi.site.com
a-xyz.site.com
Missing:
a-abc.site.com
ab-abc.site.com
Found the problem in mutator.go:
if !strings.Contains(template, word) {
// skip all words that are already present in template/sub , it is highly unlikely
// we will ever find api-api.example.com
payloadSet[v] = append(payloadSet[v], word)
}
This should probably have a length limit before it applies and maybe a command line option to disable