-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Persistence libraries/Mixins #20381
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
base: master
Are you sure you want to change the base?
Persistence libraries/Mixins #20381
Conversation
Co-authored-by: Julien Voisin <[email protected]>
|
||
save_cleanup_rc if datastore['CleanUpRc'] && !@clean_up_rc.empty? | ||
|
||
@persistence_service.wait if run_as_background |
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.
Thinking aloud; I wonder if we should be aligning with the WfsDelay/passive stance concepts that already exist in framework versus introducing a new approach here 🤔
Edit: Looks like @dledda-r7 was looking into this here: #19815 (comment)
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.
@dledda-r7 any updates on this?
|
||
# logfile name | ||
clean_rc = logs + ::File::Separator + Rex::FileUtils.clean_path(host + filenameinfo) + '.rc' | ||
file_local_write(clean_rc, @clean_up_rc) |
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.
Not a blocker since this is an existing pattern; I think nowadays we've got real loggers/logsinks set up in framework for this kind of manual logging; but these lines will be easy to change in the future so not a blocker
# -*- coding: binary -*- | ||
|
||
module Msf | ||
module Exploit::Local::Timespec |
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.
I wonder if there's a better name we can throw in here, is it a posix specific timespec or similar? 👀
It'd be great to add a comment to an RFC or something similar that shows where this format is documented for future travellers
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.
I asked chatgpt for some suggestions:
- TimeExpression
- TimeStringParser
- FlexibleTime
- NaturalTime
- TimeInputValidator
I'm a fan of NaturalTime
, chatgpt recommends TimeInputValidator
overall.
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.
Phase 1 of #20374 with files directly taken from #19815 . This PR adds the necessary libraries/mixins to create the new persistence types.
Verification
msfconsole