Allow output file to exist
jullle3 opened this issue · 5 comments
jullle3 commented
When running dnstwist with
permutations = dnstwist.run(
domain=domain,
registered=True,
format='list',
dictionary=f'{ROOT_DIR}/lib/dictionaries/english.dict',
tld=f'{ROOT_DIR}/lib/dictionaries/abused_tlds.dict',
output='/dev/null',
)
it spams stdout with all permutations, and since its also returned as a list (which is all i need), i fix it by redirecting output to /dev/null
, however this fails since dnstwist doesn't allow output files to exist before runs. This can be fixed by opening the file with mode w
instead of x
elceef commented
Just pass format='null'
argument and skip output='/dev/null'
to mute the output.
jullle3 commented
@elceef WIth format='null'
it makes DNS requests. I want it to only perform permutations. Is there another solution?
elceef commented
I assumed you want to scan for registered domains since you're passing argument registered=True
.
Pull the latest code. Writing to os.devnull
should be now allowed.
jullle3 commented
Thanks. Will test later