#780·RustScan

支持如`1-22,661-669,8888`的端口范围输入,适用于 CLI 和库使用

作者: Autumn-27创建于 2025年4月17日更新于 2025年12月25日

Hi, thanks for the great work on RustScan. I’m referring to the previous pull requests #661 and #761. I’d like to reopen the discussion around supporting input like 1-22,661-669,8888 for port ranges. In practice, when using RustScan either via CLI or as a library, it’s quite common to specify ports using a format like 1-22,661-669,8888, especially when scanning common top ports. For example, a typical top 100 or top 1000 port list may include ranges and individual ports like: 21,22,23,25,53,67,68,80,110,111,139,143,161,389,443,445,465,512,513,514,873, 993,995,1080,1000,1352,1433,1521,1723,2049,2181,2375,3306,3389,4848,5000, 5001,5432,5900,5632,5900,5989,6379,6666,7001,7002,8000,8001,8009,8010,8069, 8080,8083,8086,8081,8088,8089,8443,8888,9900,9200,9300,9999,10621,11211, 27017,27018,66,81,457,1100,1241,1434,1944,2301,3128,4000,4001,4002,4100, 5800,5801,5802,6346,6347,30821,1090,1098,1099,4444,11099,47001,47002,10999, 7000-7004,8000-8003,9000-9003,9503,7070,7071,45000,45001,8686,9012,50500, 11111,4786,5555,5556,8880,8983,8383,4990,8500,6066 当此列表包含范围(如 7000-7004)时,目前无法以用户友好的方式直接将其传递给 RustScan。用户必须手动提取和分离这些范围,这对于像 top 1000 这样的大列表来说尤其繁琐。 - 许多常见的端口字典或扫描配置文件使用 1-22,80,443,8080-8090 样式。 - 使用 RustScan 编程时,手动解析和分割这些内容会降低效率并增加代码复杂性。 - 添加对这种格式的支持将大大提高 CLI 用户和使用 RustScan 编译件的开发者的可用性和灵活性。 是否可以原生支持这种范围格式? 谢谢!

内容来源: bee-san/RustScan