aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2012-12-21 14:47:53 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2012-12-21 14:47:53 +0100
commit4da28f201207ad00a0c72d8f7b3939059c553238 (patch)
treee6319df682506ac7df3edd540f66cd093dc72c5b
parentDon't show anything if length is zero. (diff)
downloadWEPAutoCrack-4da28f201207ad00a0c72d8f7b3939059c553238.tar.xz
WEPAutoCrack-4da28f201207ad00a0c72d8f7b3939059c553238.zip
Reset module to work around driver bugs.
-rwxr-xr-xautocrack.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/autocrack.py b/autocrack.py
index fd41cbd..024accd 100755
--- a/autocrack.py
+++ b/autocrack.py
@@ -30,6 +30,7 @@ import sys
import subprocess
import os
import signal
+import time
def pwn(interface, network):
print "[+] Shutting down services"
@@ -50,6 +51,15 @@ def pwn(interface, network):
print "[+] Restoring wifi card"
os.system("ifconfig %s down" % interface)
os.system("macchanger -m %s %s" % (realMac, interface))
+
+ # BEGIN CHANGE OR REMOVE ME
+ print "[+] Resetting module to work around driver bugs"
+ os.system("rmmod iwldvm")
+ os.system("rmmod iwlwifi")
+ os.system("modprobe iwlwifi")
+ time.sleep(2)
+ # END CHANGE OR REMOVE ME
+
os.system("iwconfig %s mode managed" % interface)
os.system("ifconfig %s up" % interface)