Closed claudijd closed 7 years ago
people.mozilla.com to the API seems to trigger this bug.
Actually, it's a request for https://mozilla.github.io/http-observatory-website/analyze.html?host=test
Able to replicate if I remove the valid target checking on the binary....
with small exception path... $ ruby bin/ssh_scan -t test [ { "ssh_scan_version": "0.0.21", "ip": "test", "port": 22, "error": "ConnectionRefused: getaddrinfo: nodename nor servname provided, or not known", "hostname": "" } ]
without small exceptions patch (and binary checks bypassed)
$ ruby bin/ssh_scan -t test
/Users/jclaudius/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/socket.rb:232:in getaddrinfo': getaddrinfo: nodename nor servname provided, or not known (SocketError) from /Users/jclaudius/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/socket.rb:232:in
foreach'
from /Users/jclaudius/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/socket.rb:328:in tcp' from /Users/jclaudius/code/ssh_scan/lib/ssh_scan/client.rb:21:in
connect'
from /Users/jclaudius/code/ssh_scan/lib/ssh_scan/scan_engine.rb:53:in scan_target' from /Users/jclaudius/code/ssh_scan/lib/ssh_scan/scan_engine.rb:145:in
block (2 levels) in scan'
I, [2017-06-05T20:05:25.287073 #13870] INFO -- : Started job: 2b9baa46-335c-48da-880c-b83e1bc765ab /usr/local/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/socket.rb:231:in
getaddrinfo': getaddrinfo: Name or service not known (SocketError) from /usr/local/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/socket.rb:231:in
foreach' from /usr/local/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/socket.rb:626:intcp' from /root/code/ssh_scan/lib/ssh_scan/client.rb:21:in
connect' from /root/code/ssh_scan/lib/ssh_scan/scan_engine.rb:53:inscan_target' from /root/code/ssh_scan/lib/ssh_scan/scan_engine.rb:145:in
block (2 levels) in scan'