Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

added vcmd_exec to common post lib #1607

Closed
wants to merge 1 commit into from

3 participants

@jabra-

Adds vcmd_exec to the common.rb post lib

@Meatballs1
Collaborator

cmd_exec doesn't print by default, so a vcmd_exec that does print, but only when VERBOSE, is a bit misleading.

Personally I would implement it as cmd_exec_vprint (alongside a cmd_exec_print).

(or print_cmd_exec, vprint_cmd_exec)

@jvazquez-r7
Collaborator

Hi @jasbro,

First of all, thanks very much for your effort, but atm we're going to close because this pull request is 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.

Thanks, and if you have any questions, don't hesitate to ask.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 15, 2013
  1. @jabra-
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/msf/core/post/common.rb
View
4 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)
+ vprint_status cmd_exec(cmd,args,time_out)
+ end
+
#
# Reports to the database that the host is a virtual machine and reports
# the type of virtual machine it is (e.g VirtualBox, VMware, Xen)
Something went wrong with that request. Please try again.