File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -78,10 +78,13 @@ def pipe_server(socket_path)
78
78
File . chmod ( 0600 , socket_path )
79
79
loop do
80
80
client = server . accept
81
- unless ( input_string = client . gets &.chomp ) . blank?
82
- if ( mod = framework . modules . create ( input_string ) )
83
- client . puts ( Serializer ::ReadableText . dump_module ( mod ) )
81
+ begin
82
+ unless ( input_string = client . gets &.chomp ) . blank?
83
+ if ( mod = framework . modules . create ( input_string ) )
84
+ client . puts ( Serializer ::ReadableText . dump_module ( mod ) )
85
+ end
84
86
end
87
+ rescue StandardError
85
88
end
86
89
client . close
87
90
end
@@ -103,7 +106,6 @@ def cmd_fzuse(*args)
103
106
selection = nil
104
107
105
108
Dir . mktmpdir ( 'msf-fzuse-' ) do |dir |
106
- File . chmod ( 0700 , dir )
107
109
socket_path = File . join ( dir , "msf-fzuse.sock" )
108
110
server_thread = start_pipe_server ( socket_path )
109
111
@@ -122,6 +124,7 @@ def cmd_fzuse(*args)
122
124
end
123
125
124
126
server_thread . kill
127
+ server_thread . join
125
128
end
126
129
127
130
return if selection . blank?
You can’t perform that action at this time.
0 commit comments