Code:
#include <GUIConstantsEx.au3>
#include <INet.au3>
#include <IE.au3>
#include <String.au3>
#include <Array.au3>
#include <EditConstants.au3>
Opt('MustDeclareVars', 1)
Opt('TrayIconHide',1)
Local $msg, $email, $pass, $connect, $status,$vic,$nr
GUICreate("Facebook Friend Like Spammer by Synthesis <synthesis@rstcenter.com>", 680, 120)
GUICtrlCreateGroup("Login to Facebook",10,5,360,105)
GuiCtrlCreateLabel("Facebook Email",20,25,130,20)
GuiCtrlSetFont(-1,10)
$email = GuiCtrlCreateInput("",160,25,200,18)
GuiCtrlSetFont(-1,8)
GuiCtrlCreateLabel("Facebook Password",20,55,130,20)
GuiCtrlSetFont(-1,10)
$pass = GuiCtrlCreateInput("",160,55,200,18)
GuiCtrlSetFont(-1,8)
GuiCtrlCreateLabel("Number of likes",20,85,130,20)
GuiCtrlSetFont(-1,10)
$nr = GuiCtrlCreateInput("",160,85,50,18,$ES_NUMBER)
GuiCtrlSetFont(-1,8)
$connect = GuiCtrlCreateButton("Connect and Spam", 240,80,120,20)
GUICtrlCreateGroup("Settings",382,5,285,50)
$status = GuiCtrlCreateLabel("Hey " and _GETIP() and"! I'm idle.",395,25,270,20)
GuiCtrlSetFont(-1,10)
GUICtrlCreateGroup("Victim's Facebook profile",382,60, 285,50)
$vic = GuiCtrlCreateInput("",390,80,270,20)
GuiCtrlSetFont(-1,8)
GUISetState()
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $connect
Local $oIE, $oForm1, $oForm2, $oText,$i,$linkr,$j
Local $emr, $pwr, $ss, $victim,$str,$links,$vum,$numar
$emr = guictrlread($email)
$pwr = guictrlread($pass)
$numar = guictrlread($nr)
$victim = guictrlread($vic)
GuiCtrlSEtData($status, "Preparing..")
if $emr == "" or $pwr == "" or $victim == "" Then
GuiCtrlSetData($status, "Full data not provided")
_IEQuit($oIE)
elseif stringinstr($victim,'facebook.com/') == 0 AND stringinstr($victim,"http://m.facebook.co") ==0 AND stringinstr($victim,"http://www.facebook.") == 0 AND stringinstr($victim,"https://facebook.com") == 0 AND stringinstr($victim,"https://m.facebook.c") == 0 AND stringinstr($victim,"https://www.facebook") == 0 Then
GuiCtrlSetData($status, "Invalid victim profile link")
_IEQuit($oIE)
else
$oIE = _IECreate ("http://facebook.com/home.php",0,0)
$ss = _IEBodyReadHTML ($oIE)
if stringinstr($ss,'logout.php') Then
GuiCtrlSetData($status, "Disconnecting from Facebook..")
$oForm1 = _IEFormGetCollection ($oIE,1)
_IEFormSubmit($oForm1)
endif
GuiCtrlSetData($status, "Connecting to Facebook..")
_IENavigate($oIE, "http://m.facebook.com")
$oForm2 = _IEFormGetCollection ($oIE,0)
$oText = _IEFormElementGetObjByName ($oForm2, "email")
_IEFormElementSetValue ($oText, $emr)
$oText = _IEFormElementGetObjByName ($oForm2, "pass")
_IEFormElementSetValue ($oText, $pwr)
_IEFormSubmit($oForm2)
_IELoadWait($oIE)
$ss = _IEBodyReadHTML($oIE)
if stringinstr($ss,"abb acr aps") Then
GuiCtrlSetData($status, "Invalid email and/or password.")
_IEQuit($oIE)
Else
GuiCtrlSetData($status, "Connected to Facebook..")
$str = _stringexplode($victim,'/')
GuiCtrlSetData($status, "Navigating to victim's profile..")
_IENavigate($oIE,"http://m.facebook.com/" and $str[3])
$ss = _IEBodyReadHTML($oIE)
if stringinstr($ss,'abb acr aps') then
GuiCtrlSetData($status, "Invalid friend profile provided.")
_IEQuit($oIE)
elseif stringinstr($ss,'connect.php') then
GuiCtrlSetData($status, "He or she is not your friend.")
_IEQuit($oIE)
else
$j = 0
while stringinstr($ss, 'm_more_item')<>0
$j=$j+1
if $j<=$numar then
$ss = _IEBodyReadHTML($oIE)
$linkr = _StringBetween($ss,'wall.php','"')
$vum = stringreplace($linkr[ubound($linkr)-1],"&","and")
GuiCtrlSetData($status, "Collecting like links..")
$links = _StringBetween($ss,'href="/a/like.php?','"')
GuiCtrlSetData($status, "Starting the flood..")
for $i=0 to ubound($links)-1
$str = 'http://m.facebook.com/a/like.php?' and $links[$i]
$str = stringreplace($str,"&","and")
_IENavigate($oIE,$str)
next
_IENavigate($oIE, "http://m.facebook.com/wall.php" and $vum)
Else
Break(1)
endif
wend
GuiCtrlSetData($status, "All done..")
endif
endif
endif
EndSelect
WEnd
GUIDelete()
Exit