Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- curl -k "https://192.168.2.1/api/login?username=admin&password=admin"
- buffer = BytesIO()
- c = pycurl.Curl()
- c.setopt(c.URL, 'https://192.168.2.1/api/login?username=admin&password=admin')
- c.setopt(c.WRITEDATA, buffer)
- c.perform()
- c.close()
- body = buffer.getvalue()
- # Body is a byte string.
- # We have to know the encoding in order to print it to a text file
- # such as standard output.
- print(body.decode("iso-8859-1"))
- pycurl.error, (60, 'server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none')
Add Comment
Please, Sign In to add comment