Author | Message | Time |
---|---|---|
RealityRipple | Hi again everyone. I have a few questions about Bnet's File Transfer Protocol. First off, I'm assuming it's over port 6112 as well, right? If it's not, that might be the solution to my problems. Secondly, I took a packet log of my bot and diablo 1 connecting to it, and they look exactly the same to me: [code] 2F 00 00 01 36 38 58 49 4C 54 52 44 00 00 00 00 00 00 00 00 00 00 00 00 00 4D 89 7E 99 CB C6 01 76 65 72 2D 49 58 38 36 2D 35 2E 6D 70 71 00 [/code] [code] 2F 00 00 01 36 38 58 49 4C 54 52 44 00 00 00 00 00 00 00 00 00 00 00 00 00 4D 89 7E 99 CB C6 01 76 65 72 2D 49 58 38 36 2D 34 2E 6D 70 71 00 [/code] yet I get absolutely no response after sending the request. Here's my code: [code] Public Sub SendFTPRequest(ByVal FileName As String, ByVal LocalFileTimeLow As Long, ByVal LocalFileTimeHigh As Long, Optional ByVal StartLoc As Long = 0, Optional ByVal BannerAd As Boolean = False, Optional ByVal BannerID As Long = 0, Optional ByVal BannerEXT As Long = 0) If wsFTP.State <> sckConnected Then RaiseEvent Error("Not connected to FTP Server!") Exit Sub End If wsFTP.SendData &H2 With Packet .ClearOutbound .InsertWORD &H100 .InsertDWORD ARCH_IX86 .InsertDWORD GameToDWORD(Config.Game) .InsertDWORD BannerID .InsertDWORD BannerEXT .InsertDWORD StartLoc .InsertDWORD LocalFileTimeHigh .InsertDWORD LocalFileTimeLow .InsertNTString FileName .SendFTPPacket wsFTP End With End Sub [/code] Can someone explain why it just sits there after it's sent, please? | September 14, 2006, 7:39 AM |
RealityRipple | Stupid mistake, sorry. It should be Chr$(&H2), not just &H2. Just one question, though... Isn't bnet supposed to close the connection when it's done? I recieve files, but they seem to be corrupt, and the connection doesn't get terminated.... | September 14, 2006, 7:53 AM |
Ersan | ASCII vs. Binary mode? | September 14, 2006, 8:18 AM |
RealityRipple | The mode doesn't matter. It is binary though. When I did a check (If FTPCurrent = FTPLength Then) and closed the file if that check was true, the downloads appear to be fine. But the connection does NOT terminate as bnetdocs says it should. | September 14, 2006, 8:21 AM |