robertdavidgraham / masscan

TCP port scanner, spews SYN packets asynchronously, scanning entire Internet in under 5 minutes.
GNU Affero General Public License v3.0
22.97k stars 3.02k forks source link

Suggestions for automatic adjustment of max-rate #757

Open xxsliberty opened 5 months ago

xxsliberty commented 5 months ago

It would be good if the max-rate could be adjusted automatically, because the rate has a great influence on the accuracy of the result due to different environments. Or there can be a method for calculating this max-rate, which can be used as a reference for users to adjust

mzpqnxow commented 3 weeks ago

It would be good if the max-rate could be adjusted automatically, because the rate has a great influence on the accuracy of the result due to different environments. Or there can be a method for calculating this max-rate, which can be used as a reference for users to adjust

This is best implemented outside of masscan, as a script

Recommended approach:

  1. Scan with very conservative rate, count results
  2. Increase rate, measure results A. Is result count substantially less? Best rate is previous value (or between previous and current) B. Is result count roughly the same? Go to step 2