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
Avoid hardcoded relative paths #578
Avoid hardcoded relative paths #578
Conversation
Copypasting relevant lines of the failed tests:
...I am blameful for |
- Introduce a RESOURCES_DIR similar to other *_DIR - Add a resources_directory parameter to lookup_vendor() to avoid possible hardcoded directory and - if not provided - pick up the default RESOURCES_DIR.
(Otherwise ssh_keys are tried to picked up in in ${PWD} (and mostly likely failing))
Commit id 9380c04 (probably accidentally) removed EXPLOITS_DIR use leading to loading routersploit/modules/exploits relative to the current directory instead of the installed ones in MODULES_DIR.
...relevant part of failed tests:
(None of them were touched by this pull request though.) |
These errors have been fixed with #580, please just trigger build again |
Hello Marcin,
Marcin Bury writes:
These errors have been fixed with #580
Thanks!
|
I'm not happy about commit 4278012 and hopefully I'll refactor it ASAP (next few minutes!). |
I think that also |
Unfortunately I have not tested the |
All hardcoded relative paths should be addressed now (and tests seems to pass!). |
Awesome, thanks! |
Thank you! |
Status
READY
Description
Describe what is changed by your Pull Request. If this PR is related to the open issue (bug/feature/new module) please attach issue number.
Verification
Provide steps to test or reproduce the PR.
./rsf.py
use scanners/autopwn
set target 192.168.1.1
run
...then watch threads ~suddendly terminating without invoking any module:
At least ktruss-ing it reveals that several open("routersploit/...")$PWD is $ {PYSITELIB} (e.g.
fails due ENOENT. If the
/usr/pkg/lib/python3.7/site-packages/
, whereroutersploit/...
installed hierarcy is present) and then directly invoking routersploit
in the python interpreter via:
routersploit works!
Proposed commits should avoid uses of hardcoded relative paths and
fixes this problem.
Checklist