make getpeername() return the original socket address which before it was intercepted
[hband-tools.git] / user-tools / json2bencode
blob1f9f5e100d5b74921c2fceaf8d3acefea4e5f026
1 #!/usr/bin/env python
3 """
4 =pod
6 =head1 NAME
8 json2bencode - Convert JSON to Bencode (BitTorrent's loosely structured data)
10 =cut
12 """
14 import sys
15 import json
16 import bencode
18 json.stdout.write(bencode.bencode(json.load(sys.stdin)))