tmp and output dirs
Closed this issue · 3 comments
Hi Shane,
I'm working on packaging your script for debian/ubuntu and of course kali. The package is done but your script does some things which will lead to unexpected results (e.g. it will basically perform the equivalent of rm tmp/*
on each startup, which is something quite unexpected). As it should be installed in /usr/bin/brutespray, it is not possible to do so. Moreover, if 2 different users are using your script at the same time, it is going to remove tmp/* which is not what we want.
Instead, you should import tempfile and create a dynamic tmp dir for example :
try:
tmppath = tempfile.mkdtemp(prefix="brutespray-tmp")
except:
print "\nError while creating brutespray temp directory."
(see https://docs.python.org/2/library/tempfile.html)
Could you also update your shebang with : "/usr/bin/python" instead of "/usr/bin/env python2" ?
Another point is your output directory. This path should be an argument.
If you want me to, I can provide a merge-request to your script, let me know.
Thank you,
Regards.
Thanks for the feedback.
The changes are completed.
Closing.
Great thank you.
Hi,
FYI brutespray has just been pushed on debian unstable, it will be on kali soon if no bug.
https://ftp-master.debian.org/new/brutespray_1.5.2-1.html