Commit 5f9d7581 authored by Maxime Gasselin's avatar Maxime Gasselin Committed by Vincent A

[societegenerale] Handle VK with decoded grid for ent

The grid data is now handled seperatly between pro and ent.
parent 57d2a4ee
......@@ -141,8 +141,7 @@ class LoginEntPage(SGPEPage, PasswordPage):
def get_keyboard_data(self):
infos = self.get_keyboard_infos()
infos['grid'] = self.decode_grid(infos)
infos['grid'] = self.get_grid_data(infos)
url = self.get_url('/vk/gen_ui?modeClavier=0&cryptogramme=' + infos['crypto'])
img = Captcha(BytesIO(, infos)
......@@ -158,6 +157,10 @@ class LoginEntPage(SGPEPage, PasswordPage):
'img': img,
def get_grid_data(self, infos):
# For ent the grid is already decoded
return infos['grid']
def get_authentication_url(self):
return self.browser.absurl('/authent.html')
......@@ -178,6 +181,10 @@ class LoginEntPage(SGPEPage, PasswordPage):
class MainProPage(LoginEntPage):
def get_grid_data(self, infos):
# The grid are in b64
return self.decode_grid(infos)
def get_authentication_url(self):
return self.browser.absurl('/sec/vk/authent.json')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment