Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac&Kali: SSH Connection Dropped. No handlers could be found for logger "paramiko.transport" #274

Open
akasandra opened this issue Jun 17, 2019 · 4 comments

Comments

@akasandra
Copy link

Issue

Expected behaviour

Should tell me os_version

Actual behaviour

Prints error "Connection dropped", Needle Agent reports "Disconnected" after os_version received

Steps to reproduce

  1. python needle-cli.py -g DEBUG=True -g IP=172.20.10.1 -g PORT=4444 -m binary/info/metadata -m device/agent_client#COMMAND=OS_VERSION

needle error logs

DEBUG => True
IP => 172.20.10.1
PORT => 4444
[+] MODULE => binary/info/metadata
[D] Setup local output folder: /home/noob/.needle/output
[?] Attention! The folder chosen to store local output is not empty: /home/noob/.needle/output
[?] Do you want to back it up first?
[?] Y: the content will be archived in a different location, then the folder will be emptied
[?] N: no action will be taken (destination files might be overwritten in case of filename clash)                                                                                           
[y/n]: y
[V] Archiving local output folder: /home/noob/.needle/output --> /home/noob/.needle/backup/needle-output_2019-06-17-11:55:59
[D] Copying: /home/noob/.needle/output -> /home/noob/.needle/backup/needle-output_2019-06-17-11:55:59
[D] Deleting: /home/noob/.needle/output
[D] Creating local output folder: /home/noob/.needle/output
[D] Setting up issues database...
[D] [DB] QUERY: CREATE TABLE IF NOT EXISTS issues (app TEXT, module TEXT, name TEXT, content TEXT, confidence TEXT, outfile TEXT)
[D] Setting up issues database...
[D] [DB] QUERY: CREATE TABLE IF NOT EXISTS issues (app TEXT, module TEXT, name TEXT, content TEXT, confidence TEXT, outfile TEXT)
[*] Checking connection with device...
[V] Connection not present, creating a new instance
[V] [AGENT] Connecting to agent (172.20.10.1:4444)...
[+] [AGENT] Successfully connected to agent (172.20.10.1:4444)...
[D] [AGENT] Executing command: os_version
[V] [SSH] Connecting (172.20.10.1:4444)...
No handlers could be found for logger "paramiko.transport"
[!] Problem establishing connection: Exception - Connection dropped. Please check your connection with the device, and reload the module. SSHException: Error reading SSH protocol banner[Errno 104] Connection reset by peer 
------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/noob/needle/needle/core/framework/framework.py", line 641, in _connection_new
    self.device.connect()
  File "/mnt/noob/needle/needle/core/device/device.py", line 219, in connect
    self.ssh = self._connect_ssh()
  File "/mnt/noob/needle/needle/core/device/device.py", line 93, in _connect_ssh
    'and reload the module. %s: %s' % (type(e).__name__, e.message))
Exception: Connection dropped. Please check your connection with the device, and reload the module. SSHException: Error reading SSH protocol banner[Errno 104] Connection reset by peer
------------------------------------------------------------
[!] Exception: Connection dropped. Please check your connection with the device, and reload the module. SSHException: Error reading SSH protocol banner[Errno 104] Connection reset by peer
[V] [SSH] Disconnecting...
[V] [AGENT] Disconnecting from agent...

Environment

Connection type: WiFi Hotspot from iPhone (172.20.10.1 is iPhone)

JB: u0

Needle Version

  • Framework (on your machine): 1.3.2
  • Agent (on your device): 1.0.5

Workstation Operating System

Latest Mac
Latest Kali

Dependencies as instructed in Readme

Python Version

2.7

Python Packages (pip freeze)

adns-python==1.2.1
alembic==1.0.0.dev0
argcomplete==1.8.1
argh==0.26.2
asn1crypto==0.24.0
atomicwrites==1.1.5
attrs==18.2.0
autobahn==17.10.1
Automat==0.6.0
Babel==2.6.0
backports-abc==0.5
backports.functools-lru-cache==1.5
backports.ssl-match-hostname==3.5.0.1
BBQSQL==1.0
bcrypt==3.1.6
bdfproxy==0.0.0
beautifulsoup4==4.7.1
biplist==1.0.3
BlindElephant==1.0
blinker==1.4
bottle==0.12.15
brotlipy==0.6.0
cbor==1.0.0
certifi==2018.8.24
cffi==1.12.3
Chameleon==2.24
chardet==3.0.4
CherryTree==0.38.8
## FIXME: could not find svn URL in dependency_links for this package:
chirp===daily-20190104
click==6.7
colorama==0.3.7
ConfigArgParse==0.11.0
configobj==5.0.6
configparser==3.5.0b2
constantly==15.1.0
construct==2.5.3
cryptography==1.5.3
cssselect==1.0.3
cssutils==1.0.2
Cython==0.29.2
deprecation==2.0.6
dhcpig==0.0.0
dicttoxml==1.7.4
distorm3==3.4.1
Django==1.11.21
dnslib==0.9.7
dnspython==1.16.0
docutils==0.14
easygui==0.96
EditorConfig==0.12.1
Elixir==0.7.1
entrypoints==0.3
enum34==1.1.6
et-xmlfile==1.0.1
faradaysec==3.8.0
feedparser==5.2.1
filedepot==0.5.2
filteralchemy==0.1.0
Flask==0.11.1
Flask-BabelEx==0.9.3
Flask-Classful==0.14.1
Flask-Login==0.4.1
Flask-Mail==0.9.1
Flask-Principal==0.4.0
Flask-Restless==0.17.0
Flask-Security==3.0.0
Flask-Session==0.3.1
Flask-SQLAlchemy==2.1
Flask-WTF==0.14.2
FormEncode==1.3.0
frida==12.6.6
funcsigs==1.0.2
fuse-python==0.3.1
future==0.16.0
futures==3.2.0
GDAL==2.3.2
GeoIP==1.3.2
gevent==1.3.7
gpg==1.12.0
greenlet==0.4.15
h2==2.4.4
hpack==2.3.0
html2text==2016.9.19
html5lib==1.0.1
httplib2==0.11.3
hupper==1.5
hyperframe==4.0.2
hyperlink==17.3.1
idna==2.6
impacket==0.9.19
incremental==16.10.1
ipaddress==1.0.17
IPy==0.83
itsdangerous==0.24
jdcal==1.0
Jinja2==2.10
jsbeautifier==1.6.4
jsonpickle==0.9.5
jsonrpclib==0.1.7
keyring==17.1.1
keyrings.alt==3.1.1
killerbee==1.0
ldap3==2.5.1
ldapdomaindump==0.9.1
lxml==3.6.0
lz4==1.1.0
M2Crypto==0.31.0
Mako==1.0.7
MarkupSafe==1.1.0
marshmallow==3.0.0b3
marshmallow-sqlalchemy==0.14.1
mechanize==0.2.5
mercurial==4.8.2
metaconfig==0.1.4a1
mimerender==0.6.0
mitmproxy==0.18.3
more-itertools==4.2.0
msgpack==0.5.6
mysqlclient==1.3.10
netaddr==0.7.19
NfSpy==1.0
nplusone==1.0.0
numpy==1.16.2
olefile==0.46
openpyxl==2.4.9
packaging==19.0
paramiko==2.4.2
passlib==1.6.5
Paste==3.0.6
PasteDeploy==2.0.1
PasteScript==2.0.2
pathlib2==2.3.3
pathtools==0.1.2
pcapy==0.10.8
peepdf==0.4.2
pefile==2018.8.8
pexpect==4.6.0
Pillow==3.4.2
plaster==1.0
plaster-pastedeploy==0.5
pluggy==0.8.0
prettytable==0.7.2
psycopg2==2.7.7
py==1.7.0
py-ubjson==0.12.0
pyasn1==0.1.9
pyasn1-modules==0.2.1
pycairo==1.16.2
pycparser==2.19
pycrypto==2.6.1
pycryptodomex==3.6.1
pycurl==7.43.0.2
pydns==2.3.6
pydot==1.4.1
pyenchant==2.0.0
Pygments==2.3.1
PyGObject==3.30.4
pygtkspellcheck==4.0.5
pyinotify==0.9.6
pylibemu==0.3.3
pymongo==3.7.1
pymssql==2.1.4
PyNaCl==1.3.0
pyOpenSSL==16.2.0
pyparsing==2.1.10
PyPDF2==1.26.0
pyperclip==1.5.32
pyquery==1.2.9
pyramid==1.10.2
pyrit==0.5.1
pyscard==1.9.7
pyserial==3.4
PySocks==1.6.8
pysqlite==2.7.0
pytest==3.10.1
python-dateutil==2.7.3
python-editor==1.0.3
python-Levenshtein==0.12.0
python-magic==0.4.16
python-mimeparse==0.1.4
python-openid==2.2.5
python-slugify==2.0.1
python-snappy==0.5.3
pythonaes==1.0
PyTrie==0.2
pytz==2019.1
pyusb==1.0.2
PyV8==1.0.dev0
PyX==0.12.1
pyxdg==0.25
PyYAML==3.13
qrcode==6.1
readline==6.2.4.1
repoze.lru==0.7
requests==2.11.1
rfidiot==1.0
roman==2.0.0
scandir==1.9.0
scapy==2.4.0
scgi==1.13
SecretStorage==2.3.1
selenium==3.14.1
service-identity==16.0.0
simplejson==3.16.0
singledispatch==3.4.0.3
sipvicious==0.2.8
six==1.10.0
slowaes==0.1a1
soupsieve==1.8
speaklater==1.3
SQLAlchemy==1.3.1
sqlalchemy-schemadisplay==1.3
sqlparse==0.2.4
sshtunnel==0.1.5
tcpwatch==1.3.1
Tempita==0.5.2
tornado==4.4.3
tqdm==4.28.1
translationstring==1.3
trollius==2.0.1
Twisted==18.9.0
txaio==2.10.0
typing==3.5.2.2
u-msgpack-python==2.1
unicodecsv==0.14.1
Unidecode==1.0.23
urllib3==1.24.1
urwid==1.3.1
uTidylib==0.5
venusian==1.2.0
vinetto==0.7b0
volatility==2.6
waitress==1.2.0b2
watchdog==0.8.3
webargs==5.1.2
webencodings==0.5.1
WebOb==1.8.5
websocket-client==0.53.0
WebTest==2.0.32
webunit==1.3.10
Werkzeug==0.14.1
wifite==2.2.5
wsaccel==0.6.2
WTForms==2.2.1
wxPython==3.0.2.0
wxPython-common==3.0.2.0
XlsxWriter==1.1.2
xmlbuilder==1.0
yara-python==3.9.0
zenmap==7.70
zim==0.68
zope.component==4.3.0
zope.deprecation==4.4.0
zope.event==4.2.0
zope.hookable==4.0.4
zope.interface==4.3.2

Device iOS Version

iOS 12.1.2

@akasandra
Copy link
Author

The error is unrelated to how i connect to the iPhone. I've tried connect my devices to the same network instead of sharing WiFi from the phone.

@7a
Copy link

7a commented Sep 13, 2019

Any solution to this? I have the same error, also noted the following issues while installing the dependencies in the latest Kali, iDevice: iOS 12.4:

Failed building wheel for lxml
Failed building wheel for cryptography

Full trace, including SSH connection exception, on the Phone I did /usr/sbin/sshd -p 2222, so there was a listener there.

sudo pip install readline paramiko sshtunnel frida mitmproxy biplist
Requirement already satisfied: readline in /usr/local/lib/python2.7/dist-packages (6.2.4.1)
Requirement already satisfied: paramiko in /usr/lib/python2.7/dist-packages (2.6.0)
Requirement already satisfied: sshtunnel in /usr/local/lib/python2.7/dist-packages (0.1.5)
Requirement already satisfied: frida in /usr/local/lib/python2.7/dist-packages (12.6.23)
Collecting mitmproxy
  Using cached https://files.pythonhosted.org/packages/17/da/379f058c599691efeb68fe671cefc25bccd3cd372d537cd3f542909cd059/mitmproxy-0.18.3-py2.py3-none-any.whl
Collecting biplist
Requirement already satisfied: tornado<4.5,>=4.3 in /usr/local/lib/python2.7/dist-packages (from mitmproxy) (4.4.3)
Requirement already satisfied: brotlipy<0.7,>=0.5.1 in /usr/local/lib/python2.7/dist-packages (from mitmproxy) (0.6.0)
Requirement already satisfied: configargparse<0.12,>=0.10 in /usr/local/lib/python2.7/dist-packages (from mitmproxy) (0.11.0)
Collecting lxml<=3.6.0,>=3.5.0 (from mitmproxy)
  Using cached https://files.pythonhosted.org/packages/11/1b/fe6904151b37a0d6da6e60c13583945f8ce3eae8ebd0ec763ce546358947/lxml-3.6.0.tar.gz
Collecting pyparsing<2.2,>=2.1.3 (from mitmproxy)
  Using cached https://files.pythonhosted.org/packages/2b/f7/e5a178fc3ea4118a0edce2a8d51fc14e680c745cf4162e4285b437c43c94/pyparsing-2.1.10-py2.py3-none-any.whl
Collecting Flask<0.12,>=0.10.1 (from mitmproxy)
  Using cached https://files.pythonhosted.org/packages/63/2b/01f5ed23a78391f6e3e73075973da0ecb467c831376a0b09c0ec5afd7977/Flask-0.11.1-py2.py3-none-any.whl
Collecting requests<2.12,>=2.9.1 (from mitmproxy)
  Using cached https://files.pythonhosted.org/packages/ea/03/92d3278bf8287c5caa07dbd9ea139027d5a3592b0f4d14abf072f890fab2/requests-2.11.1-py2.py3-none-any.whl
Collecting urwid<1.4,>=1.3.1 (from mitmproxy)
Collecting watchdog<0.9,>=0.8.3 (from mitmproxy)
Collecting six<1.11,>=1.10 (from mitmproxy)
  Using cached https://files.pythonhosted.org/packages/c8/0a/b6723e1bc4c516cb687841499455a8505b44607ab535be01091c0f24f079/six-1.10.0-py2.py3-none-any.whl
Collecting cssutils<1.1,>=1.0.1 (from mitmproxy)
Requirement already satisfied: click<7.0,>=6.2 in /usr/local/lib/python2.7/dist-packages (from mitmproxy) (6.7)
Requirement already satisfied: jsbeautifier<1.7,>=1.6.3 in /usr/lib/python2.7/dist-packages (from mitmproxy) (1.6.4)
Collecting h2<2.5,>=2.4.1 (from mitmproxy)
  Using cached https://files.pythonhosted.org/packages/f0/d0/643bb9dbeaad227a5e5e079042c2a6c228520772b4c2e17895e6a3a1c7ff/h2-2.4.4-py2.py3-none-any.whl
Collecting passlib<1.7,>=1.6.5 (from mitmproxy)
  Using cached https://files.pythonhosted.org/packages/2d/a7/1a3363e5d531d438267a79d43d4b8d224655adef489e98fc96678fe16ed1/passlib-1.6.5-py2.py3-none-any.whl
Collecting html2text<=2016.9.19,>=2016.1.8 (from mitmproxy)
Collecting hyperframe<5,>=4.0.1 (from mitmproxy)
  Using cached https://files.pythonhosted.org/packages/85/de/94b7305d2e75a7e0570aa094949be1d4fb4153115afd7443e4bd74cd2e95/hyperframe-4.0.2-py2.py3-none-any.whl
Collecting construct<2.6,>=2.5.2 (from mitmproxy)
Collecting cryptography<1.6,>=1.3 (from mitmproxy)
  Using cached https://files.pythonhosted.org/packages/6c/c5/7fc1f8384443abd2d71631ead026eb59863a58cad0149b94b89f08c8002f/cryptography-1.5.3.tar.gz
Requirement already satisfied: certifi>=2015.11.20.1 in /usr/local/lib/python2.7/dist-packages (from mitmproxy) (2018.1.18)
Collecting pyperclip<1.6,>=1.5.22 (from mitmproxy)
Collecting Pillow<3.5,>=3.2 (from mitmproxy)
  Using cached https://files.pythonhosted.org/packages/c0/47/6900d13aa6112610df4c9b34d57f50a96b35308796a3a27458d0c9ac87f7/Pillow-3.4.2-cp27-cp27mu-manylinux1_x86_64.whl
Collecting pyOpenSSL<17.0,>=16.0 (from mitmproxy)
  Using cached https://files.pythonhosted.org/packages/ac/93/b4cd538d31adacd07f83013860db6b88d78755af1f3fefe68ec22d397e7b/pyOpenSSL-16.2.0-py2.py3-none-any.whl
Collecting pyasn1<0.2,>=0.1.9 (from mitmproxy)
  Using cached https://files.pythonhosted.org/packages/69/be/e8946f7867b84b0e61a613f6fd56f63266190b1a470f945178f7cbc4d0ae/pyasn1-0.1.9-py2.py3-none-any.whl
Collecting backports.ssl-match-hostname<3.6,>=3.5.0.1 (from mitmproxy)
Requirement already satisfied: enum34<2,>=1.0.4; python_version == "2.7" in /usr/lib/python2.7/dist-packages (from mitmproxy) (1.1.6)
Requirement already satisfied: blinker<1.5,>=1.4 in /usr/lib/python2.7/dist-packages (from mitmproxy) (1.4)
Collecting typing==3.5.2.2; python_version == "2.7" (from mitmproxy)
Requirement already satisfied: ipaddress<1.1,>=1.0.15; python_version == "2.7" in /usr/local/lib/python2.7/dist-packages (from mitmproxy) (1.0.19)
Requirement already satisfied: backports-abc>=0.4 in /usr/lib/python2.7/dist-packages (from tornado<4.5,>=4.3->mitmproxy) (0.5)
Requirement already satisfied: singledispatch in /usr/lib/python2.7/dist-packages (from tornado<4.5,>=4.3->mitmproxy) (3.4.0.3)
Requirement already satisfied: cffi>=1.0.0 in /usr/local/lib/python2.7/dist-packages (from brotlipy<0.7,>=0.5.1->mitmproxy) (1.11.5)
Requirement already satisfied: Werkzeug>=0.7 in /usr/lib/python2.7/dist-packages (from Flask<0.12,>=0.10.1->mitmproxy) (0.14.1)
Requirement already satisfied: Jinja2>=2.4 in /usr/lib/python2.7/dist-packages (from Flask<0.12,>=0.10.1->mitmproxy) (2.10.1)
Requirement already satisfied: itsdangerous>=0.21 in /usr/lib/python2.7/dist-packages (from Flask<0.12,>=0.10.1->mitmproxy) (0.24)
Requirement already satisfied: PyYAML>=3.10 in /usr/lib/python2.7/dist-packages (from watchdog<0.9,>=0.8.3->mitmproxy) (3.13)
Collecting pathtools>=0.1.1 (from watchdog<0.9,>=0.8.3->mitmproxy)
Collecting argh>=0.24.1 (from watchdog<0.9,>=0.8.3->mitmproxy)
  Using cached https://files.pythonhosted.org/packages/06/1c/e667a7126f0b84aaa1c56844337bf0ac12445d1beb9c8a6199a7314944bf/argh-0.26.2-py2.py3-none-any.whl
Collecting hpack<3,>=2.2 (from h2<2.5,>=2.4.1->mitmproxy)
  Using cached https://files.pythonhosted.org/packages/c0/df/2c35ce4aa80c5741f894532beed35ce521491164e3aca235890148f38304/hpack-2.3.0-py2.py3-none-any.whl
Requirement already satisfied: idna>=2.0 in /usr/lib/python2.7/dist-packages (from cryptography<1.6,>=1.3->mitmproxy) (2.6)
Requirement already satisfied: setuptools>=11.3 in /usr/lib/python2.7/dist-packages (from cryptography<1.6,>=1.3->mitmproxy) (41.1.0)
Requirement already satisfied: pycparser in /usr/local/lib/python2.7/dist-packages (from cffi>=1.0.0->brotlipy<0.7,>=0.5.1->mitmproxy) (2.18)
Building wheels for collected packages: lxml, cryptography
  Running setup.py bdist_wheel for lxml ... error
  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-BEFwmk/lxml/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-zsnacv --python-tag cp27:
  Building lxml version 3.6.0.
  Building without Cython.
  ERROR: /bin/sh: 1: xslt-config: not found
  
  ** make sure the development packages of libxml2 and libxslt are installed **
  
  Using build configuration of libxslt
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-2.7
  creating build/lib.linux-x86_64-2.7/lxml
  copying src/lxml/pyclasslookup.py -> build/lib.linux-x86_64-2.7/lxml
  copying src/lxml/doctestcompare.py -> build/lib.linux-x86_64-2.7/lxml
  copying src/lxml/__init__.py -> build/lib.linux-x86_64-2.7/lxml
  copying src/lxml/sax.py -> build/lib.linux-x86_64-2.7/lxml
  copying src/lxml/usedoctest.py -> build/lib.linux-x86_64-2.7/lxml
  copying src/lxml/cssselect.py -> build/lib.linux-x86_64-2.7/lxml
  copying src/lxml/_elementpath.py -> build/lib.linux-x86_64-2.7/lxml
  copying src/lxml/builder.py -> build/lib.linux-x86_64-2.7/lxml
  copying src/lxml/ElementInclude.py -> build/lib.linux-x86_64-2.7/lxml
  creating build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/__init__.py -> build/lib.linux-x86_64-2.7/lxml/includes
  creating build/lib.linux-x86_64-2.7/lxml/html
  copying src/lxml/html/clean.py -> build/lib.linux-x86_64-2.7/lxml/html
  copying src/lxml/html/__init__.py -> build/lib.linux-x86_64-2.7/lxml/html
  copying src/lxml/html/ElementSoup.py -> build/lib.linux-x86_64-2.7/lxml/html
  copying src/lxml/html/soupparser.py -> build/lib.linux-x86_64-2.7/lxml/html
  copying src/lxml/html/html5parser.py -> build/lib.linux-x86_64-2.7/lxml/html
  copying src/lxml/html/diff.py -> build/lib.linux-x86_64-2.7/lxml/html
  copying src/lxml/html/defs.py -> build/lib.linux-x86_64-2.7/lxml/html
  copying src/lxml/html/usedoctest.py -> build/lib.linux-x86_64-2.7/lxml/html
  copying src/lxml/html/_html5builder.py -> build/lib.linux-x86_64-2.7/lxml/html
  copying src/lxml/html/_diffcommand.py -> build/lib.linux-x86_64-2.7/lxml/html
  copying src/lxml/html/formfill.py -> build/lib.linux-x86_64-2.7/lxml/html
  copying src/lxml/html/builder.py -> build/lib.linux-x86_64-2.7/lxml/html
  copying src/lxml/html/_setmixin.py -> build/lib.linux-x86_64-2.7/lxml/html
  creating build/lib.linux-x86_64-2.7/lxml/isoschematron
  copying src/lxml/isoschematron/__init__.py -> build/lib.linux-x86_64-2.7/lxml/isoschematron
  copying src/lxml/lxml.etree.h -> build/lib.linux-x86_64-2.7/lxml
  copying src/lxml/lxml.etree_api.h -> build/lib.linux-x86_64-2.7/lxml
  copying src/lxml/includes/tree.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/config.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/xmlerror.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/xslt.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/etreepublic.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/htmlparser.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/relaxng.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/xinclude.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/xmlschema.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/dtdvalid.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/schematron.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/c14n.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/uri.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/xpath.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/xmlparser.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/etree_defs.h -> build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/lxml-version.h -> build/lib.linux-x86_64-2.7/lxml/includes
  creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources
  creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/rng
  copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/rng
  creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl
  copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl
  copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl
  creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
  copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
  copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
  copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
  copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
  copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
  copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
  running build_ext
  building 'lxml.etree' extension
  creating build/temp.linux-x86_64-2.7
  creating build/temp.linux-x86_64-2.7/src
  creating build/temp.linux-x86_64-2.7/src/lxml
  x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-kybPj6/python2.7-2.7.16=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Isrc/lxml/includes -I/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w
  In file included from src/lxml/lxml.etree.c:320:
  src/lxml/includes/etree_defs.h:14:10: fatal error: libxml/xmlversion.h: No such file or directory
     14 | #include "libxml/xmlversion.h"
        |          ^~~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  Compile failed: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  creating tmp
  cc -I/usr/include/libxml2 -c /tmp/xmlXPathInitJwuGQj.c -o tmp/xmlXPathInitJwuGQj.o
  /tmp/xmlXPathInitJwuGQj.c:1:10: fatal error: libxml/xpath.h: No such file or directory
      1 | #include "libxml/xpath.h"
        |          ^~~~~~~~~~~~~~~~
  compilation terminated.
  *********************************************************************************
  Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
  *********************************************************************************
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  
  ----------------------------------------
  Failed building wheel for lxml
  Running setup.py clean for lxml
  Running setup.py bdist_wheel for cryptography ... error
  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-BEFwmk/cryptography/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-ja78Mo --python-tag cp27:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-2.7
  creating build/lib.linux-x86_64-2.7/cryptography
  copying src/cryptography/__init__.py -> build/lib.linux-x86_64-2.7/cryptography
  copying src/cryptography/exceptions.py -> build/lib.linux-x86_64-2.7/cryptography
  copying src/cryptography/__about__.py -> build/lib.linux-x86_64-2.7/cryptography
  copying src/cryptography/fernet.py -> build/lib.linux-x86_64-2.7/cryptography
  copying src/cryptography/utils.py -> build/lib.linux-x86_64-2.7/cryptography
  creating build/lib.linux-x86_64-2.7/cryptography/x509
  copying src/cryptography/x509/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/x509
  copying src/cryptography/x509/oid.py -> build/lib.linux-x86_64-2.7/cryptography/x509
  copying src/cryptography/x509/extensions.py -> build/lib.linux-x86_64-2.7/cryptography/x509
  copying src/cryptography/x509/base.py -> build/lib.linux-x86_64-2.7/cryptography/x509
  copying src/cryptography/x509/name.py -> build/lib.linux-x86_64-2.7/cryptography/x509
  copying src/cryptography/x509/general_name.py -> build/lib.linux-x86_64-2.7/cryptography/x509
  creating build/lib.linux-x86_64-2.7/cryptography/hazmat
  copying src/cryptography/hazmat/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat
  creating build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/serialization.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/constant_time.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/cmac.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/padding.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/keywrap.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/hashes.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/hmac.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives
  creating build/lib.linux-x86_64-2.7/cryptography/hazmat/backends
  copying src/cryptography/hazmat/backends/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends
  copying src/cryptography/hazmat/backends/interfaces.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends
  copying src/cryptography/hazmat/backends/multibackend.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends
  creating build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings
  copying src/cryptography/hazmat/bindings/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings
  creating build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/twofactor
  copying src/cryptography/hazmat/primitives/twofactor/totp.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/twofactor
  copying src/cryptography/hazmat/primitives/twofactor/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/twofactor
  copying src/cryptography/hazmat/primitives/twofactor/hotp.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/twofactor
  copying src/cryptography/hazmat/primitives/twofactor/utils.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/twofactor
  creating build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/x963kdf.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/pbkdf2.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/kbkdf.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/concatkdf.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/hkdf.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf
  creating build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/interfaces
  copying src/cryptography/hazmat/primitives/interfaces/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/interfaces
  creating build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/ciphers
  copying src/cryptography/hazmat/primitives/ciphers/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/ciphers
  copying src/cryptography/hazmat/primitives/ciphers/base.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/ciphers
  copying src/cryptography/hazmat/primitives/ciphers/modes.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/ciphers
  copying src/cryptography/hazmat/primitives/ciphers/algorithms.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/ciphers
  creating build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/padding.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/dh.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/utils.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/rsa.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/dsa.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/ec.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric
  creating build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/commoncrypto
  copying src/cryptography/hazmat/backends/commoncrypto/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/commoncrypto
  copying src/cryptography/hazmat/backends/commoncrypto/backend.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/commoncrypto
  copying src/cryptography/hazmat/backends/commoncrypto/ciphers.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/commoncrypto
  copying src/cryptography/hazmat/backends/commoncrypto/hashes.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/commoncrypto
  copying src/cryptography/hazmat/backends/commoncrypto/hmac.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/commoncrypto
  creating build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/x509.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/cmac.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/backend.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/ciphers.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/decode_asn1.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/encode_asn1.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/utils.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/rsa.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/dsa.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/ec.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/hashes.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/hmac.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
  creating build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/commoncrypto
  copying src/cryptography/hazmat/bindings/commoncrypto/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/commoncrypto
  copying src/cryptography/hazmat/bindings/commoncrypto/binding.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/commoncrypto
  creating build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/openssl
  copying src/cryptography/hazmat/bindings/openssl/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/openssl
  copying src/cryptography/hazmat/bindings/openssl/binding.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/openssl
  copying src/cryptography/hazmat/bindings/openssl/_conditional.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/openssl
  running egg_info
  writing requirements to src/cryptography.egg-info/requires.txt
  writing src/cryptography.egg-info/PKG-INFO
  writing top-level names to src/cryptography.egg-info/top_level.txt
  writing dependency_links to src/cryptography.egg-info/dependency_links.txt
  writing entry points to src/cryptography.egg-info/entry_points.txt
  reading manifest file 'src/cryptography.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  no previously-included directories found matching 'docs/_build'
  warning: no previously-included files matching '*' found under directory 'vectors'
  writing manifest file 'src/cryptography.egg-info/SOURCES.txt'
  running build_ext
  generating cffi module 'build/temp.linux-x86_64-2.7/_padding.c'
  creating build/temp.linux-x86_64-2.7
  generating cffi module 'build/temp.linux-x86_64-2.7/_constant_time.c'
  generating cffi module 'build/temp.linux-x86_64-2.7/_openssl.c'
  building '_openssl' extension
  creating build/temp.linux-x86_64-2.7/build
  creating build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7
  x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-kybPj6/python2.7-2.7.16=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c build/temp.linux-x86_64-2.7/_openssl.c -o build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/_openssl.o
  build/temp.linux-x86_64-2.7/_openssl.c:493:10: fatal error: openssl/opensslv.h: No such file or directory
    493 | #include <openssl/opensslv.h>
        |          ^~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  
  ----------------------------------------
  Failed building wheel for cryptography
  Running setup.py clean for cryptography
Failed to build lxml cryptography
Installing collected packages: lxml, pyparsing, Flask, requests, urwid, pathtools, argh, watchdog, six, cssutils, hpack, hyperframe, h2, passlib, html2text, construct, pyasn1, cryptography, pyperclip, Pillow, pyOpenSSL, backports.ssl-match-hostname, typing, mitmproxy, biplist
  Found existing installation: lxml 4.3.3
    Not uninstalling lxml at /usr/lib/python2.7/dist-packages, outside environment /usr
    Can't uninstall 'lxml'. No files were found to uninstall.
  Running setup.py install for lxml ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-BEFwmk/lxml/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-Dgyer0/install-record.txt --single-version-externally-managed --compile:
    Building lxml version 3.6.0.
    Building without Cython.
    ERROR: /bin/sh: 1: xslt-config: not found
    
    ** make sure the development packages of libxml2 and libxslt are installed **
    
    Using build configuration of libxslt
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-2.7
    creating build/lib.linux-x86_64-2.7/lxml
    copying src/lxml/pyclasslookup.py -> build/lib.linux-x86_64-2.7/lxml
    copying src/lxml/doctestcompare.py -> build/lib.linux-x86_64-2.7/lxml
    copying src/lxml/__init__.py -> build/lib.linux-x86_64-2.7/lxml
    copying src/lxml/sax.py -> build/lib.linux-x86_64-2.7/lxml
    copying src/lxml/usedoctest.py -> build/lib.linux-x86_64-2.7/lxml
    copying src/lxml/cssselect.py -> build/lib.linux-x86_64-2.7/lxml
    copying src/lxml/_elementpath.py -> build/lib.linux-x86_64-2.7/lxml
    copying src/lxml/builder.py -> build/lib.linux-x86_64-2.7/lxml
    copying src/lxml/ElementInclude.py -> build/lib.linux-x86_64-2.7/lxml
    creating build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/__init__.py -> build/lib.linux-x86_64-2.7/lxml/includes
    creating build/lib.linux-x86_64-2.7/lxml/html
    copying src/lxml/html/clean.py -> build/lib.linux-x86_64-2.7/lxml/html
    copying src/lxml/html/__init__.py -> build/lib.linux-x86_64-2.7/lxml/html
    copying src/lxml/html/ElementSoup.py -> build/lib.linux-x86_64-2.7/lxml/html
    copying src/lxml/html/soupparser.py -> build/lib.linux-x86_64-2.7/lxml/html
    copying src/lxml/html/html5parser.py -> build/lib.linux-x86_64-2.7/lxml/html
    copying src/lxml/html/diff.py -> build/lib.linux-x86_64-2.7/lxml/html
    copying src/lxml/html/defs.py -> build/lib.linux-x86_64-2.7/lxml/html
    copying src/lxml/html/usedoctest.py -> build/lib.linux-x86_64-2.7/lxml/html
    copying src/lxml/html/_html5builder.py -> build/lib.linux-x86_64-2.7/lxml/html
    copying src/lxml/html/_diffcommand.py -> build/lib.linux-x86_64-2.7/lxml/html
    copying src/lxml/html/formfill.py -> build/lib.linux-x86_64-2.7/lxml/html
    copying src/lxml/html/builder.py -> build/lib.linux-x86_64-2.7/lxml/html
    copying src/lxml/html/_setmixin.py -> build/lib.linux-x86_64-2.7/lxml/html
    creating build/lib.linux-x86_64-2.7/lxml/isoschematron
    copying src/lxml/isoschematron/__init__.py -> build/lib.linux-x86_64-2.7/lxml/isoschematron
    copying src/lxml/lxml.etree.h -> build/lib.linux-x86_64-2.7/lxml
    copying src/lxml/lxml.etree_api.h -> build/lib.linux-x86_64-2.7/lxml
    copying src/lxml/includes/tree.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/config.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/xmlerror.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/xslt.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/etreepublic.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/htmlparser.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/relaxng.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/xinclude.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/xmlschema.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/dtdvalid.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/schematron.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/c14n.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/uri.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/xpath.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/xmlparser.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/etree_defs.h -> build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/lxml-version.h -> build/lib.linux-x86_64-2.7/lxml/includes
    creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources
    creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/rng
    copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/rng
    creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl
    copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl
    copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl
    creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
    copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
    copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
    copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
    copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
    copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
    copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
    running build_ext
    building 'lxml.etree' extension
    creating build/temp.linux-x86_64-2.7
    creating build/temp.linux-x86_64-2.7/src
    creating build/temp.linux-x86_64-2.7/src/lxml
    x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-kybPj6/python2.7-2.7.16=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Isrc/lxml/includes -I/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w
    In file included from src/lxml/lxml.etree.c:320:
    src/lxml/includes/etree_defs.h:14:10: fatal error: libxml/xmlversion.h: No such file or directory
       14 | #include "libxml/xmlversion.h"
          |          ^~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    Compile failed: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    cc -I/usr/include/libxml2 -c /tmp/xmlXPathInitccFWf9.c -o tmp/xmlXPathInitccFWf9.o
    /tmp/xmlXPathInitccFWf9.c:1:10: fatal error: libxml/xpath.h: No such file or directory
        1 | #include "libxml/xpath.h"
          |          ^~~~~~~~~~~~~~~~
    compilation terminated.
    *********************************************************************************
    Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
    *********************************************************************************
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    
    ----------------------------------------
  Can't roll back lxml; was not uninstalled
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-BEFwmk/lxml/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-Dgyer0/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-BEFwmk/lxml/
root@kali:~/tools# 
root@kali:~/tools# cd needle/
root@kali:~/tools/needle# python needle/
/usr/bin/python: can't find '__main__' module in 'needle/'
root@kali:~/tools/needle# ls
CHANGELOG.md  CODE_OF_CONDUCT.md  LICENSE.md  needle  README.md
root@kali:~/tools/needle# cd needle/
root@kali:~/tools/needle/needle# python needle.py 
Traceback (most recent call last):
  File "needle.py", line 9, in <module>
    from core.framework import cli
  File "/root/tools/needle/needle/core/framework/cli.py", line 8, in <module>
    from ..utils.printer import Colors, Printer
  File "/root/tools/needle/needle/core/utils/printer.py", line 4, in <module>
    from utils import Utils
  File "/root/tools/needle/needle/core/utils/utils.py", line 6, in <module>
    import biplist
ImportError: No module named biplist
root@kali:~/tools/needle/needle# pip install biplist
Collecting biplist
Installing collected packages: biplist
Successfully installed biplist-1.0.3
root@kali:~/tools/needle/needle# python needle.py 

             __   _ _______ _______ ______         _______
             | \  | |______ |______ |     \ |      |______
             |  \_| |______ |______ |_____/ |_____ |______
        
                   Needle v1.3.2 [mwr.to/needle]                  
  [MWR InfoSecurity (@MWRLabs) - Marco Lancini (@LanciniMarco)]   

[needle] > help

Commands (type [help|?] <topic>):
---------------------------------
add_issue     exit  issues  load  reload    set          show 
back          help  jobs    pull  resource  shell        unset
exec_command  info  kill    push  search    shell_local  use  

[needle] > show options

  Name                      Current Value         Required  Description
  ------------------------  -------------         --------  -----------
  AGENT_PORT                4444                  yes       Port on which the Needle Agent is listening
  APP                                             no        Bundle ID of the target application (e.g., com.example.app). Leave empty to launch wizard
  DEBUG                     False                 yes       Enable debugging output
  HIDE_SYSTEM_APPS          False                 yes       If set to True, only 3rd party apps will be shown
  IP                        127.0.0.1             yes       IP address of the testing device (set to localhost to use USB)
  OUTPUT_FOLDER             /root/.needle/output  yes       Full path of the output folder, where to store the output of the modules
  PASSWORD                  ********              yes       SSH Password of the testing device
  PORT                      2222                  yes       Port of the SSH agent on the testing device (needs to be != 22 to use USB)
  PUB_KEY_AUTH              True                  yes       Use public key auth to authenticate to the device. Key must be present in the ssh-agent if a passphrase is used
  SAVE_HISTORY              True                  yes       Persists command history across sessions
  SKIP_OUTPUT_FOLDER_CHECK  False                 no        Skip the check that ensures the output folder does not already contain other files. It will automatically overwrite any file
  USERNAME                  root                  yes       SSH Username of the testing device
  VERBOSE                   True                  yes       Enable verbose output

[needle] > set IP 192.168.7.198
IP => 192.168.7.198
[needle] > set PASSWORD ********
PASSWORD => ********
[needle] > help

Commands (type [help|?] <topic>):
---------------------------------
add_issue     exit  issues  load  reload    set          show 
back          help  jobs    pull  resource  shell        unset
exec_command  info  kill    push  search    shell_local  use  

[needle] > shell
[*] Spawning a shell...
[*] Checking connection with device...
[V] Connection not present, creating a new instance
[V] [AGENT] Connecting to agent (192.168.7.198:4444)...
[+] [AGENT] Successfully connected to agent (192.168.7.198:4444)...
[V] [SSH] Connecting (192.168.7.198:2222)...
No handlers could be found for logger "paramiko.transport"
[!] Problem establishing connection: Exception - Could not open a connection to 192.168.7.198. AttributeError - Raw 
[!] Exception: Could not open a connection to 192.168.7.198. AttributeError - Raw
[V] [SSH] Disconnecting...
[V] [AGENT] Disconnecting from agent...
[needle] > 
[needle] > jobs
[*] No running jobs
[needle] > info
[needle] > help info
Alias: info == show info.
[needle] > search
Searches available modules.

Usage: search <string>

[needle] > exit
[V] Cleaning local temp folder: /root/.needle/tmp

@akasandra
Copy link
Author

It seems to me that devs know the answer but too lazy to answer what is the error related to. Or at least, share their pip freeze and OS where everything works. Because following the Wiki, nothing works now. There should be a problem with module versions or requirements.txt, or system dependencies not mentioned anywhere.

@Yogehi
Copy link
Collaborator

Yogehi commented Sep 13, 2019

So it's not that we have the answer. It's that there are other plans in the works. For now, as much as I don't want to say this, but we don't have an answer for this issue right now :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants