Skip to content

Instantly share code, notes, and snippets.

@haxcited
Created July 27, 2019 19:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haxcited/f03a0cfc58a31fc883b86665df2a1e56 to your computer and use it in GitHub Desktop.
Save haxcited/f03a0cfc58a31fc883b86665df2a1e56 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
import socket
HOST = '10.10.10.147'
PORT = 1337
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.connect((HOST, PORT))
s.sendall(b'ls /home/')
data = s.recv(1024)
print('Received', repr(data))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment