# Scripthunter | Tool To Find JavaScript Files On Websites

**URL:** <https://onehack.st/t/scripthunter-tool-to-find-javascript-files-on-websites/164192>\
**Category:** Tools & Scripts\
**Tags:** programming, freebies\
**Created:** [November 28, 2020, 12:16pm UTC](https://onehack.st/t/scripthunter-tool-to-find-javascript-files-on-websites/164192 "2020-11-28T12:16:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prometheus](https://onehack.st/user_avatar/onehack.st/prometheus/32/34950_2.png) [@Prometheus](https://onehack.st/u/Prometheus)\
**Post date:** [November 28, 2020, 12:16pm UTC](https://onehack.st/t/scripthunter-tool-to-find-javascript-files-on-websites/164192/1 "2020-11-28T12:16:06Z")

</div>

![image](https://onehack.st/uploads/default/original/3X/b/c/bc808b48a3d4c113ffda44a395e91241a0cb977b.png)

[\*]

Scripthunter is a tool that finds javascript files for a given website. To scan Google, simply run `./scripthunter.sh https://google.com`. Note that it may take a while, which is why scripthunter also implements a notification mechanism to inform you when a scan is finished via Telegram API. [Blogpost](https://blog.r0b.re/hacking/pentesting/bugbounty/recon/web/js/2020/06/30/scripthunter-automated-js-discovery.html)

**Setup**

To install scripthunter, clone this repository. Scripthunter relies on a couple of tools to be installed so make sure you have them:

- [gau](https://github.com/lc/gau)
- [ffuf](https://github.com/ffuf/ffuf)
- hakrawler
- [httpx](https://github.com/projectdiscovery/httpx)
- [unfurl](https://github.com/tomnomnom/unfurl)

please make sure that as most of these tools are written in Go, that you have Go installed and configured properly. Make sure that when you type any of the above commands in the terminal, they are recognized and work.

Furthermore, scripthunter uses Telegram to send you a notification once a scan is finished. To enable this feature, you need to create a Telegram Bot and paste your Bot API key and chatid in the scripthunter script. You can follow [this](https://blog.r0b.re/automation/bash/2020/06/30/setup-telegram-notifications-for-your-shell.html) guide to get these values.

![image](https://onehack.st/uploads/default/original/3X/e/7/e7c37c7721f41ae33e1a7e820e8e8ce092aa3e1d.png)

**Features**

- Extract public javascript files from website using Gau and Hakrawler
- Parse directories containing js files from found public files
- Scan js directories for hidden js files using ffuf and a custom wordlist
- check all found files for connectivity
- notify user once scans are finished
- aggregate all seen js filenames into one global wordlist

**Example**

I ran this on some random verizon subdomain:

```auto
âžœ scripthunter-dev ./scripthunter.sh https://developer.verizonmedia.com/ _ ____  _____ ________(_)__ / /_/ / _______ / / ________ (_-</ __/__ / / _ / __/ _ / // / _ /__ / -_) __//___ / __/_/ /_/ .__ / __/_//_/_,_/_//_/__ /__/_/ /_/ by @r0bre[*] Running GAU[+] GAU found 7 scripts![*] Running hakrawler[+] HAKRAWLER found 5 scripts![*] Found 2 directories containing .js files.[*] Running FFUF on https://developer.verizonmedia.com/./[+] FFUF found 0 scripts in https://developer.verizonmedia.com/./ ![*] Running FFUF on https://developer.verizonmedia.com/assets/[+] FFUF found 0 scripts in https://developer.verizonmedia.com/assets/ ![*] Running FFUF on https://developer.verizonmedia.com/assets/js /[+] FFUF found 0 scripts in https://developer.verizonmedia.com/assets/js/ ![*] Running FFUF on https://developer.verizonmedia.com/js/[+] FFUF found 0 scripts in https://developer.verizonmedia.com/js/ ![*] Running FFUF on https://developer.verizonmedia.com/static/[+] FFUF found 0 scripts in https://developer.verizonmedia.com/static/ ![*] Running FFUF on https://developer.verizonmedia.com/static/js/[+] FFUF found 7 scripts in https://developer.verizonmedia.com/static/js/ ![*] Running FFUF on https://developer.verizonmedia.com/static/js/vendor/[+] FFUF found 3 scripts in https://developer.verizonmedia.com/static/js/vendor/ ![+] Checking Script Responsiveness of 13 scripts..https://developer.verizonmedia.com/static/js/vendor/js-cookie.jshttps://developer.verizonmedia.com/static/js/jquery-3.3.1.min.jshttps://developer.verizonmedia.com/static/js/autotrack.jshttps://developer.verizonmedia.com/st atic/js/utils.jshttps://developer.verizonmedia.com/static/js/navigation.jshttps://developer.verizonmedia.com/static/js/vendor/rapidworker-1.2.jshttps://developer.verizonmedia.com/static/js/vmdn.jshttps://developer.verizonmedia.com/static/js/right-nav.js[+] All Done![+] Found total of 13 (8 responsive) scripts!

```

If you like this tool, consider following me on Twitter [@r0bre](https://twitter.com/r0bre)!

## GitHub:

> **[GitHub - robre/scripthunter: Tool to find JavaScript files on Websites](https://github.com/robre/scripthunter)**
>
> Tool to find JavaScript files on Websites
