Execute port-scans through a SOCKS proxy.
- Python => 3.5
- PySocks => 1.6.8
From within your virtual environment, execute
pip install -r requirements.txt to install the dependencies. Then you can use
python sockscan.py to run the tool.
usage: sockscan.py [-h] [-H HOST] [-P PORT] [-4] [-s SCAN] [-c COUNT] [-v] target Execute a TCP port scan through a SOCKS proxy. positional arguments: target the target of the port scan optional arguments: -h, --help show this help message and exit -H HOST, --host HOST proxy host (default: localhost) -P PORT, --port PORT proxy port (default: 1080) -4, --socks4 use SOCKS4 instead of SOCKS5 -s SCAN, --scan SCAN list of ports to scan (see below) -c COUNT, --count COUNT max scan processes (see below) -v, --verbose provide verbose output By default, SockScan will scan ports 21-23, 25, 53, 80, 110, 143, 443, 3380 and 8080. To scan specific ports, you can use the -s flag as follows: -s A scan all 65,535 ports (this will take a LONG time) -s 80 scan only port 80 -s 22,80 scan ports 22 and 80 -s 21-23 scan all ports between 21 and 23, inclusive (21, 22, 23) -s 21-23,80 scan all ports between 21 and 23 and port 80 As you can see, it is possible to specify ports individually or by range, or any combination thereof. Scanning the full range of 65,535 ports will take a very long time, especially considering the latency added by scanning through a proxy. SockScan uses multiprocessing to speed up the port scan. However, in some cases this is undesirable, as it may create erratic results and excessive noise. If you wish to throttle process count, you can use the -c flag to specify how many processes you wish to allow. For example: -c 1 run in single-threaded mode, scanning one port at a time -c 4 scan four ports at a time By default, SockScan uses processes equal to twice the number of CPU cores less one. So if you've got eight cores, it will start fifteen processes.