1
0
mirror of https://github.com/Melon-Bread/EagleJab synced 2024-11-24 20:28:19 -05:00
EagleJab/FalconPunch.py

24 lines
518 B
Python
Raw Normal View History

2015-04-28 22:03:21 -04:00
#!/usr/bin/env python
import os, socket, sys, struct, easygui
2015-04-17 22:20:13 -04:00
statinfo = os.stat(sys.argv[1])
fbiinfo = struct.pack('!q', statinfo.st_size)
p = sys.argv[1]
2015-04-28 22:03:21 -04:00
dsip = easygui.enterbox("Enter 3DS' IP:", "FalconPunch", "192.168.1.1")
2015-04-17 22:20:13 -04:00
file = open(p, "rb")
sock = socket.socket()
sock.connect((dsip, 5000))
sock.send(fbiinfo)
while True:
chunk = file.read(16384)
if not chunk:
2015-04-28 22:03:21 -04:00
easygui.msgbox("Sent " + p + " to the 3DS", "FalconPunch")
2015-04-17 22:20:13 -04:00
break # EOF
sock.sendall(chunk)
sock.close()
sys.exit()