Skip to content

Instantly share code, notes, and snippets.

@felmoltor
Created June 1, 2015 18:38
Show Gist options
  • Select an option

  • Save felmoltor/10eb3e6aaab352666e95 to your computer and use it in GitHub Desktop.

Select an option

Save felmoltor/10eb3e6aaab352666e95 to your computer and use it in GitHub Desktop.
AFF nicks find in facebook and twitter
#!/bin/bash
if [[ $1 == "" ]];then
echo "Provide a file with the usernames"
exit
fi
if [[ $2 == "" ]];then
echo "Provide a file with the facebook cookie"
exit
fi
ufile=$1
fbcookie=$2
for uname in `cat $ufile`
do
code=$(curl -A "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120427 Firefox/15.0a1" -I -s -b "$(cat $fbcookie)" https://www.facebook.com/$uname | grep "HTTP/1.1" | cut -f2 -d' ')
if [[ $code == 200 ]];then
echo "$uname: found"
fi
done
#!/bin/bash
if [[ $1 == "" ]];then
echo "Provide a file with the usernames"
exit
fi
ufile=$1
for uname in `cat $ufile`
do
code=$(curl -I -s https://twitter.com/$uname | grep "HTTP/1.1" | cut -f2 -d' ')
if [[ $code == 200 ]];then
echo "$uname: found"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment