Update client.py

This commit is contained in:
Tim Chan
2017-04-04 20:08:07 +10:00
committed by GitHub
parent d7f2bb3e8b
commit de6880d933

View File

@@ -229,7 +229,7 @@ class Client(object):
data['login'] = 'Log In'
r = self._cleanPost(LoginURL, data)
log.info(r.text)
if 'checkpoint' in r.url:
r = self._2FA(r)
@@ -237,8 +237,6 @@ class Client(object):
if 'save-device' in r.url:
r = self._cleanGet(SaveDeviceURL)
log.info(r.url)
if 'home' in r.url:
self._post_login()
return True
@@ -257,8 +255,6 @@ class Client(object):
log.info('Submitting 2FA code')
r = self._cleanPost(CheckpointURL, data)
log.info(r.url)
if 'home' in r.url:
return r
@@ -271,7 +267,6 @@ class Client(object):
log.info('Saving browser') #At this stage, we have dtsg, nh, name_action_selected, submit[Continue]
r = self._cleanPost(CheckpointURL, data)
log.info(r.url)
if 'home' in r.url:
return r
@@ -279,7 +274,6 @@ class Client(object):
log.info(data.values()) #At this stage, we have dtsg, nh, submit[Continue]
r = self._cleanPost(CheckpointURL, data)
log.info(r.url)
if 'home' in r.url:
return r
@@ -288,7 +282,6 @@ class Client(object):
log.info('Verifying login attempt') #At this stage, we have dtsg, nh, submit[This was me]
r = self._cleanPost(CheckpointURL, data)
log.info(r.url)
if 'home' in r.url:
return r
@@ -297,8 +290,6 @@ class Client(object):
data['name_action_selected'] = 'save_device'
log.info('Saving device again') #At this stage, we have dtsg, nh, submit[Continue], name_action_selected
r = self._cleanPost(CheckpointURL, data)
log.info(r.url)
return r
def saveSession(self, sessionfile):