Twitter Providing You Your Cracking Wordlist (via 7habitsofhighlyeffectivehackers)

A while ago the ISD podcast talked about a blog-post a guy had made. What this guy did is, he is using twitter to create a wordlist while searching for a keyword. This wordlist can then be very useful for cracking passwords. The script does a query for the latest tweets using your search criteria and uses all the tweets to create a wordlist. The original post can be found at: http://7habitsofhighlyeffectivehackers.blogspot.com.au/2012/05/using-twitter-to-build-password.html

The script is good fun and so easy its a bit funny. Using his idea, I improved his script a little bit allowing you to put in multiple keywords.

#!/bin/bash

for var in "$@"
do
    echo "Searching for $var, saving results in $1.txt"
    wget -q "http://search.twitter.com/search.json?q=$var&rpp;=500"
    cat search.json* | tr "," \n | grep "^"text" | cut -d""" -f4- | tr " " \n | sed s/"//g | sed s/^#//g | sed s/^@//g | grep -v "^http:" | grep -v "\\" >> $1.txt
done

cat $1.txt | sort | uniq > $1.unique.list

echo "Results:"
wc -l ./$1.unique.list

rm -f search.json*
rm -f $1.txt

Definitely check http://7habitsofhighlyeffectivehackers.blogspot.com.au this guy has some pretty cool stuff.

Cheers, Ruben.

Comments