Explorar el Código

display torrent content util

master
Robin Thoni hace 8 años
padre
commit
d6b63d5695
Se han modificado 1 ficheros con 11 adiciones y 0 borrados
  1. 11
    0
      display-torrent.py

+ 11
- 0
display-torrent.py Ver fichero

@@ -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…
Cancelar
Guardar