-
Notifications
You must be signed in to change notification settings - Fork 33
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
Logging Is Inaccessible #38
Comments
This is kinda my fault for asking to pull Rex out. Wanna assign me? |
took a look over this, and it dawns on me that we have a bit of a logical absurdity here: logging is a core function of Rex, and itself depends on Alternatively i can do some "magic" checks for whether logging is defined in the global namespace and if it isn't then create short stubs for API compatibility - AKA, hack it up some. 😄 |
Using Rex' various gems without Msf will result in errors when the logging subsystem is undefined (as that remained in Msf during the great Rex excision). This manifests in rex-socket as noted by @zeroSteiner in rapid7/rex-socket#38. Address the dependency problem by moving rex/logging into this gem which is already required by rex-socket and other descendants. Testing: None - this is a quick-n-dirty subdirectory move. If this works, someone with real git skill should migrate the relevant history of the code; as losing that stuff results in people not knowing whom to ask when the time comes to fix some deeply-bored bug.
@zeroSteiner - could you please check to see if the linked PR in Core fixes this? I am not l33t enough to move those files w/ their history though. |
Using Rex' various gems without Msf will result in errors when the logging subsystem is undefined (as that remained in Msf during the great Rex excision). This manifests in rex-socket as noted by @zeroSteiner in rapid7/rex-socket#38. Address the dependency problem by moving rex/logging into rex-core which is already required by rex-socket and other descendants. Notes: This PR is staged to allow github.com/rapid7/rex-core/pull/32 to be merged without creating a (seemingly harmless) redundancy.
The logging methods used by
rex-socket
are defined globally by the Metasploit Framework. Because theelog
function andLEV_3
constant is not defined withinrex-socket
it will crash when used outside of Metasploit.There are at least 4 instances:
The issue can be confirmed by triggering an error log. In the following scenario, the user creates a new
Rex::Socket::Parameters
instance and specifies anSSLCert
file that exists, but can not be read. This assumes you're not running as root of course.Fixing the
LogSource
reference:Since this gem isn't dependant on Metasploit, the logging should function independently of it.
The text was updated successfully, but these errors were encountered: