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

Error during install Drozer #357

Closed
alonf1983 opened this issue Oct 2, 2019 · 10 comments
Closed

Error during install Drozer #357

alonf1983 opened this issue Oct 2, 2019 · 10 comments

Comments

@alonf1983
Copy link

Steps to reproduce

git clone https://github.com/mwrlabs/drozer/
cd drozer
python setup.py bdist_wheel

Expected behaviour

should Building Python wheel

Actual behaviour:
root@kali:~/drozer# python setup.py bdist_wheel
Traceback (most recent call last):
File "setup.py", line 132, in
version = get_version(),
File "setup.py", line 128, in get_version
return subprocess.check_output(version_cmd).split('-', 1)[0]
File "/usr/lib/python2.7/subprocess.py", line 216, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 394, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

Environment

Operating system:Linux Kali

**Java Version:**1.7

Drozer Version: latest clone

please help

@ethicalhack3r
Copy link

Same error here on macOS

@sadshade
Copy link

Yep, the same thing

@sadshade
Copy link

@alonf1983 change on 128 line in setup.py
return subprocess.check_output(version_cmd).split('-', 1)[0]
to
return subprocess.check_output(version_cmd, shell=True).split('-', 1)[0]

virtimus added a commit to virtimus/drozer that referenced this issue Apr 27, 2020
Error during install Drozer WithSecureLabs#357
@abdilahrf
Copy link

FYI this still not implemented on the master branch

@ivan-sincek
Copy link

ivan-sincek commented Jul 1, 2020

Hi,

This is how I successfully installed drozer on Kali 2020.2 (Linux 5.6.0-kali2-amd64 x86_64) from a wheel.

Please run the following in this exact order:

wget https://github.com/FSecureLABS/drozer/releases/download/2.4.4/drozer-2.4.4-py2-none-any.whl
apt-get --assume-yes install python-pip
pip2 install wheel
pip2 install pyyaml
pip2 install pyhamcrest
pip2 install protobuf 
pip2 install pyopenssl 
pip2 install twisted
pip2 install service_identity
pip2 install drozer-2.4.4-py2-none-any.whl

The key is to use pip2 with Python 2.7.0.

Next, download drozer agent from https://labs.f-secure.com/tools/drozer/.

Install the agent on your mobile device and turn the agent on.

Then, connect your mobile device to your Kali machine and run:

apt-get --assume-yes install adb
adb start-server
adb forward tcp:31415 tcp:31415
drozer console connect

You should see no errors now.

Please share the solution with others if it helps.

If for some strange reason you need java or javac run the following:

apt-get install --assume-yes openjdk-8-jdk-headless

Best of luck,
Ivan.

@van0710
Copy link

van0710 commented Aug 28, 2020

Hi,

This is how I successfully installed drozer on Kali 2020.2 (Linux 5.6.0-kali2-amd64 x86_64) from a wheel.

Please run the following in this exact order:

wget https://github.com/FSecureLABS/drozer/releases/download/2.4.4/drozer-2.4.4-py2-none-any.whl
apt-get --assume-yes install python-pip
pip2 install wheel
pip2 install pyyaml
pip2 install pyhamcrest
pip2 install protobuf 
pip2 install pyopenssl 
pip2 install twisted
pip2 install service_identity
pip2 install drozer-2.4.4-py2-none-any.whl

The key is to use pip2 with Python 2.7.0.

Next, download drozer agent from https://labs.f-secure.com/tools/drozer/.

Install the agent on your mobile device and turn the agent on.

Then, connect your mobile device to your Kali machine and run:

apt-get --assume-yes install adb
adb start-server
adb forward tcp:31415 tcp:31415
drozer console connect

You should see no errors now.

Please share the solution with others if it helps.

If for some strange reason you need java or javac run the following:

apt-get install --assume-yes openjdk-8-jdk-headless

Best of luck,
Ivan.

Hi

After successfully installing all the libraries mentioned, still getting "-bash: drozer: command not found."

Environment - macOS Mojave
Java - 1.8

@ivan-sincek
Copy link

Hi,
This is how I successfully installed drozer on Kali 2020.2 (Linux 5.6.0-kali2-amd64 x86_64) from a wheel.
Please run the following in this exact order:

wget https://github.com/FSecureLABS/drozer/releases/download/2.4.4/drozer-2.4.4-py2-none-any.whl
apt-get --assume-yes install python-pip
pip2 install wheel
pip2 install pyyaml
pip2 install pyhamcrest
pip2 install protobuf 
pip2 install pyopenssl 
pip2 install twisted
pip2 install service_identity
pip2 install drozer-2.4.4-py2-none-any.whl

The key is to use pip2 with Python 2.7.0.
Next, download drozer agent from https://labs.f-secure.com/tools/drozer/.
Install the agent on your mobile device and turn the agent on.
Then, connect your mobile device to your Kali machine and run:

apt-get --assume-yes install adb
adb start-server
adb forward tcp:31415 tcp:31415
drozer console connect

You should see no errors now.
Please share the solution with others if it helps.
If for some strange reason you need java or javac run the following:

apt-get install --assume-yes openjdk-8-jdk-headless

Best of luck,
Ivan.

Hi

After successfully installing all the libraries mentioned, still getting "-bash: drozer: command not found."

Environment - macOS Mojave
Java - 1.8

Hi,

Unfortunately, I do not have access to macOS so I cannot test it... Maybe one day...

@theseann
Copy link

theseann commented Nov 30, 2020

Hi,
This is how I successfully installed drozer on Kali 2020.2 (Linux 5.6.0-kali2-amd64 x86_64) from a wheel.
Please run the following in this exact order:

wget https://github.com/FSecureLABS/drozer/releases/download/2.4.4/drozer-2.4.4-py2-none-any.whl
apt-get --assume-yes install python-pip
pip2 install wheel
pip2 install pyyaml
pip2 install pyhamcrest
pip2 install protobuf 
pip2 install pyopenssl 
pip2 install twisted
pip2 install service_identity
pip2 install drozer-2.4.4-py2-none-any.whl

The key is to use pip2 with Python 2.7.0.
Next, download drozer agent from https://labs.f-secure.com/tools/drozer/.
Install the agent on your mobile device and turn the agent on.
Then, connect your mobile device to your Kali machine and run:

apt-get --assume-yes install adb
adb start-server
adb forward tcp:31415 tcp:31415
drozer console connect

You should see no errors now.
Please share the solution with others if it helps.
If for some strange reason you need java or javac run the following:

apt-get install --assume-yes openjdk-8-jdk-headless

Best of luck,
Ivan.

Hi

After successfully installing all the libraries mentioned, still getting "-bash: drozer: command not found."

Environment - macOS Mojave
Java - 1.8

image
then ,add this path to $PATH.
mac big sur

@ivan-sincek
Copy link

Hi,
This is how I successfully installed drozer on Kali 2020.2 (Linux 5.6.0-kali2-amd64 x86_64) from a wheel.
Please run the following in this exact order:

wget https://github.com/FSecureLABS/drozer/releases/download/2.4.4/drozer-2.4.4-py2-none-any.whl
apt-get --assume-yes install python-pip
pip2 install wheel
pip2 install pyyaml
pip2 install pyhamcrest
pip2 install protobuf 
pip2 install pyopenssl 
pip2 install twisted
pip2 install service_identity
pip2 install drozer-2.4.4-py2-none-any.whl

The key is to use pip2 with Python 2.7.0.
Next, download drozer agent from https://labs.f-secure.com/tools/drozer/.
Install the agent on your mobile device and turn the agent on.
Then, connect your mobile device to your Kali machine and run:

apt-get --assume-yes install adb
adb start-server
adb forward tcp:31415 tcp:31415
drozer console connect

You should see no errors now.
Please share the solution with others if it helps.
If for some strange reason you need java or javac run the following:

apt-get install --assume-yes openjdk-8-jdk-headless

Best of luck,
Ivan.

Hi
After successfully installing all the libraries mentioned, still getting "-bash: drozer: command not found."
Environment - macOS Mojave
Java - 1.8

image
then ,add this path to $PATH.
mac big sur

Can you run once again pip2 install service_identity? Error message says "No module named service_identity".

If you get any other errors, just try to install what is missing.

Can you check if you have all the required modules e.g. in /usr/local/lib/python2.7/dist-packages/ (Kali Linux), but on macOS.

@Yogehi
Copy link
Collaborator

Yogehi commented Mar 11, 2021

we have a docker image for drozer now

https://hub.docker.com/r/fsecurelabs/drozer

we recommend using that

@Yogehi Yogehi closed this as completed Apr 7, 2021
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

8 participants