Skip to content

Commit a0a4ef8

Browse files
added error msgs to rescue
1 parent f457399 commit a0a4ef8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

modules/auxiliary/scanner/http/wordpress_pingback_access.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,10 @@ def get_xml_rpc_url(ip)
8181
return nil
8282
end
8383
rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout
84+
print_error("Unable to connect to #{ip}")
8485
return nil
8586
rescue ::Timeout::Error, ::Errno::EPIPE
87+
print_error("Unable to connect to #{ip}")
8688
return nil
8789
end
8890
end
@@ -133,8 +135,10 @@ def get_blog_posts(xml_rpc, ip)
133135
count = count - 1
134136
end
135137
rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout
138+
print_error("Unable to connect to #{ip}")
136139
return nil
137140
rescue ::Timeout::Error, ::Errno::EPIPE
141+
print_error("Unable to connect to #{ip}")
138142
return nil
139143
end
140144

0 commit comments

Comments
 (0)