python-masscan is a python library which helps in using masscan port scanner.
$ pip install python-masscan
import masscan
mas = masscan.PortScanner()
mas.scan('192.168.1.1', ports='22,1900', arguments='--max-rate 1000')
print(mas.scan_result)
{
"command_line": "masscan -oJ - 192.168.1.1 -p 80,1900",
"scan": {
"192.168.1.1": [
{
"status": "open",
"reason": "syn-ack",
"ttl": 64,
"port": 1900,
"proto": "tcp"
},
{
"status": "open",
"reason": "syn-ack",
"ttl": 64,
"port": 80,
"proto": "tcp"
}
]
}
}
- [Matt Lebrun](https://github.com/cr8ivecodesmith)
- [Gonçalo Ribeiro](https://github.com/goncalor)
- [Fabian Affolter](https://github.com/fabaff)