Skip to content

Instantly share code, notes, and snippets.

@afaqk9394
Created March 4, 2020 23:06
Show Gist options
  • Save afaqk9394/6e342a1bebdbde93a6cd4ee5d67ca9d8 to your computer and use it in GitHub Desktop.
Save afaqk9394/6e342a1bebdbde93a6cd4ee5d67ca9d8 to your computer and use it in GitHub Desktop.
import requests, json
data = { 'username' : 'root', 'password' : 'default' }
r = requests.post('https://address.of.opengear/api/v1/sessions/', json.dumps(data), verify=False)
token = json.loads(r.text)['session']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment