[wip][v2] json bytes2str in decode (#13)
This commit is contained in:
@@ -33,6 +33,7 @@ def send(args, api_client):
|
||||
|
||||
request = paste.getJSON()
|
||||
|
||||
if args.debug: print("Passphrase:\t{}".format(paste.getHash()))
|
||||
if args.debug: print("Request:\t{}".format(request))
|
||||
|
||||
# If we use dry option, exit now
|
||||
@@ -89,10 +90,12 @@ def get(args, api_client):
|
||||
print("Paste received!")
|
||||
|
||||
version = result['v'] if 'v' in result else 1
|
||||
if args.debug: print("Paste version:\t{}\n".format(version))
|
||||
paste.setVersion(version)
|
||||
|
||||
if version == 2:
|
||||
if args.debug: print("Message:\t{}\nAuthentication data:\t{}".format(result['ct'], result['adata']))
|
||||
#if args.debug: print("Message:\t{}\nAuthentication data:\t{}".format(result['ct'], result['adata']))
|
||||
if args.debug: print("Authentication data:\t{}".format(result['adata']))
|
||||
|
||||
paste.setHash(passphrase)
|
||||
paste.loadJSON(result)
|
||||
|
||||
Reference in New Issue
Block a user