Skip to content

Instantly share code, notes, and snippets.

@desyncr
Created January 1, 2014 23:34
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save desyncr/8212874 to your computer and use it in GitHub Desktop.
Save desyncr/8212874 to your computer and use it in GitHub Desktop.
Script to create a .torrent file from a magnet link. Adapted from https://wiki.archlinux.org/index.php/Rtorrent
#!/bin/bash
[[ "$1" =~ xt=urn:btih:([^&/]+) ]] || exit;
echo "d10:magnet-uri${#1}:${1}e" > "meta-${BASH_REMATCH[1]}.torrent"
@achernar
Copy link

a php version would be great

@mauricioprado00
Copy link

does not seems to work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment