Skip to content

Instantly share code, notes, and snippets.

@yelkhatib
Last active August 18, 2023 17:07
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save yelkhatib/5403183 to your computer and use it in GitHub Desktop.
Save yelkhatib/5403183 to your computer and use it in GitHub Desktop.
Get a list of unique resource domains from a HAR file. Uses jq to parse the HAR file.P.S. You could create HAR files using a number of tools, such as PhantomJS, hdrgrab or chrome-HAR-capturer.
#list unique resource domains
jq '.log.entries[].request | {method,url}' $1 | jq 'if .method=="GET" then .url else "" end' | grep -Eo "http(s?)://([^/]+)./" | sort | uniq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment