Skip to content

Instantly share code, notes, and snippets.

@m0nkey
Forked from RichardBronosky/mobiletools.sh
Created October 29, 2012 21:24
Show Gist options
  • Save m0nkey/3976636 to your computer and use it in GitHub Desktop.
Save m0nkey/3976636 to your computer and use it in GitHub Desktop.
rbronosky's mobile tools
# available at http://j.mp/rbromotools
# quick use:
## curl -sLO http://j.mp/rbromotools; source rbromotools
## mcurl http://www.palmbeachpost.com
# header only curls
hcurl() { echo "cURLing ${@: -1}"; curl -sL -o /dev/null -D /dev/stdout -b /tmp/cookies.txt -c /tmp/cookies.txt "${@}" | grep -Ei '^(.?$|(HTTP|Server|Set-Cookie|Location)[:/])'; echo; }
# mobile (Android) header only curls
mcurl() { hcurl -A "Mozilla/5.0 (Linux; Android 2.3) AppleWebKit/533.1 (like Gecko) Version/4.0 Mobile Safari/533.1" "${@}"; }
# clone me on github @ https://gist.github.com/2561224
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment