HailBytes/asm-scope-parser

GitHub: HailBytes/asm-scope-parser

这是一个零依赖的JavaScript库,用于解析和规范化攻击面范围定义,解决从多样化来源提取和验证目标范围的问题。

Stars: 1 | Forks: 0

# @hailbytes/asm-scope-parser ![npm](https://img.shields.io/npm/dt/@hailbytes/asm-scope-parser) [![npm 版本](https://img.shields.io/npm/v/%40hailbytes%2Fasm-scope-parser.svg)](https://www.npmjs.com/package/%40hailbytes%2Fasm-scope-parser) [![npm 下载量](https://img.shields.io/npm/dw/%40hailbytes%2Fasm-scope-parser.svg)](https://www.npmjs.com/package/@hailbytes/asm-scope-parser) [![许可证:MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) [![包大小](https://img.shields.io/bundlephobia/minzip/%40hailbytes%2Fasm-scope-parser)](https://bundlephobia.com/package/@hailbytes/asm-scope-parser) ## 功能介绍 从任何来源(漏洞赏金计划、渗透测试摘要、ASM 平台)解析和规范化攻击面范围定义。支持处理 IPv4/IPv6、CIDR 范围、域名通配符和排除规则。零依赖。 ## 安装 ``` npm install @hailbytes/asm-scope-parser ``` ## 快速入门 ``` import { parseScope } from '@hailbytes/asm-scope-parser'; // 1. Parse a mixed scope definition const scope = parseScope([ '10.0.0.0/8', '*.example.com', '!192.168.1.0/24', // exclusion ]); // 2. Check membership scope.includes('10.1.2.3'); // true scope.includes('192.168.1.5'); // false (excluded) scope.excludes('192.168.1.5'); // true // 3. Export scope.toCIDR(); // string[] of all CIDR ranges scope.toJSON(); // NormalizedScope object ``` ## 适用人群 渗透测试人员、漏洞赏金猎人和 ASM 平台工程师,他们需要一种可靠、框架无关的方式来解析和验证来自不同来源的范围定义。 ## 相关链接 - [`@hailbytes/sbom-diff`](https://github.com/HailBytes/sbom-diff) — 比较 CycloneDX/SPDX SBOM 的差异 - [`@hailbytes/phishing-template-linter`](https://github.com/HailBytes/phishing-template-linter) — 检查 GoPhish 电子邮件模板 - [HailBytes 平台](https://hailbytes.com) *[HailBytes](https://hailbytes.com) 开源安全工具套件的一部分。*
标签:ASM工具, CIDR范围处理, IP地址解析, JavaScript库, MITM代理, Node.js包, npm模块, SYN扫描, 代码生成, 域名解析, 排除规则处理, 攻击面解析器, 数据可视化, 暗色界面, 框架无关, 测试工具, 渗透测试工具, 漏洞赏金工具, 网络安全, 自动化攻击, 范围定义工具, 范围标准化, 通配符匹配, 隐私保护, 零依赖