x90skysn3k / brutespray

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

Python 3 - NameError: name 'args' is not defined #46

Closed jasperf closed 3 years ago

jasperf commented 3 years ago

Set things up on macOS Catalina and have Medusa running as well as nmap. But now on using the following command ./brutespray.py -f test.xml -U /Users/jasper/medusa/sample/usernames.txt -P /Users/jasper/medusa/sample/1000000-password-seclists.txt --threads 5 --hosts 5

I get

Brute-Forcing...
Process Process-1:
Process Process-2:
Traceback (most recent call last):
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/jasper/brutespray/brutespray.py", line 245, in brute
    if args.userlist is None and args.username is None:
NameError: name 'args' is not defined
Traceback (most recent call last):
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/jasper/brutespray/brutespray.py", line 245, in brute
    if args.userlist is None and args.username is None:
NameError: name 'args' is not defined

I do have Python 2 and three installed

brew list --formula | grep python
python@2.7.17
python@3.8
python@3.9

but currently run 2:

python --version
Python 2.7.17

Seems there is an issue here with loading the proper one.. Any ideas?

jasperf commented 3 years ago

Hmm or the list I am using from https://github.com/duyet/bruteforce-database called usernames.text is not set up properly for Brutespray? The example user file at https://github.com/x90skysn3k/brutespray/blob/master/wordlist/smbnt/user is no different in setup compared to the one at the Bruteforce database repo https://github.com/duyet/bruteforce-database/blob/master/usernames.txt though it seems..

jasperf commented 3 years ago

Seems to have been discussed at https://github.com/x90skysn3k/brutespray/issues/44 already.