Valhalla Legends Forums Archive | Battle.net Bot Development | the "new" Battle.Net file protocol

AuthorMessageTime
dizzy
Hi

I have some questions about the new file protocol (which came with W3/W3XP). I have modified bnftp from a recent PvPGN release to use the new protocol for W3/W3XP cases and it "works" to download from PvPGN servers. However, Battle.net doesnt allow to download icons-WAR3.bni file for example. The file cant be downloaded using the old protocol so I have assumed it has something to do with the new packet fields in the new file protocol. Some protocol description:
- client connects
- client sends the first byte initconn of 0x2 (as the old file protocol)
- client sends a packet containing a standard file protocol header, arch and clienttag and 8 zeros
- here starts the fun part
- server answers with a "random" 4 bytes
- then client sends a "packet" of 36 bytes which starts with 5 zero bytes, then some random shit, then some fixed bytes then again random shit then the zero ended filename

Battle.net disconnects my bnftp after this last packet sent by client. My guess is that some data in the last packet depend on those random 4 bytes (I have tried hardcoded values from dumps and doesnt work). Anyone here has more informations about this subject ?
April 18, 2004, 5:53 PM
Noodlez
Why don't you look at the PvPGN code that actually sends those packets? I highly doubt they are random.
April 18, 2004, 5:58 PM
dizzy
hehe, is that a joke ?
here is what pvpgn sends:
1. the 4 bytes:
packet_set_size(rpacket,sizeof(t_server_file_unknown1));
bn_int_set( &rpacket->u.server_file_unknown1.unknown, 0xdeadbeef);

2. when it receives the next packet with all that unknown stuff it just ignores them all and reads the filename and sends the file

so this means there is no check client side, only serverside as it seems.
April 18, 2004, 6:02 PM
Adron
Seems to be missing on bnetdocs, but maybe I just don't know where to look. I'm surprised, I thought bnetdocs would cover everything there is in relation to b.net stuff.
April 18, 2004, 6:09 PM
iago
[quote author=Adron link=board=17;threadid=6354;start=0#msg55680 date=1082311754]
Seems to be missing on bnetdocs, but maybe I just don't know where to look. I'm surprised, I thought bnetdocs would cover everything there is in relation to b.net stuff.
[/quote]

There's a section on "b.net file transfer protocol", isn't there? I've never actually looked at it, though
April 18, 2004, 6:30 PM
dizzy
where ? I have searched "file transfer" on the bnetdocs search function and didnt got any match. also in the left frame I dont see anything about that.
April 18, 2004, 6:41 PM
Dyndrilliac
http://www.valhallalegends.com/docs/File%20Transfer.txt

http://botdev.valhallalegends.com/files/fdsrc.zip

http://botdev.valhallalegends.com/files/fileserversrc.zip
April 18, 2004, 7:00 PM
LoRd
The new BNFTP protocol requires authentication before requesting a file for download.
April 18, 2004, 7:06 PM
dizzy
LoRd[nK] thats what I think too. Do you know any other information ? Like if it sends user/pass, how they are encoded, etc...
April 18, 2004, 7:24 PM
Arta
Bnetdocs doesn't have any info on bnftp v2. Perhaps I'll look into it at some point though.
April 18, 2004, 7:52 PM
Maddox
Hmm I wonder when Yoni made that article.

[quote]
(2 bytes)Packet size
(2 bytes)Unknown, always 00 00
[/quote]
April 19, 2004, 6:36 AM
Yoni
Two or three years ago or longer.

Edit: Did I say "A year or two ago"?! This doc existed long before BNLS...
April 20, 2004, 4:11 PM
Skywing
Note that it wouldn't make sense for it to require an account name / password anyway, because you have to download some files before you could possibly create an account (if you are using Blizzard's client).
April 20, 2004, 6:47 PM
Dyndrilliac
Couldn't Blizzard's client be setup to automatically input the correct Account/Password for the FTP to allow it enough access to download the needed files when certain conditions are met?
April 20, 2004, 8:30 PM
Myndfyr
[quote author=Dyndrilliac link=board=17;threadid=6354;start=0#msg55980 date=1082493004]
Couldn't Blizzard's client be setup to automatically input the correct Account/Password for the FTP to allow it enough access to download the needed files when certain conditions are met?
[/quote]

No; Blizzard's clients always display the username/password authentication dialog after making the initial connection, including connections to the Battle.net FTP service. They could be configured that way, but evidently Blizzard didn't see a point to logging the user in before such downloads.

It is likely that Battle.net doesn't want a user to log on because, if an update was needed, it would log the user on without the update, then download the update; if a user could break out of the update, that user could remain logged into Battle.net, potentially causing problems with game versioning.
April 20, 2004, 10:43 PM

Search