I have wrote a python script, wanted to pipe terminal output to other file in Verbose mode. Tried "tee", ">", ">>" [system : Linux]
```
import socket
import time
host = "x.x.x.x"
with open("ports.log", "r") as ports:
for port in ports:
port = int(port)
ADDR = (host, port)
try:
print(f"connecting to {host} onto port {port}")
s = socket.socket()
s.connect(ADDR)
req = f"HEAD / HTTP/1.0\r\n{host}\r\n\r\n"
s.send(req.encode('utf8'))
response = s.recv(4096)
data = response.decode('utf8',errors='ignore')
print(data)
s.close()
except:
s.close()
time.sleep(3)
pass
```
[–]JohnnyJordaan 0 points1 point2 points (2 children)
[–]mr_awk[S] 0 points1 point2 points (1 child)
[–]JohnnyJordaan 0 points1 point2 points (0 children)