bittorrent

Ruby Torrent Library

吃可爱长大的小学妹 提交于 2019-12-05 18:42:41
Is there any good library for Ruby to work with BitTorrent trackers? To download or seed files. There's a rubytorrent library on rubyforge, but it was last updated in 2005 and doesn't seem like working anymore. fingerman see lib-torrent ruby... https://github.com/maran/libtorrent-ruby I'm not sure if this is what you want. ProphetZarquon Also see this post which contains some potentially useful comments as well, including a Ruby wrapper for the Transmission API using RPCs. My experience with libtorrent derived clients has been very positive, I would like to see something new here. (I prefer

How do BitTorrents connect with eachother?

◇◆丶佛笑我妖孽 提交于 2019-12-05 12:36:14
I was just downloading a new distro of linux using uTorrent, and started to wonder how uTorrent (and other bittorrents) send files to eachother through NAT routers? They obviously use the trackers to get introduced, but how do they pass info to eachother? Is there a whitepaper on this? I couldn't find one :/ Thanks Most of the time, they don't. I have a restricted network, and every time I run my torrent program it warns me that some of the ports/functionality required is not available to me. If one party has a restricted network and another has an open network, the restricted client will

How to know the number of seeds/peers for a torrent in PHP

流过昼夜 提交于 2019-12-05 02:34:47
When you place a .torrent file for download in your website, how can you get the number of Seeds & Peers for that Torrent and inform the user of them? You have to contact the tracker(s) that is shown in the torrentfile. If the tracker support "scraping" that is probably the request you want. Otherwise its up to the tracker to decide how many peers it wants to return to you, and you have no idea if those peers is a seed or leech before contacting them. The torrentfile is in bencoded format, look for the bdecode php library to easily parse the info. Provide the infohash you get from the pieces

Bittorrent protocol TCP communication example

社会主义新天地 提交于 2019-12-04 21:46:21
I'm trying to implement a bittorent client and I got stuck at the part were I succesfully connected to a peer but I don't know how to communicate with the peer. I managed to decode the torrent metadata file, I succesfully got all the info from there, I connected to a peer with TCP, I send the handshake message, I receive the handshake message back from the peer, but after that I don't receive any message from the peer (I was expecting the have messages). I tried sending an unchoke message to the peer and I started receiving some data but I don't know how to understand that data. This is what I

How to calculate the hash value of a torrent using Java

六月ゝ 毕业季﹏ 提交于 2019-12-04 21:37:09
How can I calculate the hash value of a torrent file using Java? Can I calculate it using bencode ? BalusC Torrent files are hashed using SHA-1 . You can use MessageDigest to get a SHA-1 instance. You need to read until 4:info is reached and then gather the bytes for the digest until remaining length minus one. Note : This implementation works for most torrents, but the .torrent file is not guaranteed to end with the info key. File file = new File("/file.torrent"); MessageDigest sha1 = MessageDigest.getInstance("SHA-1"); InputStream input = null; try { input = new FileInputStream(file);

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

Looking for some good books/resources on understanding Bittorrent? [closed]

你。 提交于 2019-12-04 14:24:44
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 8 years ago . Looking for some good books or technical resources for a detailed understanding of how Bittorrent works? It would probably involve

Pure PHP torrent client? [closed]

99封情书 提交于 2019-12-04 11:58:31
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I'm a developer for a PHP CMS and I want to add a BitTorrent capability to it. The CMS already lets users upload files which other users can then download, comment, etc. but I think this could be improved (especially for low-bandwidth sites) if the CMS could offer these downloads via BitTorrent, either via

The torrent info_hash parameter

此生再无相见时 提交于 2019-12-04 11:37:08
How does one calculate the info_hash parameter ? Aka the hash corresponding to the info dictionar?? From official specs: info_hash The 20 byte sha1 hash of the bencoded form of the info value from the metainfo file. Note that this is a substring of the metainfo file. This value will almost certainly have to be escaped. Does this mean simply get the substring from the meta-info file and do a sha-1 hash on the reprezentative bytes?? .... because this is how i tried 12 times but without succes meaning I have compared the resulting hash with the one i should end up with..and they differ ..that +