Author | Message | Time |
---|---|---|
laurion | When this is called, I get 'Type Mismatch' (VB) [code] Public Function makeip(Data As String) As String makeip = CLng("&H" & ToHex(Mid(Data, 1, 1))) & "." & CLng("&H" & ToHex(Mid(Data, 2, 1))) & "." & CLng("&H" & ToHex(Mid(Data, 3, 1))) & "." & CLng("&H" & ToHex(Mid(Data, 4, 1))) End Function [/code] This is trying to convert Data to an IP from 0x3E it is called like this: [code] bah2 = Mid(Server, 5, 4) frmMain.sckRealm.Connect makeip(bah2), 6112 'connecting to Realm [/code] Correct me if I am wrong, but is the realm port 6112 or 6113 | February 5, 2004, 10:08 PM |
dRAgoN | [code]Public Function DWORDtoIP(IPData As String) As String Dim a As Integer, b As Integer, c As Integer, d As Integer If IPData = "" Then DWORDtoIP = "ERROR: Empty Data." Exit Function ElseIf Len(IPData) < 4 Then DWORDtoIP = "ERROR: Bad Data length." Exit Function ElseIf Len(IPData) > 4 Then DWORDtoIP = "ERROR: Bad Data length." Exit Function End If a = Asc(Mid(IPData, 1, 1)) b = Asc(Mid(IPData, 2, 1)) c = Asc(Mid(IPData, 3, 1)) d = Asc(Mid(IPData, 4, 1)) DWORDtoIP = a & "." & b & "." & c & "." & d End Function RealmServerIP = DWORDtoIP(Mid(Data3E, TheIPLocation, 4))[/code] TheIPLocation != 5, and the port is normaly 6112. Note: Not only the IP can be found in Data3E but the port can be found within it also. Happy hunting. | February 6, 2004, 4:16 AM |
laurion | I keep getting type mismatch when I do [code] Dim IP$ AddText vbYellow, "Attempting to connect to MCP server " & DWORDtoIP(Mid(Data,IP, 4)) [/code] Any ideas? btw, data is a string | February 6, 2004, 11:01 AM |
Grok | I posted a class module for use in VB projects that will be working with the internet. Don't remember the class name, but if you search this forum for my posts in the last six months, you might find the link. It will solve all your IP and HostName API call usage problems and eliminate the learning curve there. Plus it will reduce your IQ by about 3 points. That's relatively good compared to the 29 point damage that CSB does to you. Spht, did you BotDev it or was it redundant to other libraries? | February 6, 2004, 4:10 PM |
Spht | [quote author=Grok link=board=17;threadid=5098;start=0#msg42791 date=1076083825] I posted a class module for use in VB projects that will be working with the internet. Don't remember the class name, but if you search this forum for my posts in the last six months, you might find the link. It will solve all your IP and HostName API call usage problems and eliminate the learning curve there. Plus it will reduce your IQ by about 3 points. That's relatively good compared to the 29 point damage that CSB does to you. Spht, did you BotDev it or was it redundant to other libraries? [/quote] I don't recall you posting that here, so no. | February 6, 2004, 5:29 PM |
Networks | I dont mean to be stupid but does this mean you can discover someones IP on b.net or is it possible? | February 6, 2004, 6:22 PM |
Myndfyr | [quote author=Networks link=board=17;threadid=5098;start=0#msg42806 date=1076091765] I dont mean to be stupid but does this mean you can discover someones IP on b.net or is it possible? [/quote] No, it is no longer possible. I know it used to be part of diablo retail, but those clients are confined and that part of bnet's message that used to contain IP addresses no longer does. | February 6, 2004, 7:36 PM |
Dyndrilliac | It IS possible to display somone's IP Address on Client To Client Games(Like Diablo Retail, Starcraft, Etc), however it is only possible after the person owning the IP Address you desire to know has made a game, you can find the IP Address in the data sent via the Game List. This is also the source of making a couple crashes for those games(Where the victim attempts to join a game displaying invalid data in the gamelist and crashes upon clicking on the game in the lsit to see the data). As you can guess this also fails to work on private games. However, I currently have a Diablo Retail GameBot setup to massload(clog 7 copies of itself onto bnet), Create a game, and pass invalid data to the GameList causing anyone trying to join to crash. It also displays the IP Address of the creators of already made public games accessible to me on the Gamelist. | February 6, 2004, 9:35 PM |
Kp | [quote author=Dyndrilliac link=board=17;threadid=5098;start=0#msg42836 date=1076103351]However, I currently have a Diablo Retail GameBot setup to massload(clog 7 copies of itself onto bnet), Create a game, and pass invalid data to the GameList causing anyone trying to join to crash. It also displays the IP Address of the creators of already made public games accessible to me on the Gamelist.[/quote] and I assume there's actually a point to ruining the experience of those few hold outs still playing Diablo? | February 6, 2004, 10:58 PM |
Dyndrilliac | Well, It does it for SC/BW/Diablo, I just had it set for Diablo at the time. But, there isn't a point. | February 7, 2004, 1:23 AM |
dRAgoN | [quote author=laurion link=board=17;threadid=5098;start=0#msg42759 date=1076065272] I keep getting type mismatch when I do [code] Dim IP$ AddText vbYellow, "Attempting to connect to MCP server " & DWORDtoIP(Mid(Data,IP, 4)) [/code] Any ideas? btw, data is a string [/quote] heres a crude example [code] dim data as string, a as string, b as string, c as string Data = "abcdefghijkl" 'Mid(STRING, LONG, LENGTH) = String a = DWORDtoIP(Mid(data, 1, 4)) 'you are takeing "abcd" from data and converting it to an ip b = DWORDtoIP(Mid(data, 5, 4)) 'you are takeing "efgh" from data and converting it to an ip c = DWORDtoIP(Mid(data, 9, 4)) 'you are takeing "ijkl" from data and converting it to an ip 'print out the values to the Immediate window which you can bring up with Ctrl+G debug.print a debug.print b debug.print c [/code] you might want to look up the use's of mid on http://msdn.microsoft.com | February 7, 2004, 3:58 AM |
Grok | The first time I saw someone's IP being displayed was in Blizzard Chat 2, in the fall of 1998. As chat users would log onto battle.net, their start channel was always Blizzard Chat [n]. Someone had a binary bot in there (before I ever saw the first nbbot, SoulburnerNN, or Adron) grabbing the IP off the join packet. | February 7, 2004, 5:43 AM |
Networks | well i was just thinking if it showed an IP for a user if they logon maybe it'd be easier to ban floodbots because they'll have the same IP everytime they logon to b.net? | February 7, 2004, 8:06 PM |
UserLoser. | How about using inet_ntoa()? | February 7, 2004, 10:10 PM |
laurion | [quote author=Networks link=board=17;threadid=5098;start=0#msg42974 date=1076184365] well i was just thinking if it showed an IP for a user if they logon maybe it'd be easier to ban floodbots because they'll have the same IP everytime they logon to b.net? [/quote] Proxies | February 8, 2004, 4:38 PM |