magnet2torrent (126B)
1 #!/bin/bash 2 [[ "$1" =~ xt=urn:btih:([^&/]+) ]] || exit 1 3 echo "d10:magnet-uri${#1}:${1}e" > "meta-${BASH_REMATCH[1]}.torrent"