Home

Awesome

goGetJS

License Go Report Card contributions welcome

goGetJS extracts, searches, and saves JavaScript files. Includes an optional chromium headless browser (playwright) for dealing with JavaScript-heavy sites.

demo

Overview

Example Usages (use browser and search each script for a list of terms in search.txt)

go run ./cmd/goGetJS -u https://go.dev -b -terms search.txt
echo https://go.dev | goGetJS -b -terms search.txt

Command-line Options

Usage of goGetJS:
  -b bool
    	Use chromium headless browser (powered by playwright). Default is false.
  -bt int
    	Timeout for headless browser. Default is 10000 ms. Must also activate browser via -b.
  -ew int
    	Playwright considers a page loaded after the network has been idle for at least 500ms. Use this flag (in ms) to add time. 
  -proxy string
    	Proxy to use on requests.
  -redirect bool
    	Allow redirects. Default is false.
  -regex string
    	Parse each script for the supplied regular expression. Any matches will be saved and exported as a json file.
  -rt int
    	Timeout for retries. Default is 1000ms.
  -t int
    	Request timeout (in milliseconds). Default is 5000.
  -term	string
        Parse each script for the supplied word. Any matches will be saved and exported as a json file.
  -terms string
    	Name of .txt file containing a list of search terms (one per line). Any matches will be saved and exported as a json file. 
  -u string
    	URL to extract JS files from.

Installation

First, you'll need to install go.

Then run this command to download + compile goGetJS:

go install github.com/davemolk/goGetJS/cmd/goGetJS@latest

Additional Notes

Changelog

Support

Built With

License