mIRC Home    About    Download    Register    News    Help

Print Thread
#213162 20/06/09 04:34 AM
Joined: Aug 2007
Posts: 21
A
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Aug 2007
Posts: 21
Hey everyone,

To put it simply, I want to make a somewhat simple bot specific to a community that I'm in. I don't want something massive, complex, and marvelous; I want it to have a few commands and features genuinely useful to the community and its forums.

The main problem I have is that most of what I want this bot to do, requires forum authentification - the "user", or in this case the bot, would need to log in to the forums to access the desired information. This is really the one thing I couldn't figure out from a Google search or a thorough search through these forums.

Now, I haven't done any mIRC Scripting in a really long time, but I'm not completely incompetent! Point me in the right direction, and I'll try my best to learn from there. Also keep in mind I don't have as much free time as I'd like (I still have it, just not as much as I'd like :P).

And before I go any farther, here's some bot I made a real long time ago (probably the last thing I scripted in mSL), so if it's in some way helpful (either to you in assisting me, or to me directly and I just didn't realize it), here you go!
http://zusilu.com/The%20Eleventh%20Hour/UBG%20Bot.txt

Also, regarding that bot, some of the scripts I either got somewhere off the internet, or were provided to me. This includes the Caps Kick script and the [runescape] Clans script (which used sockets and, of course, didn't work).

And finally, I'll try to supply any useful information regarding the actual website and its forums.


Home Page: http://www.tehclan.com/
Forum Index: http://tehclan.com/forum/index.php
Forum Login Page: http://tehclan.com/forum/index.php?act=Login

Despite my limited html know-how (I never really got interested in it), I tried to get the HTML of the login stuff. I don't know how much of it is needed, so I got all of it.
Code:
<tr>
				<td class="row2" valign="top" width="60%">
					<fieldset>
						<legend><b>Log In</b></legend>
						<table class="ipbtable" cellspacing="1">
							<tbody><tr>

<td width="50%"><b>Enter your user name</b></td>
								<td width="50%"><input size="25" maxlength="64" name="UserName" type="text"></td>

							</tr>
							<tr>
								<td width="50%"><b>Enter your password</b></td>
								<td width="50%"><input size="25" name="PassWord" type="password"></td>
							</tr>

						</tbody></table>
					</fieldset>
				</td>
				<td class="row2" valign="top" width="40%">
					<fieldset>
						<legend><b>Options</b></legend>
						<table class="ipbtable" cellspacing="1">
							<tbody><tr>

								<td width="10%"><input class="checkbox" name="CookieDate" value="1" checked="checked" type="checkbox"></td>
								<td width="90%"><b>Remember me?</b><br><span class="desc">This is not recommended for shared computers</span></td>
							</tr>

<tr>
								<td width="10%"><input class="checkbox" name="Privacy" value="1" type="checkbox"></td>
								<td width="90%"><b>Log in as invisible</b><br><span class="desc">Don't add me to the active users list</span></td>
							</tr>

						</tbody></table>
					</fieldset>
				</td>
			</tr>
			<tr>
				<td class="formbuttonrow" colspan="2"><input class="button" name="submit" value="Log me in" type="submit"></td>
			</tr>
			<tr>

				<td class="catend" colspan="2"><!-- no content --></td>
			</tr>


Sniffing the packets as I logged into the forums via Wireshark, on the packet that sent the login information, the "Info" box said this.

Code:
POST /forum/index.php?act=Login&CODE=01 HTTP/1.1  (application/x-www-form-urlencoded)


And the date inside said this (I've converted all the weird things, like "%3A", to the actual symbol). I've changed the username and password in it to USERNAME and PASSWORD respectively, for obvious security reasons.

Code:
referer=http://www.tehclan.com/forum/index.php?act=login&username=USERNAME&password=PASSWORD&cookiedate=1


3 packets later, one labeled "HTTP/1.1 302 Found" appears, including information on setting a cookie; "Set-Cookie: ..." on several lines, one including my Member ID, and one including my "pass hash" (I figure that's my password, but with all their security whatsits applied).

After this, it continued to load the index page.


Since it might also come in handy, here's one of the features I wanted the bot to have. Something similar to Google search, but it would return the first forum search result (one of the threads).

There's a "quick search" box on the page index that pops up when you click the Search link, but this is the "advanced search" page (AKA, the actual search page).

http://tehclan.com/forum/index.php?act=Search


Here's the "Info" on the sniffed packet in question.

Code:
POST /forum/index.php?act=Search&CODE=01 HTTP/1.1  (application/x-www-form-urlencoded)


And the data therein, whereas "TEST" is the search word.

Code:
forums=all&keywords=TEST&x=24&y=11


Also, here was the resulting page link.

http://tehclan.com/forum/index.php?act=Search&CODE=show&searchid=0f90eeea87b0f493feb1ceb8053b7631&search_in=posts&result_type=topics&highlite=%2Btest
Code:
http://tehclan.com/forum/index.php?act=Search&CODE=show&searchid=0f90eeea87b0f493feb1ceb8053b7631&search_in=posts&result_type=topics&highlite=%2Btest


And, at last, the forums are of type IPB (Invision Power Board), version 2.3.6

I really hope I've been as helpful as I can. I am not necessarily requesting a fully written script; I am, rather, looking for whatever help or direction you can give me. Thank you!

Joined: Aug 2007
Posts: 21
A
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Aug 2007
Posts: 21
I think I've found something promising!

http://www.hawkee.com/phpBB2/viewtopic.php?t=10835

I'm going to mess around a bit, see if I can get it working the way I'd like to.


Link Copied to Clipboard