Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import socket
- import time
- import sys
- s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- s.connect(('ocean-labs.de', 34132))
- for command in open('cmds').read().splitlines():
- s.send(command + '\r\n')
- print command
- time.sleep(2)
- try:
- while True:
- sys.stdout.write(s.recv(1))
- except KeyboardInterrupt:
- pass
- s.close()
Advertisement
Add Comment
Please, Sign In to add comment