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

command not found #172

Open
alex-niht opened this issue Jun 20, 2024 · 8 comments
Open

command not found #172

alex-niht opened this issue Jun 20, 2024 · 8 comments

Comments

@alex-niht
Copy link

I'm installing on an updated, upgraded VMware instance of kali Linux. Busy with the apisec api penetration testing course.

Used pip3 to install into the/opt/ directory.
If I use the command to run the flow through mitmproxy2swagger it keeps saying: command not found.

@NelsonOmoniyi
Copy link

I am experiencing the same issue as well, have you been able to get a work-around outside github?

@alex-niht
Copy link
Author

alex-niht commented Jun 22, 2024

No I haven't managed to get this to work.
Error Message I keep getting:
Using cached mitmproxy2swagger-0.13.0-py3-none-any.whl (15 kB)
Using cached aioquic-0.9.25-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB)
Using cached asgiref-3.7.2-py3-none-any.whl (24 kB)
Installing collected packages: asgiref, aioquic, mitmproxy2swagger
Attempting uninstall: asgiref
Found existing installation: asgiref 3.8.1
ERROR: Cannot uninstall asgiref 3.8.1, RECORD file not found. Hint: The package was installed by debian.

I have tried to use a docker container, python venv environment and still no luck. I even reloaded a new kali vm instance, same error... as well as on parrot os... I really don't know what more to try.. or if I'm doing something wrong. I initially kept getting python asigref errors, but in the parrot os when I created a python virtual environment it installed perfectly but as soon as I input the command to run the flow through mitmproxy2swagger it keeps saying mitmproxy2swagger command not found...

@khargosh99
Copy link

I am also facing the same error. Trying to solve it from last 3 days

@alex-niht
Copy link
Author

I also haven't managed to make it work. The best bet would be to learn how to use the docker container method. I managed to get it set up in a container, but I don't know much about Docker, so another thing to learn and master.... Iv only just started to learn and use Linux so I guess its all about the learning curve..

@josephotrust
Copy link

josephotrust commented Jul 17, 2024

Hi, I had the same issue. I received this warning:

WARNING: The script mitmproxy2swagger is installed in '/home/kali/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

I moved the install to /usr/local/bin and the command is now found.

sudo mv /home/kali/.local/bin/mitmproxy2swagger /usr/local/bin

@vikas9452
Copy link

Getting same error but them i tried to install it using docker here is my process
$ git clone [email protected]:alufers/mitmproxy2swagger.git
$ cd mitmproxy2swagger
$ docker build -t mitmproxy2swagger .
$ sudo docker run --rm mitmproxy2swagger -h

This worked well UNTIL i got the error

$ sudo docker run --rm mitmproxy2swagger -i ../flows -o spec.yml -p http://[URL] -f flow
No existing swagger file found. Creating new one.
Traceback (most recent call last):
File "/venv/bin/mitmproxy2swagger", line 8, in
sys.exit(main())
File "/venv/lib/python3.10/site-packages/mitmproxy2swagger/mitmproxy2swagger.py", line 179, in main
for req in capture_reader.captured_requests():
File "/venv/lib/python3.10/site-packages/mitmproxy2swagger/mitmproxy_capture_reader.py", line 112, in captured_requests
with open(self.file_path, "rb") as logfile:
FileNotFoundError: [Errno 2] No such file or directory: '../flows'

File is there but still showing this error

@Anpilaot
Copy link

Same issue here, and I use windows with Python 3.1

@realp05h
Copy link

realp05h commented Nov 9, 2024

Was facing the same problem.

Create a python venv then pip install it in there:
python3 -m venv mitmproxy_venv

Then activate the venv:
source mitmproxy_venv/bin/activate

Now run:
pip3 install mitmproxy2swagger

As long as you're in that venv you can run the normal commands.

To jump out of the venv just run 'deactivate'.

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

7 participants