• Welcome to Valhalla Legends Archive.
 

Please read this

Started by pianka, June 29, 2003, 01:07 PM

Previous topic - Next topic

pianka

You're probably all going to get pissed at me, because I know that I've asked this twice before, and hundreds of other people ask it constantly. But anyways, I need help with the proxy support on my bot, I was looking at Feanor[vA]'s sourcecode to his winbot, and though it was commented out, it had proxy support. I don't know exactly how this is supposed to work, but this is what my bot does when I hit connect.

If it's supposed to use a proxy, it connects to the proxy instead of the BNET, and upon connected sends this:

With clsBuf
                 .InsertBYTE &H1
                 .InsertBytes "17 E0 3F F0 CA 8B 61 6E 6F 6E 79 6D 6F 75 00"
                 .SendProxyPacket &H4
End With

And then exits the sub, if the proxy is valid, it says that it connected, but then it freezes
Here's what I have for the ParsePacket cases:

       Case &H5A
           AddChat "PROXY: Request Granted", vbGreen
               With clsBuf
                   .InsertBYTE &H4
                   .InsertBYTE &H1
                   .InsertNTString "6112"
                   .InsertNTString varServer
                   .InsertNTString ""
                   .SendPacket &H4
               End With
               
       Case &H5B
           AddChat "PROXY: Request Rejected Or Failed...", vbRed
           
       Case &H5C
           AddChat "PROXY: Request Rejected Because SOCKS server cannot IDENT on the client...", vbRed
           
       Case &H5D
           AddChat "SOCKS: Request Rejected Because the Client Program and the ID Report Different User-IDs...", vbRed

What am I doing wrong??? This is probably pissing you off, but I just can't figure it out, I've been trying it for the alst like 8 hours...

Dark-Feanor

Well first off, there are only two people that have my winbot source. Me and Rhine and I am sure that I did not give it to you  :-\ . Anyway, I will still help, because I dont care. MY Proxy support is a work in progress that recently I have been to lazy to finish. I know that in the script you have right there, I was using the wrong sub for incomming data, so you might want to look that over, because the problem lies in there. What I have been doing is packet logging a ZDS and comparing my non working packets to those of a zds with working SOCK4 proxy support.
- Feanor[xL]
clan exile
Firebot
iago: "caps lock is like cruise control for cool"

pianka


Dark-Feanor

Sckbnet_DataArrival()

Fool around with it. I was parsing the response incorrectly.
- Feanor[xL]
clan exile
Firebot
iago: "caps lock is like cruise control for cool"

pianka

Quote from: DaRk-FeAnOr on June 29, 2003, 01:31 PM
I was parsing the response incorrectly.
I'm not getting a response..., and I'm not using your bot, just the commented out part with the proxy send/recieve stuff.

pianka

And about you parsing the response, I don't see anything wrong from the parsing aspect, but I don't know if there needs to be something different if it's coming from the proxy server instead of directly from BNET...

Camel

Quote from: PiaNKA on June 29, 2003, 01:07 PM
               With clsBuf
                   .InsertBYTE &H4
                   .InsertBYTE &H1
                   .InsertNTString "6112"
                   .InsertNTString varServer
                   .InsertNTString ""
                   .SendPacket &H4
               End With

shouldn't that be [ .InsertWORD 6112 ] and [ .InsertDWORD inet_ntoa(varServer) ] ?

tA-Kane

If it's a standard SOCKS4 server, you are correct; the IP and port are stored as binary, not strings.
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com

UserLoser

#8

Splt = Split(Server(Index), ".")
      For i = 0 To UBound(Splt)
          str = str & Chr(CStr(Splt(i)))
      Next i
      sckBnet(Index).SendData Chr(&H4) & Chr(&H1) & Chr(&H17) & Chr(&HE0) & str & "anonymous" & Chr(&H0)


0x17 + 0xE0 would be the port, you could just change 6112 into a WORD and I'm almost sure that's what you would get.  I figured this out from packet logging ZDS bots.  There are other ways to do it, but I find this way to be the easiest for me.

Also 'warz', I did do all that on my own, I had people help me packet log... It's quite simple to do something like that.  For one thing, Feanor here helped me packet log a ladder game [IIRC].