Browse Source

display torrent content util

master
Robin Thoni 9 years ago
parent
commit
d6b63d5695
1 changed files with 11 additions and 0 deletions
  1. 11
    0
      display-torrent.py

+ 11
- 0
display-torrent.py View File

@@ -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)

Loading…
Cancel
Save