» Site Navigation | | | » Advertisement | | | » Recent Threads | | | | | | | Hey Guiz Today 08:32 PM Today 09:05 PM 5 Replies, 6 Views | | | |  |  | Check: New Member, Current Activity, Last Post |  |
07-23-2009, 06:11 AM
|
#1 (permalink)
| wonoes
Join Date: Sep 2008 Location: In SciTe Posts: 1,304
GPoints: 16,185 Rep Power: 10 | Check: New Member, Current Activity, Last Post Fixed Errors
This script will check for a new member every 5 seconds.
It displays his/her/the spam/advert bot's current activity. If he/she/the spam/advert bot has posted it will display the last post.
This is useful for detecting spam bots. (If they're a bot, they're going to post immediately after registration.)
If it finds a new member it waits 5 seconds and then checks the current activity/last post.
That way it has optimal time to find spam bots.
I was having it check their latest posts in a loop but it runs up profile views. -sweat drop-
Anyway, here's the code. Code: #include <MD5.au3>
#include <URLEncode.au3>
Global $oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc")
Global $NewestMember = ""
Global $oUsername = "Username" ; Set your username
Global $oPassword = "Password" ; Set your password
$oUsername = _URLEncode($oUsername)
$oPassword = StringLower(_MD5($oPassword))
$oHTTP.Open("POST", "http://www.gaminggutter.com/forum/login.php", False)
$oHTTP.SetRequestHeader("User-Agent", "Personoid - Find Them SpamBots")
$oHTTP.SetRequestHeader("Connection", "Close")
$oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")
$oHTTP.Send("vb_login_md5password=" & $oPassword & "&s=&do=login&securitytoken=guest&vb_login_username=" & $oUsername & "&cookieuser=1&vb_login_password=")
If StringInStr($oHTTP.ResponseText, "Thank you for logging in") == 0 Then
MsgBox(0, "Error", "You were not logged in successfully.")
Exit
EndIf
While 1
$CheckNewestMember = _HTTPRequest($oHTTP, "GET", 'http://www.gaminggutter.com/forum/index.php')
$CheckNewestMember = __StringBetween($CheckNewestMember, '<div>Welcome to our newest member, <a href="http://www.gaminggutter.com/forum/', '</a></div>')
$ProfileID = __StringBetween('<Profile>' & $CheckNewestMember, '<Profile>', '">')
$CheckNewestMember = __StringBetween($CheckNewestMember & '</a>', '">', '</a>')
$CheckNewestMember = StringStripWS($CheckNewestMember, 3)
If $NewestMember <> $CheckNewestMember And $CheckNewestMember <> "" Then
$NewestMember = $CheckNewestMember
Sleep(5000)
ActivityAndPost()
EndIf
Sleep(5000)
WEnd
Func ActivityAndPost()
$Profile = _HTTPRequest($oHTTP, "GET", 'http://www.gaminggutter.com/forum/' & $ProfileID)
$CurrentActivity = StringStripWS(__StringBetween($Profile, '<span class="shade">Current Activity:</span>', '</div>'), 4)
If $CurrentActivity == ' <b><center><sub>Registering</sub></center></b> ' Then $CurrentActivity = 'Registering'
If StringInStr($CurrentActivity, "Viewing Index") Then $CurrentActivity = "Viewing Forum Index"
If StringInStr($CurrentActivity, "Viewing Private Message") Then $CurrentActivity = "Viewing Private Message From " & __StringBetween($CurrentActivity, '<b>', '</b>')
If StringInStr($CurrentActivity, "Replying to") Then $CurrentActivity = 'Replying To ' & __StringBetween($CurrentActivity, __StringBetween($CurrentActivity, '" title="', '"') & '">', '</a>')
If StringInStr($CurrentActivity, "Viewing Thread") Then $CurrentActivity = 'Viewing Thread ' & __StringBetween($CurrentActivity, __StringBetween($CurrentActivity, '" title="', '"') & '">', '</a>')
If StringInStr($CurrentActivity, "Modifying Post") Then $CurrentActivity = 'Modifying Post in Thread ' & __StringBetween($CurrentActivity, __StringBetween($CurrentActivity, '" title="', '"') & '">', '</a>')
If StringInStr($CurrentActivity, "Viewing Attachment") Then $CurrentActivity = 'Viewing Attachment ' & __StringBetween($CurrentActivity, __StringBetween($CurrentActivity, '" title="', '"') & '">', '</a>')
If StringInStr($CurrentActivity, "downloads") Then $CurrentActivity = 'Downloading Files'
If StringInStr($CurrentActivity, "Viewing Forum") Then $CurrentActivity = 'Downloading Files'
If StringInStr($CurrentActivity, "Viewing Announcement") Then $CurrentActivity = 'Viewing Announcement ' & __StringBetween($CurrentActivity, '">', '</a>')
$LastPost = __StringBetween($Profile, '<span class="shade">Total Posts:</span> ', '</li>')
If $LastPost <> "0" Then
$LastPost = _HTTPRequest($oHTTP, "GET", 'http://www.gaminggutter.com/forum/search.php?do=finduser&u=' & $ProfileID)
If StringInStr($LastPost, "Sorry - no matches. Please try some different terms. ") == 0 Then
$LastPost = StringReplace(__StringBetween($LastPost, '<div class="alt2" style="margin:6px 0px 6px 0px; padding:6px; border:2px groove"> <div class="smallfont"><em> ', '</em></div> '), '<br />', "") & '</LastPost>'
$LastPost = StringStripWS(__StringBetween($LastPost, '</a>', '</LastPost>'), 3)
If StringStripWS($LastPost, 4) <> "" Then
MsgBox(0, "Member Info", "Username : " & $CheckNewestMember & @CRLF & "Current Activity : " & $CurrentActivity & @CRLF & @CRLF & "Last Post : " & $LastPost)
Else
MsgBox(0, "New Member", "Username : " & $CheckNewestMember & @CRLF & "Current Activity : " & $CurrentActivity & @CRLF)
EndIf
EndIf
Else
MsgBox(0, "New Member", "Username : " & $CheckNewestMember & @CRLF & "Current Activity : " & $CurrentActivity & @CRLF)
EndIf
EndFunc ;==>ActivityAndPost
Func _HTTPRequest($oHTTP, $oMethod, $oURL, $oData = "")
$oHTTP.Open($oMethod, $oURL, False)
If $oMethod = "POST" Then $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")
$oHTTP.Send($oData)
Return $oHTTP.ResponseText
EndFunc ;==>_HTTPRequest
Func __StringBetween($s, $from, $to)
$x = StringInStr($s, $from) + StringLen($from)
$y = StringInStr(StringTrimLeft($s, $x), $to)
Return StringMid($s, $x, $y)
EndFunc ;==>__StringBetween
Func MyErrFunc()
ConsoleWrite("Error" & @CRLF)
EndFunc ;==>MyErrFunc
__________________ Quote: |
Originally Posted by Cake Quote: |
Originally Posted by Fork is it hot in here or is it just me? | no that's personoid |
Last edited by Personoid xX; 07-25-2009 at 10:23 AM..
| |
| | | The Following User Says Thank You to Personoid xX For This Useful Post: | |
07-23-2009, 07:54 AM
|
#2 (permalink)
| Banned
Join Date: Feb 2008 Posts: 2,646
GPoints: 1,628 Rep Power: 0 | THATS MA BOY | |
| | | The Following User Says Thank You to Checker For This Useful Post: | |
07-25-2009, 10:24 AM
|
#3 (permalink)
| wonoes
Join Date: Sep 2008 Location: In SciTe Posts: 1,304
GPoints: 16,185 Rep Power: 10 | I've updated it to filter the results a bit better. Will continue to update as i find other possible activities.
Edit: Fixed. 4srs.
Edit again:
olol, i haxed programming.
Found alternative to arrays.
This should never crash from internal error. Ever.
I got rid of the arrays and i have an error handler.
Also, Fixed the last post display. Completely.
It's now completely functional.
Edit: Removed blank username error.
__________________ Quote: |
Originally Posted by Cake Quote: |
Originally Posted by Fork is it hot in here or is it just me? | no that's personoid |
Last edited by Personoid xX; 07-25-2009 at 10:24 AM..
Reason: Update
| |
| |  | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | |