2015-02-11 09:18:31 +00:00
|
|
|
from __future__ import print_function
|
2015-02-11 00:50:32 +00:00
|
|
|
import sys, json
|
2015-02-11 09:18:31 +00:00
|
|
|
from wormhole.transcribe import Receiver
|
2015-02-11 00:50:32 +00:00
|
|
|
|
|
|
|
APPID = "lothar.com/wormhole/text-xfer"
|
|
|
|
|
|
|
|
# we're receiving
|
|
|
|
code = sys.argv[1]
|
2015-02-11 09:18:31 +00:00
|
|
|
blob = b"{}"
|
2015-02-11 02:34:13 +00:00
|
|
|
r = Receiver(APPID, blob, code)
|
|
|
|
them_bytes = r.get_data()
|
2015-02-11 00:50:32 +00:00
|
|
|
them_d = json.loads(them_bytes.decode("utf-8"))
|
|
|
|
print(them_d["message"])
|