Author | Message | Time |
---|---|---|
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: [code] With clsBuf .InsertBYTE &H1 .InsertBytes "17 E0 3F F0 CA 8B 61 6E 6F 6E 79 6D 6F 75 00" .SendProxyPacket &H4 End With [/code] 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: [code] 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 [/code] 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... | June 29, 2003, 6:07 PM |
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. | June 29, 2003, 6:27 PM |
PiaNKA | Which sub??? | June 29, 2003, 6:30 PM |
DaRk-FeAnOr | Sckbnet_DataArrival() Fool around with it. I was parsing the response incorrectly. | June 29, 2003, 6:31 PM |
PiaNKA | [quote author=DaRk-FeAnOr link=board=17;threadid=1736;start=0#msg13201 date=1056911506] I was parsing the response incorrectly. [/quote] I'm not getting a response..., and I'm not using your bot, just the commented out part with the proxy send/recieve stuff. | June 29, 2003, 6:34 PM |
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... | June 29, 2003, 6:39 PM |
Camel | [quote author=PiaNKA link=board=17;threadid=1736;start=0#msg13195 date=1056910048][code] With clsBuf .InsertBYTE &H4 .InsertBYTE &H1 .InsertNTString "6112" .InsertNTString varServer .InsertNTString "" .SendPacket &H4 End With[/code][/quote] shouldn't that be [ .InsertWORD 6112 ] and [ .InsertDWORD inet_ntoa(varServer) ] ? | June 30, 2003, 3:44 AM |
tA-Kane | If it's a standard SOCKS4 server, you are correct; the IP and port are stored as binary, not strings. | June 30, 2003, 4:55 PM |
UserLoser | [code] 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) [/code] 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]. | June 30, 2003, 5:05 PM |