bp0lr / dmut

A tool to perform permutations, mutations and alteration of subdomains in golang.
MIT License
156 stars 31 forks source link

Threads #15

Open jaikishantulswani opened 3 years ago

jaikishantulswani commented 3 years ago

@bp0lr Trying to generate long list of domains on a system with 32G ram but it crashes fatal error: runtime: out of memory can you add a flag to control the threads. I am only generating list cat mydomains.txt | ./dmut -d list.txt --save-gen

bp0lr commented 3 years ago

hi!

yes, I'm aware of that. the jobs list is 100% generated in memory, so if you are working with a big permutation list that can literally eat all your memory.

I have plans to fix this using a file. I hope have some free time soon to be able to do it.

jaikishantulswani commented 3 years ago

@bp0lr thank you for your prompt response on this, any workaround just for the time.

bp0lr commented 3 years ago

you can do some bash magic, and split your list.txt into multi parts. that is the best approach for now.

jaikishantulswani commented 3 years ago

@bp0lr Indeed but I am looking for something to change into the main.go initially just for now to lower the process / threads / workers or memory usage.

bp0lr commented 3 years ago

the problem isn't related to workers. The main permutation list generated from the domain + dictionary list is created in memory. when you have a big domain list or dictionary list that list could be huge.

if you want to fix the problem from the code base, you need to change the generation chain to use a file to store the results and then load them into memory.

jaikishantulswani commented 3 years ago

@bp0lr It would also great if you add a flag like dnsgen to have Min length of custom words extracted from domains. so it mutate domains like:

domains

new-old.example.com

words

space

Dmut Mutation

new-oldspace.example.com
spacenew-old.example.com
space.new-old.example.com
new-old.space.example.com
new-old-space.example.com
space-new-old.example.com

New Mutations Like

new.example.com
new-new.example.com
new-new-old.example.com
new.new-old.example.com
newnew-old.example.com
new-old-new.example.com
new-old.new.example.com
new-oldnew.example.com
new-old-new-old.example.com
new-old.new-old.example.com
new-oldnew-old.example.com
new-old-old.example.com
new-old.old.example.com
new-oldold.example.com
new-old-space.example.com
new-old.space.example.com
new-oldspace.example.com
new-space.example.com
old.example.com
old-new-old.example.com
old.new-old.example.com
oldnew-old.example.com
old-old.example.com
space.example.com
space-new-old.example.com
space.new-old.example.com
spacenew-old.example.com
space-old.example.com

Thanks