About LinkFinder

LinkFinder is a python script written to discover endpoints and their parameters in JavaScript files. This way penetration testers and bug hunters are able to gather new, hidden endpoints on the websites they are testing. Resulting in new testing ground, possibility containing new vulnerabilities. It does so by using jsbeautifier for python in combination with a fairly large regular expression. The regular expressions consists of four small regular expressions. These are responsible for finding:

  • Full URLs (*)
  • Absolute URLs or dotted URLs (/\* or ../*)
  • Relative URLs with at least one slash (text/test.php)
  • Relative URLs without a slash (test.php)

The output is given in HTML or plaintext. @karel_origin has written a Chrome extension for LinkFinder which can be found here.




LinkFinder supports Python 3.

$ git clone
$ cd LinkFinder
$ python install


LinkFinder depends on the argparse and jsbeautifier Python modules. These dependencies can all be installed using pip.

$ pip3 install -r requirements.txt


Short FormLong FormDescription
-i--inputInput a: URL, file or folder. For folders a wildcard can be used (e.g. '/*.js').
-o--output"cli" to print to STDOUT, otherwise where to save the HTML file Default: output.html
-r--regexRegEx for filtering purposes against found endpoints (e.g. ^/api/)
-d--domainToggle to use when analyzing an entire domain. Enumerates over all found JS files.
-b--burpToggle to use when inputting a Burp 'Save selected' file containing multiple JS files
-c--cookiesAdd cookies to the request
-h--helpshow the help message and exit


  • Most basic usage to find endpoints in an online JavaScript file and output the HTML results to results.html:

python -i -o results.html

  • CLI/STDOUT output (doesn't use jsbeautifier, which makes it very fast):

python -i -o cli

  • Analyzing an entire domain and its JS files:

python -i -d

  • Burp input (select in target the files you want to save, right click, Save selected items, feed that file as input):

python -i burpfile -b

  • Enumerating an entire folder for JavaScript files, while looking for endpoints starting with /api/ and finally saving the results to results.html:

python -i 'Desktop/*.js' -r ^/api/ -o results.html


  • Build the Docker image:

    docker build -t linkfinder

  • Run with Docker

    docker run --rm -v $(pwd):/linkfinder/output linkfinder -i -o /linkfinder/output/output.html

    Make sure to use the path /linkfinder/output in your output path, or the output will be lost when the container exits.


  • Require pytest


Final remarks

  • This is the first time I publicly release a tool. Contributions are much appreciated!
  • LinkFinder is published under the MIT License.
  • Thanks to @jackhcable for providing me with feedback.
  • Special thanks @edoverflow for making this project a lot cleaner and awesome.