Grey Hack – Simple Wi-Fi Auto Hack

In this guide I would like to share the first script that I run after every save reset. It automatically hacks the best wifi network and connects to it. In addition it creates some folders that I usually use for the later scripts.

It is simple enough to understand and to add your own extensions.

Complete Script – Comments Inline

Note: Credit goes to Patriot2k

// Load crypto library
crypto = include_lib("/lib/crypto.so")
// Start Wifi monitoring
crypto.airmon("start", "wlan0")

// Get a l ist of all available WiFi networks
scanResult = get_shell.host_computer.wifi_networks("wlan0")
networks = []
for net in scanResult
	networkEntry = net.split(" ")
	BSSID = networkEntry[0]
	Power = networkEntry[1].remove("%")
	ESSID = networkEntry[2]
        // Push the result into a new map
	networks.push({"BSSID":BSSID,"Power":Power,"ESSID":ESSID})
end for

// Sort the list of WiFi networks and revert it so the best connection comes first
networks.sort("Power")
networks.reverse
bestNetwork = networks.pull

// Start the reply attack until you get 10000 acks
result = crypto.aireplay(bestNetwork.BSSID, bestNetwork.ESSID,10000)
if typeof(result) == "string" then exit(result)

// Crack the encrypted password in the file.cap file
password = crypto.aircrack(home_dir+"/file.cap")
successful = get_shell.host_computer.connect_wifi("wlan0",bestNetwork.BSSID,bestNetwork.ESSID,password)
print("Wifi hacked and connected!")
// These 2 lines will remove the now unnecessary file.cap file
file = get_shell.host_computer.File(home_dir+"/file.cap")
file.delete

// Create some folders for later
get_shell.host_computer.create_folder(home_dir, "Upload")
get_shell.host_computer.create_folder(home_dir, "Victims")
get_shell.host_computer.create_folder(home_dir, "Bounty")
get_shell.host_computer.touch(home_dir,"victims.txt")
Helena Stamatina
About Helena Stamatina 2742 Articles
My first game was Naughty Dog’s Crash Bandicoot (PlayStation) back in 1996. And since then gaming has been my main hobby. I turned my passion for gaming into a job by starting my first geek blog in 2009. When I’m not working on the site, I play mostly on my PlayStation. But I also love outdoor activities and especially skiing.

Be the first to comment

Leave a Reply

Your email address will not be published.


*