Go Back   Gaming Gutter > Non-Gaming > Programming > Source Code


Source Code - Have a source code/project files you want to post? Do so here.

» Site Navigation
» Home
» FAQ
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Advertisement
» GG Stuff

Follow us on Twitter!

Get the GG toolbar today (for firefox only)
» Recent Threads
Go to first new post MY KNEE AND MOUTH
Today 07:16 PM
Last post by FlameSpiritZenon
Today 09:11 PM
11 Replies, 12 Views
Go to first new post i r god i kome in peese...
Today 08:45 AM
by Sxc
Last post by tealeaf
Today 09:10 PM
8 Replies, 50 Views
Go to first new post u guise r meen
Today 08:24 PM
by Sxc
Last post by Husky
Today 09:08 PM
19 Replies, 20 Views
Go to first new post Hey Guiz
Today 08:32 PM
by Coby
Last post by Husky
Today 09:05 PM
5 Replies, 6 Views
Go to first new post Hey hey now! PotW...
Today 04:34 PM
Last post by tealeaf
Today 09:04 PM
5 Replies, 18 Views
Reply
 
LinkBack Thread Tools Display Modes

 Check: New Member, Current Activity, Last Post
Old 07-23-2009, 06:11 AM   #1 (permalink)
wonoes

Male Personoid xX is offline
 
Personoid xX's Avatar
 
Join Date: Sep 2008
Location: In SciTe
Posts: 1,304
GPoints: 16,185
iTrader: 0 / 0%
Personoid xX Is a Lord of AwesomenessPersonoid xX Is a Lord of AwesomenessPersonoid xX Is a Lord of AwesomenessPersonoid xX Is a Lord of Awesomeness
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
Attached Files
File Type: zip GG Member Monitor.zip (2.1 KB, 8 views)
__________________





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..
  Reply With Quote
The Following User Says Thank You to Personoid xX For This Useful Post:
Checker (07-23-2009)

 
Old 07-23-2009, 07:54 AM   #2 (permalink)
Banned

Male Checker is offline
 
Join Date: Feb 2008
Posts: 2,646
GPoints: 1,628
iTrader: 8 / 100%
Checker - Total CelebrityChecker - Total CelebrityChecker - Total CelebrityChecker - Total CelebrityChecker - Total CelebrityChecker - Total Celebrity
Rep Power: 0
THATS MA BOY
  Reply With Quote
The Following User Says Thank You to Checker For This Useful Post:
Personoid xX (07-23-2009)

 
Old 07-25-2009, 10:24 AM   #3 (permalink)
wonoes

Male Personoid xX is offline
 
Personoid xX's Avatar
 
Join Date: Sep 2008
Location: In SciTe
Posts: 1,304
GPoints: 16,185
iTrader: 0 / 0%
Personoid xX Is a Lord of AwesomenessPersonoid xX Is a Lord of AwesomenessPersonoid xX Is a Lord of AwesomenessPersonoid xX Is a Lord of Awesomeness
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
  Reply With Quote
Reply

Bookmarks



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Powered by vBadvanced CMPS v3.1.0

All times are GMT -7. The time now is 09:13 PM.


vBulletin skin developed by: eXtremepixels
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The contents of this webpage are copyright © 2006-2008 GamingGutter.com. All Rights Reserved.

Page generated in 0.11540389 seconds (100.00% PHP - 0% MySQL) with 22 queries