Valhalla Legends Forums Archive | Battle.net Bot Development | Winsocks Api

AuthorMessageTime
SiMi
Currentely im trying to connect on socks 4 for my unlimited bot and i want to know what api calls do i need when sending my port and the ip. Can Someone Help Me?

Here is an example:

Blah = Split(GetStuff("Main", "Server"), ".")
................
GateBuf.InsertWORD 6112
For i = LBound(Blah) To UBound(Blah)
GateBuf.InsertBYTE CStr(Blah(i))
Next i
May 28, 2003, 1:29 AM
SiMi
so im thinking the ip would stay the same?
May 28, 2003, 5:32 AM
Skywing
[quote author=Maddox link=board=17;threadid=1458;start=0#msg10923 date=1054096368]
You can just send chr(23) and chr(224) for the port.

There are no special API calls needed.
[/quote]I'd recommend not hardcoding 6112 in a nonobvious way, especially since Blizzard's now planning to change the Battle.net port.
May 28, 2003, 6:22 PM
dRAgoN
[quote author=Maddox link=board=17;threadid=1458;start=0#msg11007 date=1054158696]
[quote author=Skywing link=board=17;threadid=1458;start=0#msg10988 date=1054146177]
[quote author=Maddox link=board=17;threadid=1458;start=0#msg10923 date=1054096368]
You can just send chr(23) and chr(224) for the port.

There are no special API calls needed.
[/quote]I'd recommend not hardcoding 6112 in a nonobvious way, especially since Blizzard's now planning to change the Battle.net port.
[/quote]

How do you know? :D
[/quote]

Bacause he is God 9p
May 29, 2003, 12:27 AM
SiMi
but for some reason its not working.... What can be wrong?
May 29, 2003, 3:27 AM
c0ol
ports arent usually a DWORD, they are usually an unsigned short, or WORD in win32 terms.
May 29, 2003, 7:36 PM
laurion
he put word..
May 29, 2003, 8:14 PM
SiMi
here is the full thing:
Blah = Split(GetStuff("Main", "Server"), ".")
InsertByte &H4
InsertByte &H1
InsertWORD 6112
For i = LBound(Blah) To UBound(Blah)
InsertBYTE CStr(Blah(i))
Next i
InsertByte &H0
SendPacket Ws

can anyone tell me whats wrong with it now?
May 30, 2003, 4:16 AM
SiMi
i got what i had to do with the port but now what do i with the ip?
June 1, 2003, 8:18 PM
UserLoser
Here's my method and it works great...

(BYTE) 0x04
(BYTE) 0x01
(WORD) 6112 - Reversed
(DWORD) IP of destination
(STRING) User ID
(BYTE) 0x00

-- OR -- for the PORT you could do

(BYTE) 0x17
(BYTE) 0xE0

--

For the Destination IP, use inet_addr()
Declare Function inet_addr Lib "ws2_32" (ByVal IP As String) As Long

--

When the proxy sends you back 0x5A, then you can begin sending the normal packets used for Battle.net.

--
Edit:
--
Err.... I don't think that will work, I think it's missing some bytes, not sure since I don't have my packet logs from before...
June 3, 2003, 10:51 PM
SiMi
thanks userloser ill try it out your method later.
June 4, 2003, 4:06 AM
Camel
[quote author=c0ol link=board=17;threadid=1458;start=0#msg11073 date=1054236974]
ports arent usually a DWORD, they are usually an unsigned short, or WORD in win32 terms.
[/quote]

Short and Long have been known to change definition with different processors/languages. WORD has not. 8)
June 4, 2003, 4:27 AM
Adron
The definition of what's a word changes a lot between processors. The only processors it has stayed much the same on are the processors that work on multiples of 8 bits.
June 4, 2003, 9:44 AM
UserLoser
[quote author=SiMi link=board=17;threadid=1458;start=0#msg11507 date=1054699594]
thanks userloser ill try it out your method later.
[/quote]
Where's the +1 on my karma? :(
June 4, 2003, 4:20 PM
Yoni
-1 to UserLoser for requesting a +1
June 4, 2003, 7:21 PM

Search