Valhalla Legends Archive

Programming => Battle.net Bot Development => Battle.net Bot Development References => Topic started by: PaiD on March 12, 2003, 11:25 AM

Title: Web Channel
Post by: PaiD on March 12, 2003, 11:25 AM
How would I make my bot to send the stuff it sees onto the net?
Title: Re: Web Channel
Post by: haZe on March 12, 2003, 11:37 AM
Using WebBot. It can be found here. (http://botdev.valhallalegends.com/webbot/) Everything about it, including how to use it, can be found there.
Title: Re: Web Channel
Post by: PaiD on March 12, 2003, 11:39 AM
I know about webbot. I want to add a feasure in my bot to do what webbot can do
Title: Re: Web Channel
Post by: Yoni on March 12, 2003, 11:46 AM
Use the WebChannel specification which is available somewhere on BotDev (http://botdev.valhallalegends.com). You will need to write a botnet client as well.
Title: Re: Web Channel
Post by: haZe on March 12, 2003, 02:00 PM
http://botdev.valhallalegends.com/documents/WebChannelDoc.txt
Title: Re: Web Channel
Post by: Camel@sk00l on March 13, 2003, 04:45 AM
QuoteI know about webbot. I want to add a feasure in my bot to do what webbot can do
i would start brushing up on PHP and SQL. you can have your bot connect to an sql server, and keep a list of names products pings etc. then write a php script to read the list, and create the html.
Title: Re: Web Channel
Post by: Nova1313 on March 13, 2003, 12:36 PM
or you can do it the makeshift way..

Create something on your bot that can respond to a simple http request on a port. So then you can just feed the data to a page. So for example for my program you connect to http://yourip:2001


http://www.killerpro.com/
runs my old old plugin that does this. It's a very uneffective way but it works if you have a constant connection to the net. The person that runs theirs does not. So it may or may not be up.

then you can define your own protocol of sorts. Although it may not look as nice it certainly does work.

Title: Re: Web Channel
Post by: Camel on March 13, 2003, 01:16 PM
Quoteor you can do it the makeshift way..

Create something on your bot that can respond to a simple http request on a port. So then you can just feed the data to a page. So for example for my program you connect to http://yourip:2001
cool, i didn't think of that
i suppose you have a template too?
Title: Re: Web Channel
Post by: warz on March 15, 2003, 04:37 PM
You are forgetting the bot id.
Title: Re: Web Channel
Post by: UserLoser on March 15, 2003, 04:42 PM
Yes, Spht helped me out with that, thanks anyways
Title: Re: Web Channel
Post by: Assassin~{RC} on March 17, 2003, 12:51 PM
Hmm.. me and Zonker programmed a simple one for {RC} as well. But because we didn't want the channel text broadcasted we kept it simple. Upload done by Dark`Bot evey two minutes to http://www.royal-council.com/Channel.txt, then a server side PHP parser outputs it to http://www.royal-council.com/channel.php
Title: Re:Web Channel
Post by: c0ol on April 11, 2003, 04:56 PM
its easier just to code your own webserver, or an HTTP overload handler for your current web server.
Title: Re:Web Channel
Post by: Skywing on April 11, 2003, 05:50 PM
Quote from: c0ol on April 11, 2003, 04:56 PM
its easier just to code your own webserver, or an HTTP overload handler for your current web server.
Easier to code one which works with bloated, nonstandards-tolerant browsers or easier to code a decent, standards-compliant server?
Title: Re:Web Channel
Post by: tA-Kane on April 12, 2003, 02:58 AM
Quote from: Skywing on April 11, 2003, 05:50 PMEasier to code one which works with bloated, nonstandards-tolerant browsers or easier to code a decent, standards-compliant server?

As long as you have access to the standard(s), and the standards are fairly straightforward (such as the BNLS protocol spec verses the BotNet protocol spec... BNLS protocol spec is nice and clean, whereas the BotNet spec isn't so, as Kp and I have argued about), writing your own standards-compliant code is easy, albeit sometimes time consuming.
Title: Re:Web Channel
Post by: Nova1313 on April 13, 2003, 11:45 AM
my handler for http...

Private Sub Winsock2_DataArrival(Index As Integer, ByVal bytesTotal As Long)
Dim strData As String
Dim strGet As String
Dim s2 As Long
Dim page As String
Winsock2(Index).GetData strData
If Mid(strData, 1, 3) = "GET" Then
strGet = InStr(strData, "GET ")
s2 = InStr(strGet + 5, strData, " ")
page = Trim(Mid(strData, strGet + 5, s2 - (strGet + 4)))
If Right(page, 1) = "/" Then page = Left(page, Len(page) - 1)
On Error Resume Next
Winsock2(Index).SendData createpage(page)
End If
End Sub

then make a function that creates the page and returns it example:
public sub createpage (page as string) as string


that code was pulled right form my Bg3 WebStream

you can feed anything you want then over the connection.

Hope that helps somewhat.
Title: Re:Web Channel
Post by: c0ol on April 14, 2003, 12:24 AM
Quote from: Skywing on April 11, 2003, 05:50 PM
Easier to code one which works with bloated, nonstandards-tolerant browsers or easier to code a decent, standards-compliant server?

i was thinking more of like mod_perl overloaded http requests in apache, i dunno if u can do that kinda stuff in IIS but its cool in apache.
Title: Re:Web Channel
Post by: Skywing on April 14, 2003, 12:03 PM
Quote from: c0ol on April 14, 2003, 12:24 AM
Quote from: Skywing on April 11, 2003, 05:50 PM
Easier to code one which works with bloated, nonstandards-tolerant browsers or easier to code a decent, standards-compliant server?

i was thinking more of like mod_perl overloaded http requests in apache, i dunno if u can do that kinda stuff in IIS but its cool in apache.
Yes, you can via ISAPI DLLs, which is what I did for BinaryChatISAPI (hence the name).  However, this approach requires the end-user to run a full-blown webserver, with all of the potential vulnerabilities and problems this entails.  Web servers of just about any sort (including IIS, Apache, and just about anything else you'd care to name) aren't exactly known for bullet-proof security; given this, is it really wise to expect every user to run one, especially given that many people won't be security experts, or even willing/able to keep up to date on patches?