OS.: Ubuntu 22.04
In the Home folder I created a folder called
bin. In this folder I clone the GitHub repositories I need.
For example, I cloned this golang repository in my bin folder (the bin folder is in Home).
repository location: /home/focus/bin/dontgo403/
I created a symbolic link called check403 so it can be used from any location:
sudo ln -s ~/bin/dontgo403/dontgo403 check403
Check that the symbolic link has been created correctly:
readlink check403 /home/focus/bin/dontgo403/dontgo403
- I navigated to the Home folder
(~)to launch the program from a different location than where it is installed:
cd ~ check403 -u example.com
2023/01/01 13:38:43 open payloads/httpmethods: no such file or directory (This folder and these files are its dependencies located in the folder where it is installed > `~/bin/dontgo403`).
- According to the program description (repository), if I use the
-fparameter (to specify the location) everything works as expected:
check403 -f ~/bin/dontgo403/payloads -u example.com
My question is: How can I run the program without always specifying the location of its dependencies, for example: check403 -u example.com (without specifying each time:
In this scenario it is possible with the -f parameter, but I have encountered other scripts/programs that have not declared a location parameter, so they always have to be run from the location where they are installed.