mirror of
https://github.com/autistic-symposium/sec-pentesting-toolkit.git
synced 2025-05-02 23:05:11 -04:00
some small fixes
This commit is contained in:
parent
ab70b811db
commit
a50737bc6b
63 changed files with 8 additions and 19 deletions
|
@ -0,0 +1,41 @@
|
|||
import utils
|
||||
import socket
|
||||
|
||||
import time
|
||||
import sys
|
||||
|
||||
|
||||
def interact(conn, addr):
|
||||
command = ''
|
||||
print "Received", addr
|
||||
|
||||
while (command != 'exit'):
|
||||
command = raw_input('> ')
|
||||
conn.send(command + '\n')
|
||||
time.sleep(.5)
|
||||
data = conn.recv(0x10000)
|
||||
if not data:
|
||||
print "Disconnected", addr
|
||||
return
|
||||
print data.strip(),
|
||||
else:
|
||||
print "Disconnected", addr
|
||||
|
||||
|
||||
HOST = ''
|
||||
|
||||
PORT = 6969
|
||||
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
|
||||
s.bind((HOST, PORT))
|
||||
|
||||
s.listen(1)
|
||||
|
||||
while 1:
|
||||
conn, addr = s.accept()
|
||||
interact(conn, addr)
|
||||
|
||||
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue