This commit is contained in:
r4sas
2019-06-21 13:12:17 +00:00
parent f5ef4bbc03
commit 85cc1454ea
4 changed files with 15 additions and 13 deletions

View File

@@ -1,4 +1,3 @@
from sys import exit
from pbincli.format import Paste
def send(args, api_client):
@@ -77,7 +76,7 @@ def get(args, api_client):
try:
pasteid, passphrase = args.pasteinfo.split("#")
except ValueError as err:
except:
print("PBinCLI error: provided info hasn't contain valid PasteID#Passphrase string")
exit(1)
@@ -123,7 +122,7 @@ def get(args, api_client):
check_writable(filename)
with open(filename, "wb") as f:
f.write(text)
f.close
f.close()
attachment, attachment_name = paste.getAttachment()
@@ -133,7 +132,7 @@ def get(args, api_client):
check_writable(attachment_name)
with open(attachment_name, "wb") as f:
f.write(attachment)
f.close
f.close()
if version == 1 and 'meta' in result and 'burnafterreading' in result['meta'] and result['meta']['burnafterreading']:
print("Burn afrer reading flag found. Deleting paste...")