threat9 / routersploit

Exploitation Framework for Embedded Devices
Other
12.14k stars 2.31k forks source link

No module named "Future" on "docker build" #569

Open bbossola opened 5 years ago

bbossola commented 5 years ago

The docker build stops with an error.

Steps to Reproduce (for bugs)

$ docker build -t routersploit .
Sending build context to Docker daemon 5.293 MB
Step 1 : FROM python:3.6
3.6: Pulling from library/python
f626654b7ce4: Pull complete 
28d24f910dc8: Pull complete 
36327fec7dc3: Pull complete 
03647c60cbdf: Pull complete 
ba9389172b7c: Pull complete 
491995ace47c: Pull complete 
0f99b7916295: Pull complete 
8b2822db9209: Pull complete 
ee2a5b5d587f: Pull complete 
cffac3aef079: Pull complete 
8eb95223346f: Pull complete 
559d91095dce: Pull complete 
3a8b7232d93c: Pull complete 
3d889902b33c: Pull complete 
902a41a31a1f: Pull complete 
38ae5a701a72: Pull complete 
Digest: sha256:834a6890d8616fd68ac5b8676975c864a286ccfd196fc8d7044c1235f506dba7
Status: Downloaded newer image for python:3.6
 ---> 38ae5a701a72
Step 2 : COPY requirements.txt /tmp/requirements.txt
 ---> f7659f6c3e76
Removing intermediate container 632e55728211
Step 3 : RUN python -m pip install -r /tmp/requirements.txt
 ---> Running in c04e848f0884
Collecting future (from -r /tmp/requirements.txt (line 1))
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f4f2726d2b0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/future/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f4f2726d9e8>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/future/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f4f2726d978>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/future/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f4f2726de10>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/future/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f4f2726dc18>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/future/
  Could not find a version that satisfies the requirement future (from -r /tmp/requirements.txt (line 1)) (from versions: )
No matching distribution found for future (from -r /tmp/requirements.txt (line 1))
The command '/bin/sh -c python -m pip install -r /tmp/requirements.txt' returned a non-zero code: 1

Your Environment

Current Behavior

The docker command fails because of the inability to find the package "future", similar to case https://github.com/threat9/routersploit/issues/463

Expected Behavior

I was expecting that with docker I would've been abstracted of the python version/libraries and everything would have worked.

lucyoa commented 5 years ago

It looks like you have some issues with internet connection:

Collecting future (from -r /tmp/requirements.txt (line 1))
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f4f2726d2b0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/future/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f4f2726d9e8>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/future/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f4f2726d978>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/future/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f4f2726de10>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/future/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f4f2726dc18>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/future/
  Could not find a version that satisfies the requirement future (from -r /tmp/requirements.txt (line 1)) (from versions: )
lgromanowski commented 5 years ago

Works for me:

routersploit (master)$docker build -t routersploit .
Sending build context to Docker daemon  5.606MB
Step 1/6 : FROM python:3.6
3.6: Pulling from library/python
e79bb959ec00: Pull complete 
d4b7902036fe: Pull complete 
1b2a72d4e030: Pull complete 
d54db43011fd: Pull complete 
69d473365bb3: Pull complete 
35b4aebab92b: Pull complete 
60ddbccc0359: Pull complete 
0b3c337d0c3e: Pull complete 
2b75f9fe405b: Pull complete 
Digest: sha256:fcbf363c285f331894b33f2577e0426182b989c750133a989abaaa4edea324e9
Status: Downloaded newer image for python:3.6
 ---> 2bb3204ab1d1
Step 2/6 : COPY requirements.txt /tmp/requirements.txt
 ---> acc4b57376e4
Step 3/6 : RUN python -m pip install -r /tmp/requirements.txt
 ---> Running in 876f4d2a851e
Collecting future (from -r /tmp/requirements.txt (line 1))
  Downloading https://files.pythonhosted.org/packages/90/52/e20466b85000a181e1e144fd8305caf2cf475e2f9674e797b222f8105f5f/future-0.17.1.tar.gz (829kB)
Collecting requests (from -r /tmp/requirements.txt (line 2))
  Downloading https://files.pythonhosted.org/packages/7d/e3/20f3d364d6c8e5d2353c72a67778eb189176f08e873c9900e10c0287b84b/requests-2.21.0-py2.py3-none-any.whl (57kB)
Collecting paramiko (from -r /tmp/requirements.txt (line 3))
  Downloading https://files.pythonhosted.org/packages/cf/ae/94e70d49044ccc234bfdba20114fa947d7ba6eb68a2e452d89b920e62227/paramiko-2.4.2-py2.py3-none-any.whl (193kB)
Collecting pysnmp==4.4.6 (from -r /tmp/requirements.txt (line 4))
  Downloading https://files.pythonhosted.org/packages/99/1a/9e0cdf6a963998185eeebc2a3fa368aa448cac73126a98a4cbf7bdfe85c7/pysnmp-4.4.6-py2.py3-none-any.whl (291kB)
Collecting pycryptodome (from -r /tmp/requirements.txt (line 5))
  Downloading https://files.pythonhosted.org/packages/06/fc/b09816d7b2d79d6454f75b40def94a89ed785d8d8d07840563f1084c6ecd/pycryptodome-3.8.1-cp36-cp36m-manylinux1_x86_64.whl (9.7MB)
Collecting certifi>=2017.4.17 (from requests->-r /tmp/requirements.txt (line 2))
  Downloading https://files.pythonhosted.org/packages/60/75/f692a584e85b7eaba0e03827b3d51f45f571c2e793dd731e598828d380aa/certifi-2019.3.9-py2.py3-none-any.whl (158kB)
Collecting chardet<3.1.0,>=3.0.2 (from requests->-r /tmp/requirements.txt (line 2))
  Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
Collecting urllib3<1.25,>=1.21.1 (from requests->-r /tmp/requirements.txt (line 2))
  Downloading https://files.pythonhosted.org/packages/62/00/ee1d7de624db8ba7090d1226aebefab96a2c71cd5cfa7629d6ad3f61b79e/urllib3-1.24.1-py2.py3-none-any.whl (118kB)
Collecting idna<2.9,>=2.5 (from requests->-r /tmp/requirements.txt (line 2))
  Downloading https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl (58kB)
Collecting bcrypt>=3.1.3 (from paramiko->-r /tmp/requirements.txt (line 3))
  Downloading https://files.pythonhosted.org/packages/d0/79/79a4d167a31cc206117d9b396926615fa9c1fdbd52017bcced80937ac501/bcrypt-3.1.6-cp34-abi3-manylinux1_x86_64.whl (55kB)
Collecting pynacl>=1.0.1 (from paramiko->-r /tmp/requirements.txt (line 3))
  Downloading https://files.pythonhosted.org/packages/27/15/2cd0a203f318c2240b42cd9dd13c931ddd61067809fee3479f44f086103e/PyNaCl-1.3.0-cp34-abi3-manylinux1_x86_64.whl (759kB)
Collecting pyasn1>=0.1.7 (from paramiko->-r /tmp/requirements.txt (line 3))
  Downloading https://files.pythonhosted.org/packages/7b/7c/c9386b82a25115cccf1903441bba3cbadcfae7b678a20167347fa8ded34c/pyasn1-0.4.5-py2.py3-none-any.whl (73kB)
Collecting cryptography>=1.5 (from paramiko->-r /tmp/requirements.txt (line 3))
  Downloading https://files.pythonhosted.org/packages/5b/12/b0409a94dad366d98a8eee2a77678c7a73aafd8c0e4b835abea634ea3896/cryptography-2.6.1-cp34-abi3-manylinux1_x86_64.whl (2.3MB)
Collecting pysmi (from pysnmp==4.4.6->-r /tmp/requirements.txt (line 4))
  Downloading https://files.pythonhosted.org/packages/e0/e0/328b765ff44150f2ac08f7e36f35623764ab55db22602b613f4eb437558f/pysmi-0.3.3-py2.py3-none-any.whl (80kB)
Collecting pycryptodomex (from pysnmp==4.4.6->-r /tmp/requirements.txt (line 4))
  Downloading https://files.pythonhosted.org/packages/ae/13/ec058561e604854090f91f5a303aae9982a37ebc8db3acbf5842798ec214/pycryptodomex-3.8.1-cp36-cp36m-manylinux1_x86_64.whl (9.7MB)
Collecting cffi>=1.1 (from bcrypt>=3.1.3->paramiko->-r /tmp/requirements.txt (line 3))
  Downloading https://files.pythonhosted.org/packages/20/f7/87b62a8895bf7c93e907b05b97bc4459c81a38a61151f03a6eae13d863aa/cffi-1.12.2-cp36-cp36m-manylinux1_x86_64.whl (428kB)
Collecting six>=1.4.1 (from bcrypt>=3.1.3->paramiko->-r /tmp/requirements.txt (line 3))
  Downloading https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting asn1crypto>=0.21.0 (from cryptography>=1.5->paramiko->-r /tmp/requirements.txt (line 3))
  Downloading https://files.pythonhosted.org/packages/ea/cd/35485615f45f30a510576f1a56d1e0a7ad7bd8ab5ed7cdc600ef7cd06222/asn1crypto-0.24.0-py2.py3-none-any.whl (101kB)
Collecting ply (from pysmi->pysnmp==4.4.6->-r /tmp/requirements.txt (line 4))
  Downloading https://files.pythonhosted.org/packages/a3/58/35da89ee790598a0700ea49b2a66594140f44dec458c07e8e3d4979137fc/ply-3.11-py2.py3-none-any.whl (49kB)
Collecting pycparser (from cffi>=1.1->bcrypt>=3.1.3->paramiko->-r /tmp/requirements.txt (line 3))
  Downloading https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz (158kB)
Building wheels for collected packages: future, pycparser
  Building wheel for future (setup.py): started
  Building wheel for future (setup.py): finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/0c/61/d2/d6b7317325828fbb39ee6ad559dbe4664d0896da4721bf379e
  Building wheel for pycparser (setup.py): started
  Building wheel for pycparser (setup.py): finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/f2/9a/90/de94f8556265ddc9d9c8b271b0f63e57b26fb1d67a45564511
Successfully built future pycparser
Installing collected packages: future, certifi, chardet, urllib3, idna, requests, pycparser, cffi, six, bcrypt, pynacl, pyasn1, asn1crypto, cryptography, paramiko, ply, pysmi, pycryptodomex, pysnmp, pycryptodome
Successfully installed asn1crypto-0.24.0 bcrypt-3.1.6 certifi-2019.3.9 cffi-1.12.2 chardet-3.0.4 cryptography-2.6.1 future-0.17.1 idna-2.8 paramiko-2.4.2 ply-3.11 pyasn1-0.4.5 pycparser-2.19 pycryptodome-3.8.1 pycryptodomex-3.8.1 pynacl-1.3.0 pysmi-0.3.3 pysnmp-4.4.6 requests-2.21.0 six-1.12.0 urllib3-1.24.1
Removing intermediate container 876f4d2a851e
 ---> c6e03d688ae3
Step 4/6 : WORKDIR /routersploit
 ---> Running in 1fd5047d0396
Removing intermediate container 1fd5047d0396
 ---> ea0e998a2a5c
Step 5/6 : COPY . .
 ---> 38fdef0aeb68
Step 6/6 : CMD ["python", "rsf.py"]
 ---> Running in cb7ae592c379
Removing intermediate container cb7ae592c379
 ---> d13bd7fe8f78
Successfully built d13bd7fe8f78
Successfully tagged routersploit:latest

Your Environment

RouterSploit Version used: dcbfe68ce4ab85061473bc92d948a516691e79b2 Operating System and version: Arch Linux Docker version: 18.09.4-ce, build d14af54266 Python Version: 3.7.3 (but as above I am using docker)