|
@@ -331,12 +331,14 @@ module CentralProtocolHandler
|
|
|
|
|
|
# get hostname from a qw status packet! perhaps there's a DNS name inside, which we can use! fixme
|
|
# get hostname from a qw status packet! perhaps there's a DNS name inside, which we can use! fixme
|
|
hum = qwstatus(iphost, ipport)
|
|
hum = qwstatus(iphost, ipport)
|
|
|
|
+ p hum
|
|
if hum["hostname"] =~ /([\w\.]{3,}\.\w{2,4})/
|
|
if hum["hostname"] =~ /([\w\.]{3,}\.\w{2,4})/
|
|
hostnamedns = $1
|
|
hostnamedns = $1
|
|
ip_of_hostnamedns = Resolv.getaddress(hostnamedns)
|
|
ip_of_hostnamedns = Resolv.getaddress(hostnamedns)
|
|
|
|
|
|
if ip_of_hostnamedns && (ip_of_hostnamedns == iphost)
|
|
if ip_of_hostnamedns && (ip_of_hostnamedns == iphost)
|
|
# ok, we take it.
|
|
# ok, we take it.
|
|
|
|
+ put_log "ok, we take #{hostnamedns} for #{iphost} here.."
|
|
domainname = hostnamedns
|
|
domainname = hostnamedns
|
|
end
|
|
end
|
|
|
|
|