So, I've got a port scanner (masscan), and I want to redirect its output to a certain command-line which is going to check if every resulting IP:Port combination serves a certain web service.
So, it can go like this:
masscan 0.0.0.0/0 -p8080 --max-rate 300000 | ./scanner.py
But this would be slow for huge IP ranges, since scanner.py
is going to process one-by-one.
How can I do this in parallel? i.e redirecting each IP on its own and creating processes that will work in parallel processing the stdin that was redirected to them, thus making the scan faster.
scanner.py
, using process pool or something. – Franklin Yu Feb 9 '17 at 1:04