This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [QUESTION] Blizzard Downloader  (Read 8373 times)

stoneharry

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 617
    • View Profile
Re: [QUESTION] Blizzard Downloader
« Reply #15 on: October 05, 2013, 06:56:10 pm »
Quote from: "happyhack"
Quote from: "stoneharry"
The filesplitter would only be used for sending using the torrent protocol, correct?
correct, almost  :D actually peers send pieces to each others trough TCP, not HTTP (if i remember well). But you are right, the downloader get same pieces from the http server than it would get from a peer.

Quote from: "stoneharry"
The direct download URL is sent in the tracker response, however my downloader does not appear to be using it
hmmm... does the downloader gives u any error or warning message?
are you sure the pieces are available to the downloader? can u download them through a browser?

Does the View > Connection info menu show u the correct url in the "Direct HTTP download" row?

Okay, I'm a bit confused as to what I should point to.



At the moment I just have the download URL set to the binary file on a web server.

The parts (0 to 29) and the hash.txt is uploaded in the same directory as the binary file.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

happyhack

  • Contributors
  • Race Changer
  • *****
  • Posts: 38
    • View Profile
Re: [QUESTION] Blizzard Downloader
« Reply #16 on: October 05, 2013, 09:49:39 pm »
Wow.exe should be a folder, not a file.

Delete Wow.exe, create a directory with that name, then place all the part files inside. it should work now.

u can remove hash.txt too, it is unused.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

stoneharry

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 617
    • View Profile
Re: [QUESTION] Blizzard Downloader
« Reply #17 on: October 06, 2013, 01:16:12 pm »
Quote from: "happyhack"
Wow.exe should be a folder, not a file.

Delete Wow.exe, create a directory with that name, then place all the part files inside. it should work now.

u can remove hash.txt too, it is unused.

That makes more sense. :) It now starts to download but then it stops and a bad.piece is created at the download location.

The torrent piece size is set to 256 kb. That's 262144 bytes. So I am splitting the file using filesplitter @ 262144 bytes.

When the download stops the Wow.exe.part has reached 768 KB. The bad.part is 255 KB (261,396 bytes).

Since it seems to fail almost immediately and due to the size of the bad.part I think this is because one of the bits that the filesplitter has created is an incorrect size. So I recreated the parts and uploaded the new ones to the same result. Am I splitting it by the wrong value? Should it be 256KB - 1?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

happyhack

  • Contributors
  • Race Changer
  • *****
  • Posts: 38
    • View Profile
Re: [QUESTION] Blizzard Downloader
« Reply #18 on: October 07, 2013, 05:11:38 pm »
Quote from: "stoneharry"
Since it seems to fail almost immediately and due to the size of the bad.part I think this is because one of the bits that the filesplitter has created is an incorrect size. So I recreated the parts and uploaded the new ones to the same result. Am I splitting it by the wrong value? Should it be 256KB - 1?
no. filesplitter is correct, it writes in the console how many bytes are written to each file, u can check it by hand too.
The part size doesnt matter, i tried with 256, 512, 1024, it worked just well.

In the torrent file there is a field "pieces" which contain concatened sha1 hash of all pieces. If µtorrent didnt set this correctly the download will fail because of piece integrity check.
(this is what the hash.txt file is used for)

If u change the pieces size without updating the torrent, the download will fail because of piece integrity check.

If u resume the download without delete "yourfiledownloaded.exe.part" after changing pieces size, the download will fail because of piece integrity check.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

stoneharry

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 617
    • View Profile
Re: [QUESTION] Blizzard Downloader
« Reply #19 on: October 07, 2013, 05:48:30 pm »
Quote from: "happyhack"
Quote from: "stoneharry"
Since it seems to fail almost immediately and due to the size of the bad.part I think this is because one of the bits that the filesplitter has created is an incorrect size. So I recreated the parts and uploaded the new ones to the same result. Am I splitting it by the wrong value? Should it be 256KB - 1?
no. filesplitter is correct, it writes in the console how many bytes are written to each file, u can check it by hand too.
The part size doesnt matter, i tried with 256, 512, 1024, it worked just well.

In the torrent file there is a field "pieces" which contain concatened sha1 hash of all pieces. If µtorrent didnt set this correctly the download will fail because of piece integrity check.
(this is what the hash.txt file is used for)

If u change the pieces size without updating the torrent, the download will fail because of piece integrity check.

If u resume the download without delete "yourfiledownloaded.exe.part" after changing pieces size, the download will fail because of piece integrity check.

I see. You are correct, it seems uTorrent does not populate the hash. I google'd a bit on how to fill this field and came up with info_hash being the required field. The hash.txt is 1200 in length. So I added it like so:

Code: [Select]
d8:announce31:http://127.0.0.1:54177/announce9:info_hash1200:[...]10:created by13:uTorrent/331013:creation datei1380975771e8:encoding5:UTF-84:infod6:lengthi7704216e4:name7:Wow.exe12:piece lengthi262144e6:pieces600
Where [...] = the contents of hash.txt.

However it is still failing to get any piece correctly. Is this the correct field? Do you recommend another program for generating torrent files?

Thanks for helping me with what are probably silly mistakes. :P
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

happyhack

  • Contributors
  • Race Changer
  • *****
  • Posts: 38
    • View Profile
Re: [QUESTION] Blizzard Downloader
« Reply #20 on: October 07, 2013, 07:10:31 pm »
Quote from: "stoneharry"
d8:announce31:http://127.0.0.1:54177/announce9:info_hash1200:[...]10:created by13:uTorrent/331013:creation datei1380975771e8:encoding5:UTF-84:infod6:lengthi7704216e4:name7:Wow.exe12:piece lengthi262144e6:pieces600

wont work, hash.txt is a hex representation of binary data.
i use bencode editor, write 0x[...] in value field to make it binary
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

stoneharry

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 617
    • View Profile
Re: [QUESTION] Blizzard Downloader
« Reply #21 on: October 08, 2013, 12:53:13 pm »
So I took a step back and had a look at the Blizzard torrent files to see how it should be fully constructed. I can now see that my torrent files I was creating were not even similar to the structure Blizzard used.

So I took a Blizzard torrent and populated it with the data for my file:



I am assuming pieces is the hash as it seems like the logical place for it.

Now when I run it I still get a bad.piece generated next to the Blizzard Downloader and a UpdatesWow.exe.part filled with some data.

If this appears to all be correct and is just a incorrect value somewhere then I will continue testing different things.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

happyhack

  • Contributors
  • Race Changer
  • *****
  • Posts: 38
    • View Profile
Re: [QUESTION] Blizzard Downloader
« Reply #22 on: October 08, 2013, 06:13:21 pm »
i dont know... there is a working torrent file in the folder "torrent + downloader".

If it doesnt work then u are messing somewhere. Read again the entire topic. If it still doesnt work then.... read again the entire topic, then read it a 3rd time.
If it still doesnt work then upload ur files.

Its a complex process to make a working downloader this way. I told u the tracker program is really bad, if u want to make it work fully u need to make one yourself or modify an existing bittorrent tracker.

There can be many differents problems, u have to find the solution by urself.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Hlkz

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 9
    • View Profile
Re: [QUESTION] Blizzard Downloader
« Reply #23 on: June 30, 2015, 11:21:37 pm »
Hi there!
First of all I love your guys and all your work, you got all my respect.

I'm noob in network stuff, happyhack you said:
Quote from: "happyhack"
I told u the tracker program is really bad, if u want to make it work fully u need to make one yourself or modify an existing bittorrent tracker.
Can you tell me what is missing in the tinytracker you made? (split peers var for multiple download?)
What do i risk using it for a working server?
Or can you give me a link or a name of an easy/simple opensource tracker that I can use for a working server?
Thanks in advance

Edit:
https://github.com/Hlkz/peertracker/com ... 266b8e762f
And it seems working for now.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

devil1234

  • Registred Member
  • MS Paint Freak
  • *****
  • Posts: 3
    • View Profile
Re: [QUESTION] Blizzard Downloader
« Reply #24 on: March 12, 2017, 10:07:41 am »
Hy sorry for resurrecting necro thread , is possible to upload again the files because is not working anymore :( . This one : BlizzDLasm.rar