Created
September 30, 2015 09:27
-
-
Save mchome/66afd907160df69f2b77 to your computer and use it in GitHub Desktop.
magnet转torrent,依赖种子库
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hashlib | |
import base64 | |
hash = "05153F611B337A378F73F0D32D2C16D362D06BA5" | |
# print type(hash) | |
# print hash | |
sa1 = hash[:2] | |
sa2 = hash[-2:] | |
rs = hash.decode('hex') | |
rs2 = 'bc' + rs + 'torrent' | |
hs = hashlib.sha1() | |
hs.update(rs2) | |
sha1 = hs.hexdigest() | |
b32 = base64.b32encode(rs) | |
#print "salty:" + sa1 + sa2 | |
print "http://bt.box.n0808.com/" + sa1 +"/" + sa2 + "/" + hash + ".torrent" | |
#print "sha1:" + sha1 | |
#已失效 | |
print "http://torrent-cache.bitcomet.org:36869/get_torrent?info_hash=" + hash + "&size=226920869&key=" + sha1 | |
#print "b32:" + b32 | |
print "http://magnet.vuze.com/magnetLookup?hash=" + b32 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment