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

Question: can't get card info in docker container #39

Open
slava-nikulin opened this issue Jul 12, 2017 · 1 comment
Open

Question: can't get card info in docker container #39

slava-nikulin opened this issue Jul 12, 2017 · 1 comment

Comments

@slava-nikulin
Copy link

slava-nikulin commented Jul 12, 2017

My question is: is it possible to get card info in docker container?
Here is my Dockerfile:

FROM ubuntu:latest

# RUN echo "deb http://http.kali.org/kali kali-rolling main contrib non-free" >> /etc/apt/sources.list

RUN apt-get -y update && apt-get -y dist-upgrade && apt-get clean
RUN apt-get -y install git

RUN git clone https://github.com/wifiphisher/wifiphisher.git
RUN apt-get -y install software-properties-common python-software-properties
RUN apt-get install -y python-setuptools
RUN apt-get install -y hostapd
RUN apt-get install -y dnsmasq
RUN cd wifiphisher && python setup.py install
RUN apt-get install -y python-scapy
RUN apt-get install -y python-dbus
RUN apt-get install -y network-manager
RUN apt-get install -y whoopsie
RUN apt-get install -y nano
RUN apt-get install -y tcpdump

CMD ["/bin/bash"]

Build image:
docker build . -t "ubuntu:1"

Start container:
docker run -it --privileged ubuntu:1 /bin/bash

Restart dbus:
/etc/init.d/dbus restart

Get card:

root@4453a82e7028:# python
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyric.pyw as pyw
>>> pyw.getcard('eth0')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/PyRIC-0.1.6.3-py2.7.egg/pyric/pyw.py", line 269, in getcard
    if nlsock is None: return _nlstub_(getcard, dev)
  File "/usr/local/lib/python2.7/dist-packages/PyRIC-0.1.6.3-py2.7.egg/pyric/pyw.py", line 2236, in _nlstub_
    return fct(*argv)
  File "/usr/local/lib/python2.7/dist-packages/PyRIC-0.1.6.3-py2.7.egg/pyric/pyw.py", line 270, in getcard
    return devinfo(dev, nlsock)['card']
  File "/usr/local/lib/python2.7/dist-packages/PyRIC-0.1.6.3-py2.7.egg/pyric/pyw.py", line 1050, in devinfo
    raise pyric.error(e.errno, e.strerror)
pyric.error: [Errno 2] No such file or directory
>>>

Or maybe I'm doing something wrong?

@eSoares
Copy link

eSoares commented Aug 5, 2019

Hello, I think you need to add "--network host" in our docker run command in order to view the network interfaces of your host.

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

2 participants