Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Blade_360 on February 03, 2003, 01:12 PM

Title: Announcements/Updates
Post by: Blade_360 on February 03, 2003, 01:12 PM
::) How do you a vb bot to get announcments from servers like in Raibot or Stealth Bot? Thanks
Title: Re: Announcements/Updates
Post by: Banana fanna fo fanna on February 03, 2003, 01:20 PM
Pull em from a webpage using internet transfer ocx.
Title: Re: Announcements/Updates
Post by: Atom on February 03, 2003, 01:25 PM
Yeah thats the easiest way, but i use a winsock control cuz it makes it one less file to be included with your bot. Heres the code..

Private Sub sckHttp_Connect()
On Error Resume Next
With sckHttp
    .SendData "GET " & "/news.txt" & " HTTP/1.1" & vbCrLf
    .SendData "Accept: text/plain" & vbCrLf
    .SendData "Accept-Language: en-us" & vbCrLf
    .SendData "Accept-Encoding: gzip, deflate" & vbCrLf
    .SendData "User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)" & vbCrLf
    .SendData "Host: " & "www.hostnamehere.com" & vbCrLf
    .SendData "Connection: Keep-Alive" & vbCrLf & vbCrLf
End With
End Sub
Somebody really needs to fix the font size of the code!
Title: Re: Announcements/Updates
Post by: Crypticflare on February 03, 2003, 01:26 PM
that would be the msinet.ocx control right? In my Clan Profile Organizer, I did somthing like that, except I wanted to have more complex, for pulling profiles off of a server, or perhaps a roster for events or activities
Title: Re: Announcements/Updates
Post by: Blade_360 on February 03, 2003, 01:31 PM
k thanks ;D
no kidding about the code font size :o
Title: Re: Announcements/Updates
Post by: iago on February 03, 2003, 03:01 PM
I like Spht's method; he does it over Botnet
Title: Re: Announcements/Updates
Post by: Spht on February 03, 2003, 03:11 PM
QuoteI like Spht's method; he does it over Botnet

Yes, with my method, can post messages to all users using EternalChat at any time. Also, broadcasts that are sent by BNLS are received and displayed by all running EternalChat bots for notifications of server restarting, game updates, etc.
Title: Re: Announcements/Updates
Post by: Banana fanna fo fanna on February 03, 2003, 05:19 PM
Wow, stop making life so hard!

Private Sub sckHttp_Connect()
On Error Resume Next
With sckHttp
  .SendData "GET " & "/news.txt" & " HTTP/1.1" & vbCrLf & vbCrLf
End With
End Sub
Title: Re: Announcements/Updates
Post by: Arta on February 03, 2003, 11:59 PM
QuotePrivate Sub sckHttp_Connect()
On Error Resume Next
With sckHttp
    .SendData "GET " & "/news.txt" & " HTTP/1.1" & vbCrLf
    .SendData "Accept: text/plain" & vbCrLf
    .SendData "Accept-Language: en-us" & vbCrLf
    .SendData "Accept-Encoding: gzip, deflate" & vbCrLf
    .SendData "User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)" & vbCrLf
    .SendData "Host: " & "www.hostnamehere.com" & vbCrLf
    .SendData "Connection: Keep-Alive" & vbCrLf & vbCrLf
End With
End Sub

What on earth is the point in sending all those headers when half of them will be wrong anyway?
Title: Re: Announcements/Updates
Post by: Skywing on February 04, 2003, 03:31 AM
Quotelink=board=bot;num=1044313938;start=0#8 date=02/04/03 at 03:59:22]

What on earth is the point in sending all those headers when half of them will be wrong anyway?
Yes.  Especially accepting compressed data - why would you do that if you don't support compression?
Title: Re: Announcements/Updates
Post by: iago on February 04, 2003, 05:45 AM
I would imagine that he sniffed a http packet and it just imitating it exactly :)
Title: Re: Announcements/Updates
Post by: Skywing on February 04, 2003, 08:04 AM
QuoteWow, stop making life so hard!

Private Sub sckHttp_Connect()
On Error Resume Next
With sckHttp
  .SendData "GET " & "/news.txt" & " HTTP/1.1" & vbCrLf & vbCrLf
End With
End Sub
Yes, I suppose sending completely invalid requests will really make life easier.  A "Host:" header is required for HTTP 1.1, btw.  Suggest you check the protocol specification (http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.6.1.1) first next time :)

Quote     - Both clients and servers MUST support the Host request-header.

      - A client that sends an HTTP/1.1 request MUST send a Host header.

      - Servers MUST report a 400 (Bad Request) error if an HTTP/1.1
        request does not include a Host request-header.
Title: Re: Announcements/Updates
Post by: Blade_360 on February 04, 2003, 01:04 PM
Not to be rude or anything  ;D but we don't all have access to botnet  :-/
Oh and congrats on joining [vL] I'm not really that jealous
Title: Re: Announcements/Updates
Post by: Noodlez on February 04, 2003, 03:28 PM
actually, we do all have the ability to access botnet.
Title: Re: Announcements/Updates
Post by: Blade_360 on February 05, 2003, 11:55 AM
ok then I don't know how to access botnet  ;D
Title: Re: Announcements/Updates
Post by: Banana fanna fo fanna on February 05, 2003, 03:13 PM
Grr i meant http 1.0 lol
Title: Re: Announcements/Updates
Post by: Skywing on February 05, 2003, 04:42 PM
QuoteGrr i meant http 1.0 lol
More and more websites are multihomed now.. is that really a good idea?
Title: Re: Announcements/Updates
Post by: tA-Kane on February 05, 2003, 10:50 PM
You mean, is multihoming a good idea?

It's only not a good idea if you're using a (really) old client, want to access a site on a multihomed server, and the server does not have that particular site as its default (or HTTP 1.0) site.

Other than that, I have a hard time seeing why multihoming could be problematic. But, I have little experience with webservers and browsers, so it may just be my own ignorance.
Title: Re: Announcements/Updates
Post by: Skywing on February 06, 2003, 08:19 AM
QuoteYou mean, is multihoming a good idea?

It's only not a good idea if you're using a (really) old client, want to access a site on a multihomed server, and the server does not have that particular site as its default (or HTTP 1.0) site.

Other than that, I have a hard time seeing why multihoming could be problematic. But, I have little experience with webservers and browsers, so it may just be my own ignorance.
No, I was stating that using HTTP 1.0, which does not support multihomed websites, when more and more sites are becoming multihomed is a bad idea.
Title: Re: Announcements/Updates
Post by: Spht on February 06, 2003, 08:23 AM
Quoteok then I don't know how to access botnet  ;D

What are you having problems with, specifically?
Title: Re: Announcements/Updates
Post by: Blade_360 on February 06, 2003, 03:03 PM
Well I really never learned any of that stuff I knew what it was but I thought it was something that only [vL] members had access to so I didn't even waste my time
Title: Re: Announcements/Updates
Post by: tA-Kane on February 06, 2003, 07:31 PM
Read the BotNet protocol documentation,
http://www.valhallalegends.com/files/BotNetProtocol.txt

The public botnet server is botnet.valhallalegends.com:21845.