License contributions welcome

getJS is a tool to extract all the javascript files from a set of given urls.

The urls can also be piped to getJS, or you can specify a singel url with the -url argument. getJS offers a range of options,

varying from completing the urls, to resolving the files.


Make sure you have GO installed on your system.


getJS is written in GO. You can install it with go get:

go install


Note: When you supply urls from different sources, e.g. with stdin and an input file, it will add all the urls together :)
Example: echo "" | getJS --url --input domains.txt

To get all options, do:

getJS -h
--urlThe url to get the javascript sources fromgetJS --url
--methodThe request method. e.g. POST or GET. Default: "GET"getJS --url --method POST
--timeoutThe request timeout. Default: 10 (secs)getJS --url --timeout 15
--insecureSkip SSL certificate verification. Use when the cert is expired or invalidgetJS --url --insecure
--headerCustom request header(s)getJS --url --header "Authorization: Bearer token"
--inputInput file with urlsgetJS --input domains.txt
--outputThe file where to save the output togetJS --output output.txt
--verboseDisplay info of what is going ongetJS --verbose
--completeComplete the urls. e.g. /js/index.js -> --complete
--resolveResolve the output and filter out the non existing files (Can only be used in combination with --complete)getJS --complete --resolve
--nocolorsDon't color the outputgetJS --nocolors



getJS supports stdin data. To pipe urls to getJS, use the following:

$ cat domains.txt | getJS

To save the js files, you can use:

$ getJS --complete --url | xargs wget

If you would like the output to be in JSON format, you can combine it with @Tomnomnom's toJSON:

$ getJS --url | tojson

To feed urls from a file use:

$ getJS --input domains.txt

To save the results to a file, and don't display anything, use:

$ getJS --url --output results.txt

If you want to have a list of full urls as output use:

$ getJS --url domains.txt -complete

If you want to only show the existing js files, use:

$ getJS --url domains.txt --complete --resolve

Built With

  • GO - GOlanguage
  • Goquery - HTML parser with syntaxes like jquery, in GO


You are free to submit any issues and/or pull requests :)


This project is licensed under the MIT License.


  • @jimen0 for helping getting me started with GO

This is my first tool written in GO. I created it to learn the language more. (useful feeback is always welcome!)