bittorrent

How to return a string generated from a sha1 bytearray to that bytearray?

好久不见. 提交于 2019-12-20 04:37:09
问题 first of all sorry for the bad English. Well, I want to read the pieces hashes information from a torrent file. Currently, I'm using https://github.com/hyPiRion/java-bencode this bencode library to decode the information, but my problem is when I want to convert the string of pieces to a byte array. The torrent file is encoded in UTF-8. but If I do Byte[] bytepieces = piecestring.getBytes("UTF-8"); It gives well. anything really usable. For other side, for comparing or try to get the string,

How to write a simple Bittorrent application?

对着背影说爱祢 提交于 2019-12-18 09:54:28
问题 How to write a simple bittorrent application. Something like a "hello world" using a bittorrent library, I mean a simplest of the application to understand the working of bittorrent. I would prefer a python or a C/C++ implementation, but it can be any language. Platform is not an issues either, but i would prefer Linux. Recommendations for the library to follow, I have downloaded the source code for one (i think official bittorrent) from - http://sourceforge.net/projects/bittorrent/develop.

Why does tracker server NOT understand my request? (Bittorrent protocol)

£可爱£侵袭症+ 提交于 2019-12-18 05:55:59
问题 I'm trying to implement Bittorent in C. First of all, before writing a code snippet, I tried to used a web browser to send the following message(URL) to the tracker server. you may try this URL. http://torrent.ubuntu.com:6969/announce? info_hash=%9b%db%bbI%f0%85%a2%d1%5d%96%ac%fa%bf%f81%06%001O%e0 &peer_id=ABCDABCDABCDABCDABCD&port=6882&downloaded=0 &uploaded=0 &left=0 &event=started I have downloaded the torrent file from this link which is named dapper-dvd-i386.iso and has

PHP Module for reading torrent files [closed]

蓝咒 提交于 2019-12-17 22:15:03
问题 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 5 years ago . Is there a PHP module that you can use to programmatically read a torrent to find out information about it, Seeders for instance? 回答1: I have used these functions in a small website I made once. Think I found them with a php bittorrent tracker called OpenTracker or something, but can't find the website... You

How NAT traversal works in case of peer to peer protocols like bittorrent.

与世无争的帅哥 提交于 2019-12-17 09:42:17
问题 I know about NAT traversal and about STUN, TURN and ICE and its use. I want to know whether these are implemented in peer to peer file sharing application like bittorrent. Whether trackers facilitate peers behind NATs to communicate with each other by helping in creating direct connection using STUN or relay through TURN. In the case of Distributed Hash Table(DHT) how one peer would communicate with other peer behind NAT ? 回答1: BitTorrent does not need to connect to any particular member in a

How do BitTorrent magnet links work?

痞子三分冷 提交于 2019-12-17 07:59:32
问题 For the first time I used a magnet link. Curious about how it works, I looked up the specs and didn't find any answers. The wiki says xt means "exact topic" and is followed by the format ( btih in this case) with a SHA1 hash. I saw base32 mentioned, knowing it's 5 bits per character and 32 characters, I found it holds exactly 160bits, which is exactly the size of the SHA1. There's no room for an IP address or anything, it's just a SHA1. So how does the BitTorrent client find the actual file?

UDP Tracker Scraping 1 script working other Not

别说谁变了你拦得住时间么 提交于 2019-12-12 01:31:21
问题 While using this script my tracker only update seeds & leechers from http tracker only 1st Tracker of my torrent. print("<tr><td class='desc'><b>" .T_("Torrent Stats"). ": </b></td><td valign='top' class='lista'>"); $seeders1 = $leechers1 = $downloaded1 = null; $tres = SQL_Query_exec("SELECT url FROM announce WHERE torrent=$id"); while ($trow = mysql_fetch_assoc($tres)) { $ann = $trow["url"]; $tracker = explode("/", $ann); $path = array_pop($tracker); $oldpath = $path; $path = preg_replace("/

Bittorrent extended message

痞子三分冷 提交于 2019-12-11 10:38:55
问题 I cannot find documentation anywhere that will tell me what this message means. it looks like this in Wireshark. 00 00 00 03 14 03 01 I realize it is a 3 byte message, it is an extended message, ie type 20, but I don't know what 03 01 represent. The scenario is that I send an 'Interested' message to the peer to unchoke my client, the peer then responds with the above message, followed by the 'Unchoke' message. 回答1: It is a extension message with ID = 3 and 01 is message data. What ID = 3

Running webtorrent js in browser

三世轮回 提交于 2019-12-11 07:59:26
问题 So that the webtorrent works in the browser is it necessary to be running a webtorrent desktop server for example? Utorrent customers do not have this feature? 回答1: Webtorrent in a browser can only talk to other clients via WebRTC, i.e. it is not compatible with the TCP and uTP transports and UDP-based DHT used by real bittorrent clients, hence it will not provide the same connectivity as a desktop application. Additionally browsers lack many other system APIs, so they can't match the

Libtorrent setting download_limit/upload_limit is not working

馋奶兔 提交于 2019-12-11 07:34:42
问题 I want to rate limit my download/upload speed in my libtorrent client. I am using the following code for this. params = { 'save_path': '.', \ 'storage_mode': lt.storage_mode_t.storage_mode_sparse, \ 'ti': info, 'flags': 0x020 } h = ses.add_torrent(params) h.set_download_limit(100) h.set_upload_limit(100) h.resume() It should download the data at 0.1 kb/sec, but still it is downloading the data at the speed of around 1500 kb/sec. 100.00% complete (down: 1576.0 kb/s up: 55.0 kB/s) Anything I am