x90skysn3k / brutespray

Bruteforcing from various scanner output - Automatically attempts default creds on found services.
MIT License
1.96k stars 381 forks source link

tmp and output dirs #10

Closed r3dlight closed 6 years ago

r3dlight commented 6 years ago

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.

jrobles-r7 commented 6 years ago

Thanks for the feedback. The changes are completed. Closing.

r3dlight commented 6 years ago

Great thank you.

r3dlight commented 6 years ago

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