How do I create the magnet of a file without using the torrent app ?
#1
I calculated the SHA-1 of a downloaded file from a torrent, and that number does not match the BTIH
Reply
#2
Please see:
https://pirates-forum.org/Thread-Generat...-from-sha1

This is my understanding. Hope I have got it right.

The Info Hash (BTIH) is that of the .torrent file (metafile).
The contents of the .torrent file itself can be found in the specification below.
https://wiki.theory.org/BitTorrentSpecif..._Structure
You can google for .torrent editor, upload a sample torrent file and view the contents.

The BTIH is the 20-byte SHA-1 digest of the final .torrent file NOT the downloaded file(s).
The .torrent has a lot more info like the trackers, filename(s), SHA-1 of the pieces of the file(s) comprising the torrent etc.
If you wish to write a standalone program, for whatever reason, it needs to do all that work which goes into the creation of .torrent file.

You should be able to get the source of free bittorrent clients depending on the programming language your are using. From that you can try to cull the necessary code.
Reply
#3
Specifically, the Info Hash is the SHA-1 of the info dictionary part of the torrent file, which does not include the tracker announce list or comments.

To generate a magnet from a file, or collection of files, first you would have to generate the bencoded info dictionary as per this specification. The SHA-1 hash of that would be used to generate your magnet link.

All that is purely academic without having a torrent client somewhere seeding the data using a torrent file with the same info hash.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Need help with a Selenium coding problem - Clicking a button using XPath Avantika_Sharmaa24 2 5,794 Aug 21, 2023, 05:34 am
Last Post: Avantika_Sharmaa24
  Cannot display one data column using reg query RobertX 0 5,750 Apr 25, 2023, 07:24 am
Last Post: RobertX
  looking to create onion site lancerackslol 0 9,205 Aug 02, 2022, 11:32 am
Last Post: lancerackslol
  Hex editing a nes console emulator save file thesnare 0 11,053 Feb 20, 2022, 09:25 am
Last Post: thesnare
  Need to create a e-shop on darkweb destructor 2 23,669 Jan 13, 2022, 00:32 am
Last Post: thealmighty580



Users browsing this thread: 1 Guest(s)