This repository has been archived on 2022-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
Luma3DS-3GX/ninjhax/tools/client.py

23 lines
329 B
Python

#!/usr/bin/python
import socket
import sys
if len(sys.argv) < 3:
print "python client.py <ip> <file>\n"
sys.exit(0)
port = 80
host = sys.argv[1]
pfile = sys.argv[2]
f = open(pfile, "rb")
buf = f.read()
f.close()
s = socket.socket()
s.connect((host, port))
sent = s.send(buf)
print "Sent %d bytes\n" % sent
s.close()