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

Use File.join(__dir__, ...) instead of hardcoding the filepath for the wordlist #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kriss-u
Copy link

@kriss-u kriss-u commented May 12, 2021

We couldn't symlink the script in another path to run it from anywhere because the path of the wordlist would be considered relative to where we run the script. So, this PR solves this issue by using introducing the wordlist path as the absolute path where the script is contained. So, the script can be run from anywhere just by symlinking the script to any directory in PATH.
For example.

sudo ln -s $HOME/lazys3/lazys3.rb -T /usr/bin/lazys3

…ame" for the wordlist.

Previously, the script must be run from the directory where the wordlist file was present.
Now, the wordlist file must on the path where the script is present. Therefore, creating symlinks would also work.
Add File.join(__dir__, "filename") method instead of hardcoded "filename" for wordlist
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

Successfully merging this pull request may close these issues.

1 participant