• Welcome to Valhalla Legends Archive.
 

the "new" Battle.Net file protocol

Started by dizzy, April 18, 2004, 12:53 PM

Previous topic - Next topic

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 ?
Use the source Luke!

Noodlez

Why don't you look at the PvPGN code that actually sends those packets? I highly doubt they are random.

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.
Use the source Luke!

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.

iago

Quote from: Adron on April 18, 2004, 01:09 PM
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.

There's a section on "b.net file transfer protocol", isn't there?  I've never actually looked at it, though
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


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.
Use the source Luke!

Dyndrilliac

Quote from: Edsger W. DijkstraIt is practically impossible to teach good programming to students that have had a prior exposure to BASIC; as potential programmers they are mentally mutilated beyond hope of regeneration.

Eric

#7
The new BNFTP protocol requires authentication before requesting a file for download.

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...
Use the source Luke!

Arta

Bnetdocs doesn't have any info on bnftp v2. Perhaps I'll look into it at some point though.

Maddox

Hmm I wonder when Yoni made that article.

Quote
(2 bytes)Packet size
(2 bytes)Unknown, always 00 00
asdf.

Yoni

#11
Two or three years ago or longer.

Edit: Did I say "A year or two ago"?! This doc existed long before BNLS...

Skywing

#12
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).

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?
Quote from: Edsger W. DijkstraIt is practically impossible to teach good programming to students that have had a prior exposure to BASIC; as potential programmers they are mentally mutilated beyond hope of regeneration.

MyndFyre

Quote from: Dyndrilliac on April 20, 2004, 03:30 PM
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?

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.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.