Advertisement
andmalv

[Script] SaberUltimaConexionDeUnUsuarioEspecificoFacebook

Aug 31st, 2016
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.84 KB | None | 0 0
  1. #! /bin/bash
  2. #
  3.  
  4. rm -f /tmp/cookies.txt
  5.  
  6. USER='' # Usuario o email
  7. PASS='' # Contraseña
  8.  
  9. curl -X GET 'https://www.facebook.com/home.php'  --user-agent 'Firefox/3.5' --cookie '/tmp/cookies.txt' --cookie-jar '/tmp/cookies.txt' --location &>  /dev/null
  10. curl -X POST 'https://login.facebook.com/login.php' --user-agent 'Firefox/3.5' --data-urlencode "email=${USER}" --data-urlencode "pass=${PASS}" --cookie '/tmp/cookies.txt' --cookie-jar '/tmp/cookies.txt' &>  /dev/null
  11. HTML=$( curl -X GET 'https://www.facebook.com/home.php' --verbose --user-agent 'Firefox/3.5' --cookie '/tmp/cookies.txt' --cookie-jar '/tmp/cookies.txt' )
  12.  
  13. ID=''   # ID del usuario a capturar
  14. PosixTime=$( echo $HTML | egrep -io "\"${ID}\":[0-9]+," | cut -d ':' -f 2 | tr -d ',' )
  15.  
  16. clear
  17.  
  18. echo -e "\n\n\t Se conecto $( date -d @${PosixTime} +"el %d/%m/%Y a las %H:%M:%S" ). \n\n"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement