GithubHelp home page GithubHelp logo

Comments (14)

Stean avatar Stean commented on May 27, 2024 3

It worked for me when using Python 2.7 with virtualenv. I didn't run setup.py but instead installed all dependencies and directly started the main script:

$ virtualenv -p /usr/bin/python2.7 venv
$ source venv/bin/activate
$ pip install couchdb pbkdf2 ipcalc requests pymongo six
$ python nosqlmap.py --help

My Kali version:

VERSION="2020.4"
VERSION_ID="2020.4"
VERSION_CODENAME="kali-rolling"

from nosqlmap.

sl2mmin avatar sl2mmin commented on May 27, 2024 2

Actually, I just tried this with python 2, it installed but I am getting a a syntax error upon running. I tried running this via python and docker on a Mac without success. Also tried the same in an Ubuntu VM but was greeted with the exact same errors that I got on Mac. I'm in no way associated with this proejct, so no clue about any updates.

If you're getting an invalid syntax error from certifi then what fixed it for me was just removing the one NoSQLMap installs and installing an older version that works with Python2.

Error location:

  File "/usr/local/lib/python2.7/dist-packages/certifi-2022.5.18.1-py2.7.egg/certifi/core.py", line 17
    def where() -> str:

Fix:

pip2 uninstall certifi
pip2 install certifi==2018.10.15

from nosqlmap.

bramvbilsen avatar bramvbilsen commented on May 27, 2024 1

Actually, I just tried this with python 2, it installed but I am getting a a syntax error upon running. I tried running this via python and docker on a Mac without success. Also tried the same in an Ubuntu VM but was greeted with the exact same errors that I got on Mac. I'm in no way associated with this proejct, so no clue about any updates.

from nosqlmap.

bramvbilsen avatar bramvbilsen commented on May 27, 2024

This project does not seem to work with Python 3.x, so use python 2.7.x instead.

from nosqlmap.

alonsoir avatar alonsoir commented on May 27, 2024

Thanks for the answer, do you know if it is in the roadmap to update the tool to python3? python2 has been deprecated for two years...

from nosqlmap.

bramvbilsen avatar bramvbilsen commented on May 27, 2024

What platform are you running this on?

from nosqlmap.

alonsoir avatar alonsoir commented on May 27, 2024

Hi, it is not working, both ways.

`> sudo python setup.py install
running install
/usr/local/lib/python3.10/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/usr/local/lib/python3.10/dist-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/usr/local/lib/python3.10/dist-packages/pkg_resources/init.py:123: PkgResourcesDeprecationWarning: 1.16.0-unknown is an invalid version and will not be supported in a future release
warnings.warn(
/usr/local/lib/python3.10/dist-packages/pkg_resources/init.py:123: PkgResourcesDeprecationWarning: 1.12.1-git20200711.33e2d80-dfsg1-0.6 is an invalid version and will not be supported in a future release
warnings.warn(
running bdist_egg
running egg_info
writing NoSQLMap.egg-info/PKG-INFO
writing dependency_links to NoSQLMap.egg-info/dependency_links.txt
writing entry points to NoSQLMap.egg-info/entry_points.txt
writing requirements to NoSQLMap.egg-info/requires.txt
writing top-level names to NoSQLMap.egg-info/top_level.txt
reading manifest file 'NoSQLMap.egg-info/SOURCES.txt'
adding license file 'COPYING'
writing manifest file 'NoSQLMap.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
warning: install_lib: 'build/lib' does not exist -- no Python modules to install

creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/EGG-INFO
installing scripts to build/bdist.linux-x86_64/egg/EGG-INFO/scripts
running install_scripts
running build_scripts
creating build/bdist.linux-x86_64/egg/EGG-INFO/scripts
copying build/scripts-3.10/nsmmongo.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts
copying build/scripts-3.10/nosqlmap.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts
copying build/scripts-3.10/nsmcouch.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts
copying build/scripts-3.10/exception.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts
copying build/scripts-3.10/nsmscan.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts
copying build/scripts-3.10/nsmweb.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts
changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/nsmmongo.py to 755
changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/nosqlmap.py to 755
changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/nsmcouch.py to 755
changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/exception.py to 755
changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/nsmscan.py to 755
changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/nsmweb.py to 755
copying NoSQLMap.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying NoSQLMap.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying NoSQLMap.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying NoSQLMap.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying NoSQLMap.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying NoSQLMap.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/NoSQLMap-0.7-py3.10.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing NoSQLMap-0.7-py3.10.egg
Removing /usr/local/lib/python3.10/dist-packages/NoSQLMap-0.7-py3.10.egg
Copying NoSQLMap-0.7-py3.10.egg to /usr/local/lib/python3.10/dist-packages
NoSQLMap 0.7 is already the active version in easy-install.pth
Installing exception.py script to /usr/local/bin
Installing nosqlmap.py script to /usr/local/bin
Installing nsmcouch.py script to /usr/local/bin
Installing nsmmongo.py script to /usr/local/bin
Installing nsmscan.py script to /usr/local/bin
Installing nsmweb.py script to /usr/local/bin
Installing NoSQLMap script to /usr/local/bin

Installed /usr/local/lib/python3.10/dist-packages/NoSQLMap-0.7-py3.10.egg
Processing dependencies for NoSQLMap==0.7
Searching for pymongo==2.7.2
Reading https://pypi.org/simple/pymongo/
/usr/local/lib/python3.10/dist-packages/pkg_resources/init.py:123: PkgResourcesDeprecationWarning: is an invalid version and will not be supported in a future release
warnings.warn(
Downloading https://files.pythonhosted.org/packages/8e/34/4b3cd4bfe5f3bfbd89873c8e24e091a6a6510c57fedea76161530be18a61/pymongo-2.7.2.tar.gz#sha256=8fb45e3edec006f4b11580fc579bec7781a8b3201ce0abf31593f086070e51f6
Best match: pymongo 2.7.2
Processing pymongo-2.7.2.tar.gz
Writing /tmp/easy_install-kupmanps/pymongo-2.7.2/setup.cfg
Running pymongo-2.7.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-kupmanps/pymongo-2.7.2/egg-dist-tmp-a7ly6vl7
error: Setup script exited with error in pymongo setup command: use_2to3 is invalid.

python nosqlmap.py
File "/home/kali/git/NoSQLMap/nosqlmap.py", line 65
print " _ _ ___ ___ _ __ __ "
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
`

The docker compose way does not work either.

`> docker-compose build
Building nosqlmap
Sending build context to Docker daemon 4.096kB
Step 1/10 : FROM python:2.7-alpine
---> 8579e446340f
Step 2/10 : RUN echo 'http://dl-cdn.alpinelinux.org/alpine/v3.9/main' >> /etc/apk/repositories
---> Using cache
---> 9b597a475c30
Step 3/10 : RUN echo 'http://dl-cdn.alpinelinux.org/alpine/v3.9/community' >> /etc/apk/repositories
---> Using cache
---> 10875167047b
Step 4/10 : RUN apk update && apk add mongodb git
---> Using cache
---> 8cffa390efeb
Step 5/10 : RUN git clone https://github.com/codingo/NoSQLMap.git /root/NoSqlMap
---> Using cache
---> 60ea6cf8c1b7
Step 6/10 : WORKDIR /root/NoSqlMap
---> Using cache
---> 93e6b94550bb
Step 7/10 : RUN python setup.py install
---> Using cache
---> f401d7fcd281
Step 8/10 : COPY entrypoint.sh /tmp/entrypoint.sh
---> Using cache
---> 7c60c7a3641e
Step 9/10 : RUN chmod +x /tmp/entrypoint.sh
---> Using cache
---> 630bcdf81391
Step 10/10 : ENTRYPOINT ["/tmp/entrypoint.sh"]
---> Using cache
---> e977052fa530
Successfully built e977052fa530
Successfully tagged nosqlmap:latest

docker-compose run nosqlmap
Creating docker_nosqlmap_run ... done
Traceback (most recent call last):
File "nosqlmap.py", line 8, in
import nsmcouch
File "/root/NoSqlMap/nsmcouch.py", line 8, in
import requests
File "/usr/local/lib/python2.7/site-packages/requests-2.20.0-py2.7.egg/requests/init.py", line 112, in
from . import utils
File "/usr/local/lib/python2.7/site-packages/requests-2.20.0-py2.7.egg/requests/utils.py", line 24, in
from . import certs
File "/usr/local/lib/python2.7/site-packages/requests-2.20.0-py2.7.egg/requests/certs.py", line 15, in
from certifi import where
File "/usr/local/lib/python2.7/site-packages/certifi-2022.5.18.1-py2.7.egg/certifi/init.py", line 1, in
from .core import contents, where
File "/usr/local/lib/python2.7/site-packages/certifi-2022.5.18.1-py2.7.egg/certifi/core.py", line 17
def where() -> str:
^
SyntaxError: invalid syntax
ERROR: 1
`

from nosqlmap.

alonsoir avatar alonsoir commented on May 27, 2024

Hi, do you plan to upgrade to python 3.x? 2.x is deprecated...

from nosqlmap.

passerbyo avatar passerbyo commented on May 27, 2024

nosqlmap supports 3x instead of 2x

from nosqlmap.

alonsoir avatar alonsoir commented on May 27, 2024

which python3.x version?

thanks

from nosqlmap.

github-actions avatar github-actions commented on May 27, 2024

Stale issue message

from nosqlmap.

kumar2812 avatar kumar2812 commented on May 27, 2024

Screenshot (3)
facing this issue,,,,help me

from nosqlmap.

binaryc0de avatar binaryc0de commented on May 27, 2024

Same exact issue. It's obvious from the code that it's python 2 and not 3. Looks like docker install is broken too?

image

from nosqlmap.

juniperberries avatar juniperberries commented on May 27, 2024

Hi, it is not working, both ways.

`> sudo python setup.py install running install /usr/local/lib/python3.10/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( /usr/local/lib/python3.10/dist-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools. warnings.warn( /usr/local/lib/python3.10/dist-packages/pkg_resources/init.py:123: PkgResourcesDeprecationWarning: 1.16.0-unknown is an invalid version and will not be supported in a future release warnings.warn( /usr/local/lib/python3.10/dist-packages/pkg_resources/init.py:123: PkgResourcesDeprecationWarning: 1.12.1-git20200711.33e2d80-dfsg1-0.6 is an invalid version and will not be supported in a future release warnings.warn( running bdist_egg running egg_info writing NoSQLMap.egg-info/PKG-INFO writing dependency_links to NoSQLMap.egg-info/dependency_links.txt writing entry points to NoSQLMap.egg-info/entry_points.txt writing requirements to NoSQLMap.egg-info/requires.txt writing top-level names to NoSQLMap.egg-info/top_level.txt reading manifest file 'NoSQLMap.egg-info/SOURCES.txt' adding license file 'COPYING' writing manifest file 'NoSQLMap.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib warning: install_lib: 'build/lib' does not exist -- no Python modules to install

creating build/bdist.linux-x86_64/egg creating build/bdist.linux-x86_64/egg/EGG-INFO installing scripts to build/bdist.linux-x86_64/egg/EGG-INFO/scripts running install_scripts running build_scripts creating build/bdist.linux-x86_64/egg/EGG-INFO/scripts copying build/scripts-3.10/nsmmongo.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts copying build/scripts-3.10/nosqlmap.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts copying build/scripts-3.10/nsmcouch.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts copying build/scripts-3.10/exception.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts copying build/scripts-3.10/nsmscan.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts copying build/scripts-3.10/nsmweb.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/nsmmongo.py to 755 changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/nosqlmap.py to 755 changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/nsmcouch.py to 755 changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/exception.py to 755 changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/nsmscan.py to 755 changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/nsmweb.py to 755 copying NoSQLMap.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO copying NoSQLMap.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying NoSQLMap.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying NoSQLMap.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying NoSQLMap.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying NoSQLMap.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO zip_safe flag not set; analyzing archive contents... creating 'dist/NoSQLMap-0.7-py3.10.egg' and adding 'build/bdist.linux-x86_64/egg' to it removing 'build/bdist.linux-x86_64/egg' (and everything under it) Processing NoSQLMap-0.7-py3.10.egg Removing /usr/local/lib/python3.10/dist-packages/NoSQLMap-0.7-py3.10.egg Copying NoSQLMap-0.7-py3.10.egg to /usr/local/lib/python3.10/dist-packages NoSQLMap 0.7 is already the active version in easy-install.pth Installing exception.py script to /usr/local/bin Installing nosqlmap.py script to /usr/local/bin Installing nsmcouch.py script to /usr/local/bin Installing nsmmongo.py script to /usr/local/bin Installing nsmscan.py script to /usr/local/bin Installing nsmweb.py script to /usr/local/bin Installing NoSQLMap script to /usr/local/bin

Installed /usr/local/lib/python3.10/dist-packages/NoSQLMap-0.7-py3.10.egg Processing dependencies for NoSQLMap==0.7 Searching for pymongo==2.7.2 Reading https://pypi.org/simple/pymongo/ /usr/local/lib/python3.10/dist-packages/pkg_resources/init.py:123: PkgResourcesDeprecationWarning: is an invalid version and will not be supported in a future release warnings.warn( Downloading https://files.pythonhosted.org/packages/8e/34/4b3cd4bfe5f3bfbd89873c8e24e091a6a6510c57fedea76161530be18a61/pymongo-2.7.2.tar.gz#sha256=8fb45e3edec006f4b11580fc579bec7781a8b3201ce0abf31593f086070e51f6 Best match: pymongo 2.7.2 Processing pymongo-2.7.2.tar.gz Writing /tmp/easy_install-kupmanps/pymongo-2.7.2/setup.cfg Running pymongo-2.7.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-kupmanps/pymongo-2.7.2/egg-dist-tmp-a7ly6vl7 error: Setup script exited with error in pymongo setup command: use_2to3 is invalid.

python nosqlmap.py
File "/home/kali/git/NoSQLMap/nosqlmap.py", line 65
print " _ _ ___ ___ _ __ __ "
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
`

The docker compose way does not work either.

`> docker-compose build Building nosqlmap Sending build context to Docker daemon 4.096kB Step 1/10 : FROM python:2.7-alpine ---> 8579e446340f Step 2/10 : RUN echo 'http://dl-cdn.alpinelinux.org/alpine/v3.9/main' >> /etc/apk/repositories ---> Using cache ---> 9b597a475c30 Step 3/10 : RUN echo 'http://dl-cdn.alpinelinux.org/alpine/v3.9/community' >> /etc/apk/repositories ---> Using cache ---> 10875167047b Step 4/10 : RUN apk update && apk add mongodb git ---> Using cache ---> 8cffa390efeb Step 5/10 : RUN git clone https://github.com/codingo/NoSQLMap.git /root/NoSqlMap ---> Using cache ---> 60ea6cf8c1b7 Step 6/10 : WORKDIR /root/NoSqlMap ---> Using cache ---> 93e6b94550bb Step 7/10 : RUN python setup.py install ---> Using cache ---> f401d7fcd281 Step 8/10 : COPY entrypoint.sh /tmp/entrypoint.sh ---> Using cache ---> 7c60c7a3641e Step 9/10 : RUN chmod +x /tmp/entrypoint.sh ---> Using cache ---> 630bcdf81391 Step 10/10 : ENTRYPOINT ["/tmp/entrypoint.sh"] ---> Using cache ---> e977052fa530 Successfully built e977052fa530 Successfully tagged nosqlmap:latest

docker-compose run nosqlmap
Creating docker_nosqlmap_run ... done
Traceback (most recent call last):
File "nosqlmap.py", line 8, in
import nsmcouch
File "/root/NoSqlMap/nsmcouch.py", line 8, in
import requests
File "/usr/local/lib/python2.7/site-packages/requests-2.20.0-py2.7.egg/requests/init.py", line 112, in
from . import utils
File "/usr/local/lib/python2.7/site-packages/requests-2.20.0-py2.7.egg/requests/utils.py", line 24, in
from . import certs
File "/usr/local/lib/python2.7/site-packages/requests-2.20.0-py2.7.egg/requests/certs.py", line 15, in
from certifi import where
File "/usr/local/lib/python2.7/site-packages/certifi-2022.5.18.1-py2.7.egg/certifi/init.py", line 1, in
from .core import contents, where
File "/usr/local/lib/python2.7/site-packages/certifi-2022.5.18.1-py2.7.egg/certifi/core.py", line 17
def where() -> str:
^
SyntaxError: invalid syntax
ERROR: 1
`

pip install setuptools==57.5.0
it's worked!

from nosqlmap.

Related Issues (20)

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.