simple port scan script
Go to file
Michal Szczepanski f4b5e3bd40 doc: update README 2023-03-13 15:51:50 +01:00
.gitignore initial commit 2023-03-13 15:45:55 +01:00
LICENSE Initial commit 2023-03-13 15:33:01 +01:00
README.md doc: update README 2023-03-13 15:51:50 +01:00
port_scan.py initial commit 2023-03-13 15:45:55 +01:00

README.md

port scan

description

simple, configurable and fast socket port scan with text file report

usage

python3 port_scan.py 127.0.0.1,192.168.1.1

results are saved in txt files with ip addresses ex.
127.0.0.1.txt
192.168.1.1.txt

if file exists scan is skipped
ex.

File exists 127.0.0.1.txt skipping

example text file:

complete scan 127.0.0.1 port range 1:65534 test timeouts: [0.5, 1]
send open ports [(3306, b'o\x00\x00\x00\n5.5.5-10.9.4-MariaDB-1:10.9.4+maria~ubu2204\x00\x18\x00\x00\x00[)VX6B-V\x00\xfe\xf7-\x02\x00\xff\x81\x15\x00\x00\x00\x00\x00\x00\x1d\x00\x00\x00L[aXt`aI*5j8\x00mysql_native_password\x00'), (52663, b'\x01\x00\x00\x00')]
recv open ports [3306, 6379, 6942]
send possible ports [(58016, '[Errno 22] Invalid argument')]
recv possible ports []

time to scan ports range 1-65534 max 1.5s spent on port

python3 port_scan.py 127.0.0.1  3.05s user 14.60s system 216% cpu 8.171 total