Skip to content

HailBytes/asm-scope-parser

Repository files navigation

@hailbytes/asm-scope-parser

Parses and normalizes attack surface scope definitions: IP ranges, CIDR, domains, wildcards, and exclusions. Framework-agnostic, zero-dependency.

npm version npm downloads License: MIT Bundle Size


What it does

Parse and normalize attack surface scope definitions from any source — bug bounty programs, penetration test briefs, ASM platforms. Handles IPv4/IPv6, CIDR ranges, domain wildcards, and exclusion rules. Zero dependencies.


Install

npm install @hailbytes/asm-scope-parser

Quick Start

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

Who Is This For

Pentesters, bug bounty hunters, and ASM platform engineers who need a reliable, framework-agnostic way to parse and validate scope definitions from diverse sources.


See Also


Part of the HailBytes open-source security toolkit.

About

Parses and normalizes attack surface scope definitions: IP ranges, CIDR, domains, wildcards, and exclusions. Framework-agnostic, zero-dependency.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors