-
-
Save carlosmcevilly/4384324 to your computer and use it in GitHub Desktop.
fetch a URL using wget and sending Firefox as the user agent, with an optional referer URL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export url="$1" | |
export referer="$2" | |
export uagent='Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11'; | |
if [[ "$referer" == '' ]]; then | |
wget --user-agent="$uagent" "$url" | |
else | |
wget --user-agent="$uagent" --referer "$referer" "$url" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I thought this was referring to using firefox cookies with wget. I was looking for some examples on reading the moz_cookies sqlite table and found this.