staz0t / hashcatch

Capture handshakes of nearby WiFi networks automatically
http://stazot.com/hashcatch
GNU General Public License v3.0
727 stars 84 forks source link

Logical bug? #10

Closed Mi-Al closed 5 years ago

Mi-Al commented 5 years ago

Hello! In the string: cap2hccapx "/tmp/hc_captures/$bssid-01.cap" "/tmp/hc_handshakes/$bssid.hccapx" &> /dev/null the script checks the *-01.cap file permanently. Even if there are new captures, the script will test only the first one. So it makes impossible to catch a handshake if in the first capture it is absent.

So to fix it, we should replace the string with something like: *cap2hccapx "`ls /tmp/hc_captures/$bssid-.cap | tail -n 1`" "/tmp/hc_handshakes/$bssid.hccapx" &> /dev/null**

Or instead to add rm "/tmp/hc_captures/$bssid-01.cap" just after rm "/tmp/hc_handshakes/$bssid.hccapx" &> /dev/null

staz0t commented 5 years ago

Hey, thanks a lot! That was a major bug. I just pushed the fix. Thanks again!