Skip to content

Commit

Permalink
Fixed a bug where Yasuo would fail if port.service is not detected by…
Browse files Browse the repository at this point in the history
… nmap scan
  • Loading branch information
0xsauby committed Jan 6, 2016
1 parent 3cf7471 commit e59053f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions yasuo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,11 @@ def detect_targets(hosts)

host.each_port do |port|
open_port = "#{port.state}" == "open"
web_service = ("#{port.service}".include?("http") or "#{port.service}".include?("ssl") or port.service == "websm" or port.service.ssl?)
wrapped_service = "#{port.service}".include?("tcpwrapped")

if "#{port.service}" != ''
web_service = ("#{port.service}".include?("http") or "#{port.service}".include?("ssl") or port.service == "websm" or port.service.ssl?)
wrapped_service = "#{port.service}".include?("tcpwrapped")
end

next unless open_port and (web_service or wrapped_service)
@open_ports += 1
Expand Down

0 comments on commit e59053f

Please sign in to comment.