schlatterbeck / snxvpn

Command-line utility to connect to a Checkpoint SSL VPN
Other
66 stars 59 forks source link

Crypto.RSA Key Error 'size' #21

Open manuelcoppotelli opened 5 years ago

manuelcoppotelli commented 5 years ago

I suddenly have this error when trying to connect to a Checkpoint gateway. Up to yesterday every was working like a charm, since today I get the following error. What can it be?

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/Crypto/PublicKey/RSA.py", line 121, in __getattr__
    return int(self._key[attrname])
KeyError: 'size'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/snxconnect", line 4, in <module>
    __import__('pkg_resources').run_script('snxvpn==1.2', 'snxconnect')
  File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 666, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1453, in run_script
    exec(script_code, namespace, namespace)
  File "/usr/local/lib/python3.7/site-packages/snxvpn-1.2-py3.7.egg/EGG-INFO/scripts/snxconnect", line 5, in <module>
  File "/usr/local/lib/python3.7/site-packages/snxvpn-1.2-py3.7.egg/snxconnect.py", line 555, in main
  File "/usr/local/lib/python3.7/site-packages/snxvpn-1.2-py3.7.egg/snxconnect.py", line 209, in login
  File "/usr/local/lib/python3.7/site-packages/snxvpn-1.2-py3.7.egg/snxconnect.py", line 412, in encrypt
  File "/usr/local/lib/python3.7/site-packages/snxvpn-1.2-py3.7.egg/snxconnect.py", line 393, in pad
  File "/usr/local/lib/python3.7/site-packages/Crypto/PublicKey/RSA.py", line 123, in __getattr__
    raise AttributeError(attrname)
AttributeError: size
manuelcoppotelli commented 5 years ago

I solved it using the following commands:

pip uninstall pycrypto
pip install pycrypto==2.6