subjs fetches javascript files from a list of URLS or subdomains. Analyzing javascript files can help you find undocumented endpoints, secrets, and more.
It's recommended to pair this with gau and then linkfinder. Or even gofuzz.
Examples:
$ cat urls.txt | subjs
$ subjs -i urls.txt
$ cat hosts.txt | gau | subjsTo display the help for the tool use the -h flag:
$ subjs -h
Usage of subjs:
-c int
Number of concurrent workers (default 10)
-i string
Input file containing URLS
-insecure
Skip TLS certificate verification
-t int
Timeout (in seconds) for http client (default 15)
-ua string
User-Agent to send in requests
-ua-strategy string
UserAgent selection strategy (rotation/random/weighted) (default "rotation")
-versionsubjs now supports three UserAgent selection strategies:
rotation(default): Round-robin rotation through UserAgent pool - maintains consistency and is memory efficientrandom: Pure random selection from the comprehensive UserAgent pool - maximum diversityweighted: Weighted random selection based on real-world browser usage statistics - most realistic distribution
Examples:
$ subjs -i urls.txt -ua-strategy random # Random UserAgent for each request
$ subjs -i urls.txt -ua-strategy weighted # Weighted random based on browser popularity
$ subjs -i urls.txt # Default rotation strategyEnhanced Error Handling:
- Comprehensive error types and structured error reporting
- Exponential backoff retry logic with jitter to prevent thundering herd
- Robust URL validation and normalization
- Per-request timeout context
- Proper resource cleanup and graceful shutdown
Improved UserAgent Pool:
- 20+ modern UserAgent strings covering Chrome, Firefox, Safari, Edge
- Support for Windows, macOS, Linux, and mobile platforms
- Includes legacy UserAgents for compatibility testing
git clone https://github.com/geeknik/subjs
cd subjs
go build .
go install
subjs -version
Original author: lc