Skip to content

Instantly share code, notes, and snippets.

@aufzayed
Created October 22, 2021 04:33
Show Gist options
  • Save aufzayed/e28e65fee9b74676a05f8498cbc7438e to your computer and use it in GitHub Desktop.
Save aufzayed/e28e65fee9b74676a05f8498cbc7438e to your computer and use it in GitHub Desktop.
Combine lynx and subjs to find more javascript files
# install lynx: sudo apt install lynx
# lynx -dump: dump the first file to stdout and exit
# awk '/http/{print $2}': print only urls
# grep -E "https://example\.com": print only URLs that belong to example.com
# do not forget to use the URL schema in the grep pattern to avoid subdomains
lynx -dump https://example.com/ | awk '/http/{print $2}' | grep -E 'https://example\.com' | subjs | sort -u
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment