-
Notifications
You must be signed in to change notification settings - Fork 2.3k
public_ configuration refactoring #2133
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
public_ configuration refactoring #2133
Conversation
…logic from public_port
OTR-ActiveRecord update: added to manually call the database connection
| # | ||
| # context name for the beef_url_str method when using this | ||
| # to say that this is the hook url | ||
| def hook_url | ||
| beef_url_str | ||
| end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit of a strange API choice as hook_url doesn't include the hook file path portion of the URL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
happy to change that to append the file path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A helper for the proto://host:port base URL is useful, as evidenced by the many instances where this helper is used without appending the hook path. My concern is that the API is confusing. hook_url is not the hook URL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated and appended the hook_file property
| beef_port = @configuration.get("beef.http.public_port") || @configuration.get("beef.http.port") | ||
| beef_hook = @configuration.get("beef.http.hook_file") | ||
| hook_url = "#{beef_proto}://#{beef_host}:#{beef_port}/#{beef_hook}" | ||
| hook_url = BeEF::Core::Configuration.instance.hook_url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't a one-for-one replacement as hook_url doesn't include the hook path portion of the URL. I'm not sure if that matters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ill check that out, and get back to you, I think it joins the hook file later, but I may be wrong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated and appended the hook_file property
|
are we keen for a public section under http? public |
work in process for the configuration changes relating to public configuration variables