Code Monkey home page Code Monkey logo

Comments (3)

bsmithday avatar bsmithday commented on July 19, 2024 1

The errors are caused due to wrong python environment. To fix it, we need to use Miniconda:

  1. wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
  2. chmod +x bash Miniconda3-latest-Linux-x86_64.sh
  3. bash Miniconda3-latest-Linux-x86_64.sh
  4. accept the license terms
  5. you'll get the following message:
    Miniconda3 will now be installed into this location:
    /root/miniconda3
  6. Press ENTER to confirm the location
  7. ==> For changes to take effect, close and re-open your current terminal <==
  8. If you'd prefer that conda's base environment not be activated on startup:
    conda config --set auto_activate_base false
  9. conda create --name python27 python=2.7
  10. Proceed ([y]/n)? y
  11. conda activate python27
  12. conda info --env
  13. cd to the location where you git cloned the ipv4Bypass script
  14. pip install python-nmap
  15. pip install termcolor
  16. Finally run the script:

(python27) β”Œβ”€β”€(rootπŸ’€kali)-[~/Tools/ipv4Bypass]
└─# python bypass.py -i eth0 -r 192.168.1.0/24

[*] Found the below IPv4 addresses
192.168.1.1 e0:56:3d:2a:e0:e1
192.168.1.3 fc:65:de:54:31:19

from ipv4bypass.

tieupham267 avatar tieupham267 commented on July 19, 2024

Hi @bsmithday,

I follow your guide to fix run python27 env, it's ok. But when I try to install python-nmap, I get a error. Can you help me to fix it. Thank you so much.

P/s: I try install python-nmap on Kali 2021.3 and CentOS 7.

ERROR: Command errored out with exit status 1:
command: /home/kali/miniconda3/envs/python27/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-KjmOZD/python-nmap/setup.py'"'"'; file='"'"'/tmp/pip-install-KjmOZD/python-nmap/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-KjmOZD/python-nmap/pip-egg-info
cwd: /tmp/pip-install-KjmOZD/python-nmap/
Complete output (10 lines):
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-KjmOZD/python-nmap/setup.py", line 21, in
from nmap import *
File "nmap/init.py", line 41, in
from .nmap import * # noqa
File "nmap/nmap.py", line 137
f"nmap program was not found in path. PATH is : {os.getenv('PATH')}"
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

from ipv4bypass.

k1z1lelma avatar k1z1lelma commented on July 19, 2024

I edited the code according to Python3. You can access the current version via the repo below:

https://github.com/k1z1lelma/ipv4bypass

from ipv4bypass.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.