info-hash

Create torrent hash info

元气小坏坏 提交于 2020-01-01 17:23:25
问题 how do I generate torrent hash info on torrent files. I have been taking a look on this example: How to calculate the hash value of a torrent using Java and am trying to convert it to C++. This is the code I have so far: void At::ReadTorrent::TorrentParser::create_hash(std::string torrentstub) { std::string info; int counter = 0; while(info.find("4:info") == -1) { info.push_back(torrentstub[counter]); counter++; } unsigned char array[torrentstub.size()]; int test = 0; for(int data; (data =

Problem creating info hash of torrent file

时间秒杀一切 提交于 2019-12-23 16:21:13
问题 I'm creating a BitTorrent site. If a user uploads a .torrent file I need to get the info hash to get more info from the tracker. However I cannot seem to get the correct info hash from the file. I've download the a .torrent ( http://www.mininova.org/get/2886852 ) from mininova. According the mininova the info hash should be: 6a7eb42ab3b9781eba2d9ff3545d9758f27ec239 ( http://www.mininova.org/det/2886852 ). However when I try to create the info hash of the file I get the following:

Create torrent hash info

浪尽此生 提交于 2019-12-04 16:47:38
how do I generate torrent hash info on torrent files. I have been taking a look on this example: How to calculate the hash value of a torrent using Java and am trying to convert it to C++. This is the code I have so far: void At::ReadTorrent::TorrentParser::create_hash(std::string torrentstub) { std::string info; int counter = 0; while(info.find("4:info") == -1) { info.push_back(torrentstub[counter]); counter++; } unsigned char array[torrentstub.size()]; int test = 0; for(int data; (data = torrentstub[counter]) > -1;) { array[test++] = data; counter++; } std::cout << array << std::endl; //SHA

Magnet links library for PHP

☆樱花仙子☆ 提交于 2019-11-29 13:02:24
Does anyone here know of a magnet-URI -parser for PHP? To validate it, or maybe to extract some information from it? In case you're looking for something like this: Magnet URI: magnet:?xt=urn:sha1:YNCKHTQCWBTRNJIV4WNAE52SJUQCZO5C (valid) Display Name .... (dn): eXact Length .... (xl): eXact Topic ..... (xt): urn:sha1:YNCKHTQCWBTRNJIV4WNAE52SJUQCZO5C Acceptable Source (as): eXact Source .... (xs): Keyword Topic ... (kt): Manifest Topic .. (mt): address TRacker . (tr): take a look at the Demo . Can't say if this matches your need, your question was sort of unspecific. So leave a comment. If you

Magnet links library for PHP

被刻印的时光 ゝ 提交于 2019-11-28 06:39:54
问题 Does anyone here know of a magnet-URI -parser for PHP? To validate it, or maybe to extract some information from it? 回答1: In case you're looking for something like this: Magnet URI: magnet:?xt=urn:sha1:YNCKHTQCWBTRNJIV4WNAE52SJUQCZO5C (valid) Display Name .... (dn): eXact Length .... (xl): eXact Topic ..... (xt): urn:sha1:YNCKHTQCWBTRNJIV4WNAE52SJUQCZO5C Acceptable Source (as): eXact Source .... (xs): Keyword Topic ... (kt): Manifest Topic .. (mt): address TRacker . (tr): take a look at the

What exactly is the info_Hash in a torrent file

人走茶凉 提交于 2019-11-27 12:05:19
问题 i am reading lately a lot about hash from torrents an magnetic links etc. but there is a question i dont understand. I have the hash of a file and the infohash of a torrent, is the infohash = hash of the file ? If yes what if the torrent descripes 6 Files to download ? If no what does it stand for. 回答1: So I finally figured it out. The “infohash” is the SHA1 Hash over the part of a torrent file that includes: ITEM: length(size) and path (path with filename) Name: The name to search for Piece

Calculating the info-hash of a torrent file

余生颓废 提交于 2019-11-27 09:33:55
I'm using C++ to parse the info hash of a torrent file, and I am having trouble getting a "correct" hash value in comparison to this site: http://i-tools.org/torrent I have constructed a very simple toy example just to make sure I have the basics right. I opened a .torrent file in sublime and stripped off everything except for the info dictionary, so I have a file that looks like this: d6:lengthi729067520e4:name31:ubuntu-12.04.1-desktop-i386.iso12:piece lengthi524288e6:pieces27820:¡´E¶ˆØËš3í ..............(more unreadable stuff.....).......... I read this file in and parse it with this code:

Calculating the info-hash of a torrent file

寵の児 提交于 2019-11-26 14:47:51
问题 I'm using C++ to parse the info hash of a torrent file, and I am having trouble getting a "correct" hash value in comparison to this site: http://i-tools.org/torrent I have constructed a very simple toy example just to make sure I have the basics right. I opened a .torrent file in sublime and stripped off everything except for the info dictionary, so I have a file that looks like this: d6:lengthi729067520e4:name31:ubuntu-12.04.1-desktop-i386.iso12:piece lengthi524288e6:pieces27820:¡´E¶ˆØËš3í