reorganize dir

Signed-off-by: Mia Steinkirch <mia.steinkirch@gmail.com>
This commit is contained in:
Mia Steinkirch 2019-10-11 04:29:17 -07:00
parent 1b6f705e7c
commit a8e71c50db
276 changed files with 23954 additions and 0 deletions

View file

@ -0,0 +1,35 @@
#!/usr/bin/env python
__author__ = "bt3"
import socket
def netcat(hostname, port, content):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((hostname, port))
s.sendall(content)
adata = []
while 1:
data = s.recv(1024)
if data == '':
break
adata.append(data)
s.close()
return adata
if __name__ == '__main__':
PORT = 12345
HOSTNAME = '54.209.5.48'
message = netcat(HOSTNAME, PORT, 'Hello!')[1]
print message