/usr/local/bin/mitmproxy: No such script - mitmproxy

I'm trying to have mitmproxy do the tls_passthrough but I get the /usr/local/bin/mitmproxy: No such script
I'm running the command sudo mitmproxy --set stream_large_bodies=1 --set block_global=false --showhost -s tls_passthrough.py
System Information
sudo mitmproxy --version
Mitmproxy: 4.0.4
Python: 3.6.8
OpenSSL: OpenSSL 1.1.1 11 Sep 2018
Platform: Linux-4.15.0-58-generic-x86_64-with-Ubuntu-18.04-bionic

I have encounter same problem.
solution: makesure your xxx.py in mitmdump -s xxx.py path is correct
reason: the script in No such script means the script file = normally is xxx.py
you here: makesure the current path of running this your mitmproxy -s tls_passthrough.py can find the file tls_passthrough.py
you can check it by:
pwd
ls -l
make sure can find tls_passthrough.py file.

If you typo: N.B. ERROR [missing leading "-" from "--set"]
mitmproxy -set upstream_bind_address=docs.mitmproxy.org -s tls_passthrough.py
will produce the, (slightly misleading error):
/usr/local/bin/mitmdump: No such script
when there is nothing wrong with the script.

You can find your the path with this.
which mitmproxy
and you can move that to /usr/local/bin/

I guess mitmdump doesn't support relative paths. I got the full path of the script, e.g. /workspace/example/scripts/add_cargo_auth_header.py:
mitmdump -s /workspace/example/scripts/add_cargo_auth_header.py
That worked for me.

Related

Installing MongoDB 2022

I downloaded mongoDB and I try to use brew, it didn't work.
I try bunch of commands such as:
$ curl -O https://fastdl.mongodb.org/osx/mongodb-osx-x86_64-3.4.6.tgz
$ tar -zxvf mongodb-osx-x86_64-3.4.6.tgz
$ mkdir -p mongodb
$ cp -R -n mongodb-osx-x86_64-3.4.6/ mongodb
$ sudo mv mongodb /usr/local
Didn't work
Step 5: it says the directory is not empty or is not exist. I try to empty the directory didn't work and I try to create a different one, it didn't work.
I can't find any solution. Can someone help me, please?
I think your /usr/local folder already contains a non-empty folder named mongodb.
Refer this for details.
You can confirm it by listing out the files in it
ls /usr/local/mongodb
Maybe, you can try removing that directory as a superuser if it doesn't have any important files and continue with the installation

How to install Argo CLI?

I am trying to install Argo CLI by following this (https://github.com/argoproj/argo-workflows/releases) documentation.
# Download the binary
curl -sLO https://github.com/argoproj/argo/releases/download/v3.1.3/argo-linux-amd64.gz
# Unzip
gunzip argo-linux-amd64.gz
# Make binary executable
chmod +x argo-linux-amd64
# Move binary to path
mv ./argo-linux-amd64 /usr/local/bin/argo
# Test installation
argo version
The above instructions are not working. So, I followed the answer to this (How to update Argo CLI?) question.
curl -sLO https://github.com/argoproj/argo/releases/download/v2.12.0-rc2/argo-linux-amd64
chmod +x argo-linux-amd64
./argo-linux-amd64
But I am getting the following error:
./argo-linux-amd64: line 1: Not: command not found
I also tried moving the argo-linux-amd64 binary to /usr/local/bin/argo but still getting the same error (as expected).
Is there any solution to this?
Thank you.
The download links on the Releases page are incorrect. Try this one:
curl -sLO https://github.com/argoproj/argo-workflows/releases/download/v3.1.3/argo-linux-amd64.gz
I've submitted an issue to get the links fixed.

Scheme missing linux wget

While trying to install Odoo on Ubuntu 18.04, I ran into an error after running the following command:
sudo wget -O wkhtmltox.tar.xz \ https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
The error said:
https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz: Scheme missing
Please help me if you know the answer to my problem!
You could find all the releases at:
https://github.com/wkhtmltopdf/wkhtmltopdf/releases
Your command fails due to an extra \ before https://. Try this:
sudo wget -O wkhtmltox.tar.xz https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
FYI, There are some issues with wkhtmltopdf that seems to be solved in early versions like 0.12.5
See bug references at:
https://github.com/odoo/odoo/issues/19160
https://github.com/wkhtmltopdf/wkhtmltopdf/issues/2711#issuecomment-389429960

cannot execute binary file centos?

I am using centos 6.9 and want to install xampp. But when I run the command on the terminal it showing error i.e. cannot execute binary file. So, How can I fix this problem and successfully install xampp ? Please help me.
chmod +x xampp-linux-x64-7.0.22-0-installer.run
./xampp-linux-x64-7.0.22-0-installer.run
after this command it showing
bash: ./xampp-linux-x64-7.0.22-0-installer.run: cannot execute binary file
You're probably running the install (binary) with a lesser privileged user. You'll have to use root user for modifying SELinux settings as such:
semanage fcontext -a -t httpd_sys_script_exec_t '/<install-location>(/.*)/?'
restorecon -R -v /<install-location>/

PintOS, kernel panic with -v option bochs on ubuntu

when i do "pintos -- run alarm-multiple" in .../build/ everything seems fine.
but when i do "make check" in .../build/ all 7 tests failed with the same
"Run didn't start up properly: no "pintos booting" message"
pintos -v -k -T 60 --bochs -- -q run alarm-single < /dev/null 2> tests/threads/alarm-single.errors > tests/threads/alarm-single.output
perl -I../.. ../../tests/threads/alarm-single.ck tests/threads/alarm-single tests/threads/alarm-single.result
FAIL tests/threads/alarm-single
Run didn't start up properly: no "Pintos booting" message
then I discovered "pintos -v -k -T 60 --bochs -- -q run alarm-single" in .../build
it gives a
Bochs is exiting with the following message:
[ ] bochsrc.txt:12: display library 'nogui' not available
if I take away the "-v" it will be fine.
How to fix this
display library 'nogui' not available
Nobody seems to answer me... I got that myself at last.
just need to change the bochs's configure : ./configer --with-nogui
and then compile it again:
make
sudo make install
After that pintos's make check will work.
i had same problem and i solved it.
open "/pintos/src/tests/Make.tests"
edit line 54 (delete -v)
TESTCMD = pintos -v -k -T $(TIMEOUT)
then, in "/threads/build" you can do
make check
Remember when you using Ubuntu 14.04 or 16.04, never forget doing such things when you download original pintos project or any pintos project from Github.
(Any line with no parentheses are terminal commands)
cd ~
gedit .bashrc
(add next line to the final of the file)
{export PATH="$PATH:/home/{username}/pintos/src/utils"}
(save)
bash
cd ~/pintos/src/utils
gedit Makefile
(You need to change one line)
{change LDFLAGS = -lm to LDLIBS = -lm}
(save)
make
Then you can compile and run "make check" for pintos with no error.
(Any ~/pintos should be changed to your pintos path)
Remember final make in ~/pintos/src/utils is ridiculously important. Otherwise you will get "Run didn't start up properly: no "Pintos booting" message".
You can check full version here. http://www.luosheng-parallelbgls.com.cn/2016/03/29/pintos-install/
Cause this is a Chinese version, I would appreciate for anyone who can translate it to English.