浏览代码

display torrent content util

master
Robin Thoni 8 年前
父节点
当前提交
d6b63d5695
共有 1 个文件被更改,包括 11 次插入0 次删除
  1. 11
    0
      display-torrent.py

+ 11
- 0
display-torrent.py 查看文件

@@ -0,0 +1,11 @@
1
+#! /usr/bin/env python
2
+import sys
3
+import bencode
4
+
5
+torrentIn = sys.argv[1]
6
+
7
+with open(torrentIn, 'rb') as f:
8
+    bencoded = f.read()
9
+data = bencode.bdecode(bencoded)
10
+data['info']['pieces'] = []
11
+print(data)

正在加载...
取消
保存