Exception raised. Related to "cryptography" library.
Steps to reproduce
run shell inside needle
needle error logs
Ensure verbose and debug mode are enabled:
[needle] > set VERBOSE True
VERBOSE => True
[needle] > set DEBUG True
DEBUG => True
[needle] > shell
[*] Spawning a shell...
[*] Checking connection with device...
[V] Connection not present, creating a new instance
[V] Setting up USB port forwarding on port 2222
[D] [LOCAL CMD] Local Subprocess Command: /Users/nitin/Documents/scripts/needle/needle/libs/usbmuxd/tcprelay.py -t 22:2222
[V] Setting up SSH connection...
[!] Problem establishing connection: Exception - Could not open a connection to 127.0.0.1. ValueError - Multibackend cannot be initialized with no backends. If you are seeing this error when trying to use default_backend() please try uninstalling and reinstalling cryptography. .
------------------------------------------------------------
Traceback (most recent call last):
File "/Users/nitin/Documents/scripts/needle/needle/core/framework/framework.py", line 633, in _connection_new
self._spawn_device()
File "/Users/nitin/Documents/scripts/needle/needle/core/framework/framework.py", line 628, in _spawn_device
self.device = Framework.device = Device(IP, PORT, USERNAME, PASSWORD, self.TOOLS_LOCAL)
File "/Users/nitin/Documents/scripts/needle/needle/core/device/device.py", line 63, in __init__
self.connect()
File "/Users/nitin/Documents/scripts/needle/needle/core/device/device.py", line 218, in connect
self._connect_ssh()
File "/Users/nitin/Documents/scripts/needle/needle/core/device/device.py", line 101, in _connect_ssh
raise Exception('Could not open a connection to %s. %s - %s' % (self._ip, type(e).__name__, e.message))
Exception: Could not open a connection to 127.0.0.1. ValueError - Multibackend cannot be initialized with no backends. If you are seeing this error when trying to use default_backend() please try uninstalling and reinstalling cryptography.
------------------------------------------------------------
[!] Exception: Could not open a connection to 127.0.0.1. ValueError - Multibackend cannot be initialized with no backends. If you are seeing this error when trying to use default_backend() please try uninstalling and reinstalling cryptography.
Issue
Expected behaviour
drop a remote shell on the device
Actual behaviour
Exception raised. Related to "cryptography" library.
Steps to reproduce
needle error logs
Ensure verbose and debug mode are enabled:
Environment
OS X 10.11.6
Python 2.7.10
Python Packages (
pip freeze
)iOS 9.3.3
Notes
Looks like a monkey patch is available from here: [https://github.com/pyca/cryptography/issues/2039]