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
Post linux manage download exec #1596
Post linux manage download exec #1596
Conversation
@@ -80,6 +80,10 @@ def cmd_exec(cmd, args=nil, time_out=15) | |||
return o | |||
end | |||
|
|||
def vcmd_exec(cmd, args=nil, time_out=15) |
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 must to admit I dont see a real benefit defining this method into the mixin. And I dont like the idea of combining presentation helpers with logic into the same mixin. Maybe would be a good idea to add this helper into your modules atm.
But yeah! it's just my opinion :) So I'm going to ask someone more to share opinion about this point!
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 was done so i wouldn't need to have like 10 modules all with the same
method just copied and pasted ...
On Thu, Mar 14, 2013 at 6:06 PM, Juan Vazquez notifications@github.comwrote:
In lib/msf/core/post/common.rb:
@@ -80,6 +80,10 @@ def cmd_exec(cmd, args=nil, time_out=15)
return o
end
- def vcmd_exec(cmd, args=nil, time_out=15)
I must to admit I dont see a real benefit defining this method into the
mixin. And I dont like the idea of combining presentation helpers with
logic into the same mixin. Maybe would be a good idea to add this helper
into your modules atm.But yeah! it's just my opinion :) So I'm going to ask someone more to
share opinion about this point!—
Reply to this email directly or view it on GitHubhttps://github.com//pull/1596/files#r3382825
.
added auto-detection of bash and curl from the PATH. |
Hi @jasbro , After discussing with @jlee-r7, we're going to ask avoiding to merge the vcmd_exec into the Common Post mixin, because in this way it's merging a presentation helper into a "logic" mixin. On the other hand, as pointed by @jlee-r7, doesn't seem the best idea vprint_status'd the command before running it. Also pointed by him, when there are commands without output, vprint empties outputs can annoy to the user. I guess would be a good idea to include the helper in your modules atm, following the recommendations above. Sure it would help to accelerate the review :) Thanks very much in advance! and if you have any questions, don't hesitate to ask ! |
Working as expected with shell sessions:
But I've notices when curl isn't available on the $PATH it just exists silently, because of this I've tried to solve with https://github.com/jasbro/metasploit-framework/pull/2 , it tries to check if curl is in the path before proceeding. I think is valuable, but please, feel free to review and if agree with changes just land it, and this pr will be updated automatically :) |
check if curl is on the path
Thanks for landing it, merging! |
Linux post module to download and run a file