tncc-emulate: HTTP 408 timeout on renew
I can connect to our PulseConnect vpn successfully, using 2FA and the tncc-emulate.py
script from current master 64e97762:
sudo openconnect --protocol nc --user myusername --csd-wrapper ~/openconnect/trojans/tncc-emulate.py --useragent="Mozilla/5.0 (Linux) Firefox" https://vpn.example.com
After some 20(?) minutes however the connection aborts with the following log. I suppose this happens when the server requests a re-evaluation of tncc.
Traceback (most recent call last):
File "/home/myuser/openconnect/trojans/tncc-emulate.py", line 692, in <module>
server.process_cmd()
File "/home/myuser/openconnect/trojans/tncc-emulate.py", line 612, in process_cmd
cookie = self.tncc.get_cookie(args['Cookie'],
File "/home/myuser/openconnect/trojans/tncc-emulate.py", line 507, in get_cookie
self.r = self.br.open('https://' + self.vpn_host + self.path + 'hc/tnchcupdate.cgi', post_data)
File "/usr/lib/python3.8/site-packages/mechanize/_mechanize.py", line 253, in open
return self._mech_open(url_or_request, data, timeout=timeout)
File "/usr/lib/python3.8/site-packages/mechanize/_mechanize.py", line 309, in _mech_open
raise response
mechanize._response.httperror_seek_wrapper: HTTP Error 408: Request Timeout Server hat die Verbindung abgebrochen (Sitzung abgelaufen)
GET https://vpn.example.com/dana-na/auth/logout.cgi
SSL-Verhandlung mit vpn.example.com
Connected to HTTPS on vpn.example.com with ciphersuite (TLS1.2)-(ECDHE-SECP256R1)-(RSA-SHA512)-(AES-128-GCM)
HTTP-Antwort erhalten: HTTP/1.1 302 Moved
Abmelden war erfolgreich.
RTNETLINK answers: No such process
RTNETLINK answers: No such process
Unbekannter Fehler. Abbruch.