derv82 / wifite2

Rewrite of the popular wireless network auditor, "wifite"
GNU General Public License v2.0
6.45k stars 1.32k forks source link

Wifite crash for python3 --crack #157

Open RaduNico opened 6 years ago

RaduNico commented 6 years ago
 sudo python3 Wifite.py --crack 
 [+] Listing captured handshakes from /home/radunico/hs:

  NUM  ESSID (truncated)  BSSID              TYPE   DATE CAPTURED
  ---  -----------------  -----------------  -----  -------------------
    1  ShittyNet -snip- PMKID  2018-10-14 14:29:06
 [+] Select handshake(s) to crack (1-1, select multiple with , or - or all): 1

 [!] Error: dictionary changed size during iteration

 [!] Full stack trace below

 [!]    Traceback (most recent call last):
 [!]    File "/home/radunico/sec/wifite/my_wifite2/wifite/__main__.py", line 102, in entry_point
 [!]        wifite.start()
 [!]    File "/home/radunico/sec/wifite/my_wifite2/wifite/__main__.py", line 50, in start
 [!]        CrackHelper.run()
 [!]    File "/home/radunico/sec/wifite/my_wifite2/wifite/util/crack.py", line 64, in run
 [!]        for tool, dependencies in available_tools.items():
 [!]    RuntimeError: dictionary changed size during iteration

 [!] Exiting

Running wifite --crack under python3 while having a missing dependency (aircrack, john, cowpatty, hashcat) will result in this crash error. The issue is utiil/crack.py, a dictionary is created with all the dependecies and if one is missing, the values is popped from the dict. While in python 2 this is not an issue in python 3 it results in a crash.

I will make a fix for this issue tomorrow morning.

kimocoder commented 6 years ago

Great. I suggest these "crashes" should have better output on what's really going on and possibly a solution on the matter. Great find, sure @derv82 return soon.