Toggle Navigation
Hatchery
Eggs
suckless_flash
run.py
Users
Badges
Login
Register
MCH2022 badge?
go to mch2022.badge.team
run.py
raw
Content
from __future__ import print_function import sys, time dev=open("/dev/ttyACM0", "w") print(chr(0x03), end="", file=dev) print("f=open(\""+sys.argv[1]+"\", \"w\")\r", file=dev) f=open(sys.argv[1], "rb") b=f.read(50) while b != "": time.sleep(0.1) print("f.write("+repr(b)+")\r", file=dev) b=f.read(50) f.close() print("f.close()\r", file=dev) # run flashed program. experimental #print("import "+sys.argv[1][:-3]+"\r", file=dev) #print(chr(0x04), end="", file=dev) dev.close()