diff --git a/bin/receive_text.py b/bin/receive_text.py index 85806c4..a374602 100644 --- a/bin/receive_text.py +++ b/bin/receive_text.py @@ -7,8 +7,8 @@ APPID = "lothar.com/wormhole/text-xfer" # we're receiving start = time.time() code = sys.argv[1] -blob = b"{}" -r = Receiver(APPID, blob, code) +data = json.dumps({"message": "ok"}).encode("utf-8") +r = Receiver(APPID, data, code) them_bytes = r.get_data() them_d = json.loads(them_bytes.decode("utf-8")) print(them_d["message"]) diff --git a/bin/send_text.py b/bin/send_text.py index ffdacc5..034c051 100644 --- a/bin/send_text.py +++ b/bin/send_text.py @@ -6,9 +6,9 @@ APPID = "lothar.com/wormhole/text-xfer" # we're sending message = sys.argv[1] -blob = json.dumps({"message": message, +data = json.dumps({"message": message, }).encode("utf-8") -i = Initiator(APPID, blob) +i = Initiator(APPID, data) code = i.get_code() print("Wormhole code is '%s'" % code) print("On the other computer, please run:")