mirror of
https://github.com/r4sas/PBinCLI
synced 2025-02-03 10:25:11 +00:00
Bug fix, urlencode
This commit is contained in:
parent
0343e318fb
commit
d92816a22b
@ -7,6 +7,7 @@ from pbincli.sjcl_gcm import SJCL
|
||||
from pbincli.transports import privatebin
|
||||
from pbincli.utils import PBinCLIException, check_readable, check_writable
|
||||
from zlib import compress
|
||||
import json
|
||||
|
||||
def send(args):
|
||||
""" Sub-command for sending paste """
|
||||
@ -24,7 +25,11 @@ def send(args):
|
||||
password = passphrase + p.hexdigest().encode("UTF-8")
|
||||
|
||||
data = SJCL().encrypt(file, password)
|
||||
request = "data={}&expire={}&formatter={}&burnafterreading={}&opendiscussion={}".format(data, args.expire, args.format, int(args.burn), int(args.discus))
|
||||
#request = "data={}&expire={}&formatter={}&burnafterreading={}&opendiscussion={}".format(json.dumps(data, ensure_ascii=False), args.expire, args.format, int(args.burn), int(args.discus))
|
||||
request = {'data':json.dumps(data, ensure_ascii=False),'expire':args.expire,'formatter':args.format,'burnafterreading':int(args.burn),'opendiscussion':int(args.discus)
|
||||
}
|
||||
print(request)
|
||||
|
||||
'''Here we must run function post from pbincli.transports'''
|
||||
print(request)
|
||||
privatebin().post(request)
|
||||
|
@ -1,7 +1,7 @@
|
||||
import requests
|
||||
import json
|
||||
import urllib
|
||||
|
||||
from pprint import pprint
|
||||
class privatebin(object):
|
||||
|
||||
def __init__(self):
|
||||
@ -13,4 +13,4 @@ class privatebin(object):
|
||||
r = requests.post(url=self.server, headers=self.headers, proxies=self.proxies, data=data)
|
||||
print(r.request)
|
||||
print(r.status_code)
|
||||
print(r.text)
|
||||
print(r.text)
|
||||
|
Loading…
x
Reference in New Issue
Block a user