Skip to content

Instantly share code, notes, and snippets.

@akashjobanputra
Created May 24, 2018 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akashjobanputra/9f92cdb76da8bfeb71d1a4d7d7847690 to your computer and use it in GitHub Desktop.
Save akashjobanputra/9f92cdb76da8bfeb71d1a4d7d7847690 to your computer and use it in GitHub Desktop.
Sophos Network Access Login script to avoid logging in from Browser every hour
import requests
import time
localtime = int(time.time())
r = requests.post('http://COPERNICUS_HOST:PORT/login.xml', data={
'username': 'PLAINTEXT_USERNAME',
'password': 'PLAINTEXT_PASSWORD',
'mode': 191,
'producttype': 0,
'a': localtime
})
print(r.text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment