loading
loading
Discovery
A tool to extract all the JavaScript files from a set of given URLs.
overview
getJS takes a single URL or a file of URLs and pulls out every JavaScript source the page references. Modern web apps push routing, API calls, and feature flags into bundled script, so the script tags on a page are often the richest map of what an application does. getJS gives you that list of JS files as a flat, scriptable artifact.
The tool can rewrite relative paths into absolute URLs with the complete option, turning a fragment like /js/app.js into https://example.com/js/app.js so downstream stages can fetch each file directly. Pair complete with resolve and getJS will also drop the script references that no longer exist, leaving only files you can retrieve. Custom headers let you reach JS behind authentication, and the insecure flag handles hosts with expired or self-signed certificates.
On Trickest, getJS is a Discovery node that writes a file and a folder of results. Run it after a crawler or URL collector to harvest the JavaScript surface of a discovered scope, then feed its output to an endpoint or secret extractor that parses the bundles themselves.
source github.com/003random/getJS
use cases
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.
Turn on complete to rewrite relative script paths into full URLs, so the next stage can download each bundle without resolving paths by hand.
Combine complete with resolve to drop dead references and keep only live JS files, cutting noise before you spend time parsing them.
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
| 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
# extract JavaScript files from a list of URLs as absolute, live linksgetJS --input urls.txt --complete --resolve --timeout 15https://example.com/static/js/runtime.4f2a91.jshttps://example.com/static/js/vendor.8c1de0.jshttps://example.com/static/js/main.b7043a.jshttps://example.com/assets/analytics.jshttps://cdn.example.com/libs/chart.min.jshttps://cdn.example.com/libs/datepicker.jshttps://app.example.com/_next/static/chunks/framework.jshttps://app.example.com/_next/static/chunks/pages/_app.jsguidance
Reach for getJS when you need the list of JavaScript files a target loads, not the endpoints inside them. It finds and resolves the script URLs; a parser like linkfinder or jsluice then mines those files for routes and secrets.
Extracts endpoints from HTML and JS directly. getJS lists the JS files; golinkfinder reads what is inside them.
Python parser that pulls endpoints out of JavaScript. A natural next stage after getJS resolves the file list.
Extracts URLs, paths, and secrets from JavaScript. Run it on the bundles getJS collects.
faq
related
Check whether a URL redirects to a masked 404 page.
Append lines to a file only if they are not already there.
Extract URLs and endpoints from Android APK files.
Visual inspection of websites across a large number of hosts.
Find suspicious files across a large set of AWS S3 buckets.
An automated tool that checks for backup artifacts that may disclose a web application's source code.
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.