Guest User

Untitled

a guest
Jan 19th, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. API = {
  2. 'apply': BASE_URL+'/api/v1/system/apply',
  3. 'login': BASE_URL+'/api/v1/system/login',
  4. 'service_ssh': BASE_URL+'/api/v1/service/ssh',
  5. }
  6.  
  7.  
  8. def apply():
  9. response = requests.post(API['apply'], headers=headers, verify=False)
  10. result = json.loads(response.content.decode('utf-8'))
  11. if result['data']['sucess']:
  12. return result['data']['config_hash']
  13.  
  14. return False
Add Comment
Please, Sign In to add comment