Saturday, September 22, 2007

pclinface




#!/bin/bash
username="your_email"
password="password"

if [[ ( $# -gt 1 ) && ( ( "$1" = "wall" ) || ( "$1" = "cmd" ) ) ]]
then
wget -O /tmp/pclinfacelogin --user-agent="Mozilla/MozVer (Platform; Security; SubPlatform; Language; rv:Revision[; Extension]*) Gecko/GeckVer [Product/ProdVer]" --save-cookies=/tmp/pclinfacecookies --load-cookies=/tmp/pclinfacecookies --keep-session-cookies --post-data="email=${username}&pass=${password}" https://login.facebook.com/login.php

case "$1" in
"wall")
shift
wget -O /tmp/pclinfacewall --user-agent="Mozilla/MozVer (Platform; Security; SubPlatform; Language; rv:Revision[; Extension]*) Gecko/GeckVer [Product/ProdVer]" --save-cookies=/tmp/pclinfacecookies --load-cookies=/tmp/pclinfacecookies --keep-session-cookies --post-data="post_form_id=4bef82826c71b2d394d9013e43628399&id=4951817788&wall_text=${@}" http://www.facebook.com/wallpost.php;;

"cmd")
shift
wget -O /tmp/pclinfacecmd --user-agent="Mozilla/MozVer (Platform; Security; SubPlatform; Language; rv:Revision[; Extension]*) Gecko/GeckVer [Product/ProdVer]" --save-cookies=/tmp/pclinfacecookies --load-cookies=/tmp/pclinfacecookies --keep-session-cookies --post-data="post_form_id=4bef82826c71b2d394d9013e43628399&body=${@}" "http://www.facebook.com/edittopic.php?&action=4&uid=4951817788&topic=3100&post=&reply_to=" ;;
*)echo "Usage: `basename $0` wall|cmd data";;
esac
else
echo "Usage: `basename $0` wall|cmd data"
shift
echo "$@"
fi

2 comments:

Anonymous said...

did you ever get this working ? I have been unable to get wget past the login screen at all, using any of a dozen methods.

dashrike/hotmail.com

HaLku said...

It works, but only after changing the User Agent.