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

22 lines
379 B
Python

import os, socket, sys, struct
statinfo = os.stat(sys.argv[1])
fbiinfo = struct.pack('!q', statinfo.st_size)
p = sys.argv[1]
dsip = raw_input('Enter IP: ')
file = open(p, "rb")
sock = socket.socket()
sock.connect((dsip, 5000))
sock.send(fbiinfo)
while True:
chunk = file.read(16384)
if not chunk:
break # EOF
sock.sendall(chunk)
sock.close()
sys.exit()