russdill / juniper-vpn-py

Python Juniper VPN Authenticator
GNU Lesser General Public License v2.1
103 stars 80 forks source link

Unknown form type frm #21

Open TTimo opened 8 years ago

TTimo commented 8 years ago

I am getting the following error when running the script, any suggestions?

Traceback (most recent call last):
  File "./juniper-vpn.py", line 359, in <module>
    jvpn.run()
  File "./juniper-vpn.py", line 162, in run
    action = self.next_action()
  File "./juniper-vpn.py", line 155, in next_action
    raise Exception('Unknown form type:', form.name)
Exception: ('Unknown form type:', 'frm')
ghost commented 8 years ago

I also get this exact error.

TTimo commented 8 years ago

If I patch up the code to skip the unknown forms rather than abort, I get an endless loop of

skip unknown form type: frm
skip unknown form type: frmwelcome
skip unknown form type: frmcompat
skip unknown form type: frm
[..]

The first form to fail looks like this:

<frm GET https://[VPNHOST]/dana-na/auth/remediate.cgi application/x-www-form-urlencoded
  <HiddenControl(action=) (readonly)>
  <HiddenControl(signinId=url_0) (readonly)>
  <HiddenControl(realmId=) (readonly)>
  <HiddenControl(executedStep=preauth) (readonly)>
  <HiddenControl(stateId=) (readonly)>
  <HiddenControl(p=) (readonly)>
  <HiddenControl(showContinue=1) (readonly)>
  <HiddenControl(showRemedOption=0) (readonly)>
  <HiddenControl(hostcheckTS=) (readonly)>
  <HiddenControl(totalseconds=) (readonly)>
  <HiddenControl(executedAction=) (readonly)>>

I see 'preauth' .. is that step screwing me up?

ntunes commented 5 years ago

There is a commit in one of the forks that fixes this. https://github.com/pavelkogan/juniper-vpn-py/commit/ee20a42a64526981d5581e50677bb864095f8ab9