Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- #
- # Sample use, runs 100 curls at a time, downloading range 1 to 2 million
- # for chunk in $(seq 100 199); do ./smeg $chunk &; done
- chunk="$1"
- touch ${chunk}0000.hostnames
- (for s in $(seq ${chunk}0000 ${chunk}9999); do
- echo $s >&2
- echo "ateam-site: $s"
- if [ -e "site.$s" ]; then
- cat "site.$s"
- else
- curl -s -H "X-Requested-With: XMLHttpRequest" -H "X-Xhrsource: posterous" -X GET -H "Cookie: _sharebymail_session_id=e55e807375f457efa9a22e091c0685c7; email=bugmenot%40trash-mail.com; _plogin=Veritas; logged_in_before=true" http://posterous.com/api/2/sites/$s
- fi
- done) | perl -ne '$|=1; if (/ateam-site: (\d+)/) { $site=$1 } if (/"full_hostname":"([^"]+)"/) { print "$site\t$1\n"; }' >> ${chunk}0000.hostnames
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement