Discovery
List the JavaScript files a page loads
getJS is an open-source Go tool that extracts JavaScript file URLs from web pages, URLs, and HTTP responses, available both as a CLI and as a Go package for pentesters and bug bounty hunters.
installgo install github.com/003random/getJS/v2@latest
commit 04c72bf on Trickest · Go · MIT license
Free plan: 1 user, 3 execution slots, no card.
overview
What getJS does
getJS takes --url or an --input file and lists every JavaScript source the page references. It returns file URLs, not the endpoints or secrets inside the bundles.
Turn on --complete to rewrite relative paths into absolute URLs. Pair it with --resolve to drop references that no longer load. Pass --header for authenticated hosts and --insecure for bad certificates.
Trickest provides getJS as a managed Discovery node after a crawler. Feed its FILE and FOLDER output to linkfinder, golinkfinder, or jsluice when you need routes and secrets from the bundles.
source github.com/003random/getJS · commit 04c72bf on Trickest
image quay.io/trickest/getjs:04c72bf
use cases
getJS use cases
Harvest the JavaScript surface of a target
Point getJS at a URL or host list to list every referenced script file, the starting point for any source-level analysis of a web app.
Build absolute, fetchable JS URLs
Turn on complete to rewrite relative script paths into full URLs, so the next stage can download each bundle without resolving paths by hand.
Filter to JavaScript that loads
Combine complete with resolve to drop dead references and keep only live JS files, cutting noise before you spend time parsing them.
Feed an endpoint and secret extractor
Pass the JS file list to a parser such as linkfinder or jsluice to recover API routes, parameters, and hardcoded secrets from the bundles.
reference
getJS inputs and flags
| Name | Type | Flag | Description |
|---|---|---|---|
| url | STRING | --url | Target URL to extract JavaScript sources from. |
| input-url-file | FILE | --input | Input file of URLs to process, the usual pipeline input. |
| complete-urls | BOOLEAN | --complete | Rewrite relative script paths into absolute URLs. |
| filter-non-existing-files | BOOLEAN | --resolve | Drop references that no longer resolve (requires --complete). |
| custom-request-header | STRING | --header | Custom request header(s), e.g. an Authorization bearer token. |
| request-timeout | STRING | --timeout | Request timeout in seconds (default 10). |
| skip-ssl-verification | BOOLEAN | --insecure | Skip SSL certificate verification for invalid or expired certs. |
| no-color | BOOLEAN | --nocolors | Disable colored output. |
Showing key inputs. getJS exposes 8 inputs in total.
example
getJS command examples
# extract JavaScript files from a list of URLs as absolute, live links
getJS --input urls.txt --complete --resolve --timeout 15https://example.com/static/js/runtime.4f2a91.js
https://example.com/static/js/vendor.8c1de0.js
https://example.com/static/js/main.b7043a.js
https://example.com/assets/analytics.js
https://cdn.example.com/libs/chart.min.js
https://cdn.example.com/libs/datepicker.js
https://app.example.com/_next/static/chunks/framework.js
https://app.example.com/_next/static/chunks/pages/_app.jsguidance
getJS vs alternatives
Use getJS when you need the list of JavaScript files a target loads, not the endpoints inside them. It finds and resolves script URLs; a parser such as linkfinder or jsluice then mines those files for routes and secrets.
| Tool | Pick it when |
|---|---|
| golinkfinder | Extracts endpoints from HTML and JS. getJS lists the JS files; golinkfinder reads what is inside them. |
| linkfinder | Python parser for endpoints in JavaScript. Natural next stage after getJS resolves the file list. |
| jsluice | Pulls URLs, paths, and secrets from JavaScript. Run it on the bundles getJS collects. |
faq
getJS FAQ
related
More Discovery tools
cariddi
Crawl a domain list and scan responses for endpoints, secrets, tokens, and juicy files.
crawlergo
Browser-driven crawler that harvests requests for downstream scanners.
dirsearch
Web path scanner.
feroxbuster
Recursive content discovery with smart defaults and rich response filters.
gittools-dumper-extractor
Download an exposed .git and rebuild the working tree in one pass.
jsluice
Extract URLs, paths, and secrets from JavaScript with a syntax tree.
Run getJS yourself
A URL list feeds getJS, which extracts the JavaScript files each target loads and passes them to linkfinder, which mines the bundles for endpoints saved as a queryable output.
Facts on this page come from the live Trickest tool library.