calebmadrigal / trackerjacker

Like nmap for mapping wifi networks you're not connected to, plus device tracking
MIT License
2.64k stars 188 forks source link

Failed to build trackerjacker : Ubuntu 18.04 Bionic Beaver #11

Closed ghost closed 6 years ago

ghost commented 6 years ago
~$ pip3 install trackerjacker
Collecting trackerjacker
  Using cached https://files.pythonhosted.org/packages/d2/81/4dca960aeb78e070c1639ccbacfaa17182762f5c808c2eee0f1906c5fff4/trackerjacker-1.8.7.tar.gz
Collecting scapy==2.4.0 (from trackerjacker)
Collecting pyaml>=17.12.1 (from trackerjacker)
  Using cached https://files.pythonhosted.org/packages/17/c1/5892f756109e54ed53c753129b0da4acf6b6add8dff5a85b18667553b16d/pyaml-17.12.1-py2.py3-none-any.whl
Collecting ruamel.yaml==0.15.0 (from trackerjacker)
  Using cached https://files.pythonhosted.org/packages/d4/01/13c17da38beeb4a53f4db875b5d19298d24ddf9c6101821e9737f87b98c2/ruamel.yaml-0.15.0-cp36-cp36m-manylinux1_x86_64.whl
Collecting PyYAML (from pyaml>=17.12.1->trackerjacker)
Building wheels for collected packages: trackerjacker
  Running setup.py bdist_wheel for trackerjacker ... error
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-5_u6ggw1/trackerjacker/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/tmpmi8gcf02pip-wheel- --python-tag cp36:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib
  creating build/lib/trackerjacker
  copying trackerjacker/macos_device_management.py -> build/lib/trackerjacker
  copying trackerjacker/dot11_tracker.py -> build/lib/trackerjacker
  copying trackerjacker/common.py -> build/lib/trackerjacker
  copying trackerjacker/dot11_frame.py -> build/lib/trackerjacker
  copying trackerjacker/config_management.py -> build/lib/trackerjacker
  copying trackerjacker/version.py -> build/lib/trackerjacker
  copying trackerjacker/plugin_parser.py -> build/lib/trackerjacker
  copying trackerjacker/__init__.py -> build/lib/trackerjacker
  copying trackerjacker/ieee_mac_vendor_db.py -> build/lib/trackerjacker
  copying trackerjacker/linux_device_management.py -> build/lib/trackerjacker
  copying trackerjacker/dot11_mapper.py -> build/lib/trackerjacker
  copying trackerjacker/__main__.py -> build/lib/trackerjacker
  creating build/lib/trackerjacker/plugins
  copying trackerjacker/plugins/foxhunt.py -> build/lib/trackerjacker/plugins
  copying trackerjacker/plugins/__init__.py -> build/lib/trackerjacker/plugins
  running egg_info
  writing trackerjacker.egg-info/PKG-INFO
  writing dependency_links to trackerjacker.egg-info/dependency_links.txt
  writing entry points to trackerjacker.egg-info/entry_points.txt
  writing requirements to trackerjacker.egg-info/requires.txt
  writing top-level names to trackerjacker.egg-info/top_level.txt
  reading manifest file 'trackerjacker.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  writing manifest file 'trackerjacker.egg-info/SOURCES.txt'
  copying trackerjacker/oui.txt -> build/lib/trackerjacker
  installing to build/bdist.linux-x86_64/wheel
  running install
  running install_lib
  creating build/bdist.linux-x86_64
  creating build/bdist.linux-x86_64/wheel
  creating build/bdist.linux-x86_64/wheel/trackerjacker
  copying build/lib/trackerjacker/macos_device_management.py -> build/bdist.linux-x86_64/wheel/trackerjacker
  creating build/bdist.linux-x86_64/wheel/trackerjacker/plugins
  copying build/lib/trackerjacker/plugins/foxhunt.py -> build/bdist.linux-x86_64/wheel/trackerjacker/plugins
  copying build/lib/trackerjacker/plugins/__init__.py -> build/bdist.linux-x86_64/wheel/trackerjacker/plugins
  copying build/lib/trackerjacker/dot11_tracker.py -> build/bdist.linux-x86_64/wheel/trackerjacker
  copying build/lib/trackerjacker/common.py -> build/bdist.linux-x86_64/wheel/trackerjacker
  copying build/lib/trackerjacker/oui.txt -> build/bdist.linux-x86_64/wheel/trackerjacker
  copying build/lib/trackerjacker/dot11_frame.py -> build/bdist.linux-x86_64/wheel/trackerjacker
  copying build/lib/trackerjacker/config_management.py -> build/bdist.linux-x86_64/wheel/trackerjacker
  copying build/lib/trackerjacker/version.py -> build/bdist.linux-x86_64/wheel/trackerjacker
  copying build/lib/trackerjacker/plugin_parser.py -> build/bdist.linux-x86_64/wheel/trackerjacker
  copying build/lib/trackerjacker/__init__.py -> build/bdist.linux-x86_64/wheel/trackerjacker
  copying build/lib/trackerjacker/ieee_mac_vendor_db.py -> build/bdist.linux-x86_64/wheel/trackerjacker
  copying build/lib/trackerjacker/linux_device_management.py -> build/bdist.linux-x86_64/wheel/trackerjacker
  copying build/lib/trackerjacker/dot11_mapper.py -> build/bdist.linux-x86_64/wheel/trackerjacker
  copying build/lib/trackerjacker/__main__.py -> build/bdist.linux-x86_64/wheel/trackerjacker
  running install_egg_info
  Copying trackerjacker.egg-info to build/bdist.linux-x86_64/wheel/trackerjacker-1.8.7-py3.6.egg-info
  running install_scripts
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-build-5_u6ggw1/trackerjacker/setup.py", line 54, in <module>
      'Operating System :: MacOS'
    File "/home/aditya/.local/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
      return distutils.core.setup(**attrs)
    File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 257, in run
      self.distinfo_dir)
    File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 427, in egg2dist
      distribution=self.distribution)
    File "/usr/lib/python3/dist-packages/wheel/metadata.py", line 177, in pkginfo_to_dict
      new_requirements = sorted(convert_requirements(requirements))
    File "/usr/lib/python3/dist-packages/wheel/metadata.py", line 234, in convert_requirements
      parsed_requirement = pkg_resources.Requirement.parse(req)
    File "/home/aditya/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2995, in parse
      req, = parse_requirements(s)
  ValueError: not enough values to unpack (expected 1, got 0)

  ----------------------------------------
  Failed building wheel for trackerjacker
  Running setup.py clean for trackerjacker
Failed to build trackerjacker
Installing collected packages: scapy, PyYAML, pyaml, ruamel.yaml, trackerjacker
  Running setup.py install for trackerjacker ... done
Successfully installed PyYAML-3.13 pyaml-17.12.1 ruamel.yaml-0.15.0 scapy-2.4.0 trackerjacker-1.8.7
ghost commented 6 years ago

With GitHub Build Installed But =>

~$ trackerjacker 
Traceback (most recent call last):
  File "/usr/local/bin/trackerjacker", line 11, in <module>
    load_entry_point('trackerjacker==1.8.7', 'console_scripts', 'trackerjacker')()
  File "/home/aditya/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 480, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/aditya/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2691, in load_entry_point
    return ep.load()
  File "/home/aditya/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2322, in load
    return self.resolve()
  File "/home/aditya/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2328, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python2.7/dist-packages/trackerjacker-1.8.7-py2.7.egg/trackerjacker/__main__.py", line 269
    print('Vendor for {} not found'.format(args.mac_lookup), file=sys.stderr)
                                                                 ^
SyntaxError: invalid syntax
pand0rausa commented 6 years ago

Make sure you have run:

sudo apt-get install python-scapy I had to su to root then ran pip3 install trackerjacker

to resolve that issue.

Also, you may want to make sure you are running the current version of pip3.

zwieberl commented 6 years ago

I'm having the same issue on Centos7. python-scapy is already installed. Might be due to an old version of pip. Building from source with python3 setup.py install works however (after installing a few packages).

calebmadrigal commented 6 years ago

Yes, this issue is due to an old version of pip. @Adity-dev, does it work if you pip3 install --upgrade pip first?

ghost commented 6 years ago

@calebmadrigal https://github.com/calebmadrigal/trackerjacker/issues/11#issuecomment-415812115 : Nope ! But it does broke pip3 in Ubuntu !

Tried Solution provided by @zwieberl https://github.com/calebmadrigal/trackerjacker/issues/11#issuecomment-414563117

It Does work But Still I'm facing a Issue:

$ sudo trackerjacker -i wlp2s0
Enabling monitor mode on wlp2s0
Monitoring all available channels on wlp2s0: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140]
Traceback (most recent call last):
  File "/home/aditya/.local/lib/python3.6/site-packages/trackerjacker/__main__.py", line 229, in start
    scapy.sniff(iface=self.iface_manager.iface, prn=self.process_packet, store=0)
  File "/home/aditya/.local/lib/python3.6/site-packages/scapy/sendrecv.py", line 767, in sniff
    p = s.recv()
  File "/home/aditya/.local/lib/python3.6/site-packages/scapy/arch/linux.py", line 600, in recv
    pkt, sa_ll = self.ins.recvfrom(x)
OSError: [Errno 100] Network is down

Sniffer error occurred. Restarting sniffer in 3 seconds...
command failed: Device or resource busy (-16)
command failed: Device or resource busy (-16)
command failed: Device or resource busy (-16)
command failed: Device or resource busy (-16)
command failed: Device or resource busy (-16)
command failed: Device or resource busy (-16)
command failed: Device or resource busy (-16)
command failed: Device or resource busy (-16)
command failed: Device or resource busy (-16)
command failed: Device or resource busy (-16)
command failed: Device or resource busy (-16)
command failed: Device or resource busy (-16)
command failed: Device or resource busy (-16)
^C
Disabling monitor mode for interface: wlp2s0
command failed: Device or resource busy (-16)
zwieberl commented 6 years ago

Take a look at #15 . I think you have to deactivate NetworkManager: systemctl stop NetworkManager

calebmadrigal commented 6 years ago

@Adity-dev Please take a look at @zwieberl's suggestion. The Device or resource busy typically means something else is managing the device, like a network manager.