Understanding the Torrent File Format and Bencoding

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ม.ค. 2025

ความคิดเห็น • 28

  • @joshiatharva
    @joshiatharva 2 ปีที่แล้ว +4

    Great video Arpit! After watching your video I tried writing a bencode encoder and decoder using Javascript. If anyone needs a reference, I've added a medium link in my about section. Thanks!

  • @HarshKapadia
    @HarshKapadia 2 ปีที่แล้ว

    Thank you for this, Arpit!

  • @japanijoota6190
    @japanijoota6190 4 หลายเดือนก่อน

    Hi arpit, first of all thank you for making this in depth series.
    I created a python script which takes torrent file as an argument and prints its contents after decoding it.
    I tested a bunch of torrent files, even the official ubuntu 24.04 torrent file, but I did not find md5sum in any of those.
    I also looked at the specification, there is no mention of md5sum in that document. I don't think it is there. I guess it makes sense too, since we are calculating sha1 already, there is no need for much weaker md5sum.
    also, in most torrent files, alongside "announce", there is also a key called "announce-list" which contains a list of trackers

  • @vickymar3836
    @vickymar3836 2 หลายเดือนก่อน

    great video, a fan from linkedin

  • @Vikasc28
    @Vikasc28 ปีที่แล้ว

    Hi Arpit,
    Great content, thank youuu
    Trying to find the Handwritten notes on the site, i couldn't.
    Can you please share the link, would be really helpful.
    Thanks

  • @vikassrivastava7081
    @vikassrivastava7081 2 ปีที่แล้ว +2

    Was about to login , got this video notification , now will login after watching this video 😅

  • @suhanimittal158
    @suhanimittal158 2 ปีที่แล้ว

    Hi, what if at any point of time that tracker is down... wouldn't it be single point of failure?

    • @AsliEngineering
      @AsliEngineering  2 ปีที่แล้ว +2

      It is and hence in a torrent network tracker is load balanced just like normal API servers.
      Also there is pure P2P tracker less implementation that has no point of failure. I will be discussing it on Wednesday.

    • @SuganthanHarmless
      @SuganthanHarmless 2 ปีที่แล้ว +2

      Also, a torrent can have multiple trackers.

  • @JardaniJovonovich192
    @JardaniJovonovich192 2 ปีที่แล้ว

    So, as far as I understand, the torrent file would contain the metadata and the entire data of the file but in Bencoded form as an array of pieces.
    So, the torrent client doesn't need seeders to be online, right? Of course, if seeders are online, download might be faster but if they are not then the download speed takes a hit, correct?

    • @AsliEngineering
      @AsliEngineering  2 ปีที่แล้ว +3

      Not the download speed but the completion of download. Seeders have all the pieces but it is possible that leechers might not have all the pieces.
      Hence for the pieces that are no available with anyone in the network and when there is no seeder then the download could never complete.

    • @AsliEngineering
      @AsliEngineering  2 ปีที่แล้ว +1

      I will be talking about it in next couple of videos.

    • @0xatul
      @0xatul 2 ปีที่แล้ว

      wait, torrent files contains the entire data of the file? If so, why do we need seeders in the first place if we have all the data?
      Sorry if this sounds dumb

    • @AsliEngineering
      @AsliEngineering  2 ปีที่แล้ว +2

      @@0xatul no it does not. It only contains the SHA of each piece.

    • @srivasthavapippari2924
      @srivasthavapippari2924 2 ปีที่แล้ว

      @@0xatul Torrent file contains only SHA of each piece, after downloading the pieces from the peers torrent will compare the hash of the pieces to verify whether the downloaded file is genuine/correct one.

  • @snoopax3831
    @snoopax3831 2 หลายเดือนก่อน

    tu viens de sauver mon ppex brother

  • @gunahawk6893
    @gunahawk6893 2 ปีที่แล้ว

    Hi bro, iam planning to learn backend then lld and hld, but since iam from python background do you think is it better to learn fastapi ( mircroservices) than django?

    • @AsliEngineering
      @AsliEngineering  2 ปีที่แล้ว +2

      Start with Django and then Fast API

    • @gunahawk6893
      @gunahawk6893 2 ปีที่แล้ว

      @@AsliEngineering thanks got it

  • @jivanmainali1742
    @jivanmainali1742 5 หลายเดือนก่อน

    but how does client knows where to get torrent file from ??

    • @AsliEngineering
      @AsliEngineering  5 หลายเดือนก่อน

      that is what you download from torrent websites like piratebay, torrentz, etc.

  • @deezydoezeet
    @deezydoezeet 20 วันที่ผ่านมา

    I have been nerd-sniped. Now I want to go write the bencode decoder

  • @kwakubiney5175
    @kwakubiney5175 2 ปีที่แล้ว +1

    I found an encoding which looks like "d5:emailld5:where4:home4:addr15:gre@example.comed5:where4:work4:addr12:gre@work.comee4:name14:Grace R. Emlin7:address15:123 Main Streete" . i am finding it difficult to determine if it's a dictionary of lists or not? Also do you know any bencoding parser I could use maybe?

  • @shriduttkothari
    @shriduttkothari 2 ปีที่แล้ว +3

    I love torrent

  • @adityaparasar3959
    @adityaparasar3959 ปีที่แล้ว

    I recently found your youtube channel, this playlist, this cannel is a gem 😍
    Love n respect 🖤🫡