mirror of
https://github.com/Melon-Bread/EagleJab
synced 2024-11-24 20:28:19 -05:00
22 lines
379 B
Python
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()
|