18.10.2021, 14:47
Use this:
Code:
function resolve(domain)
local sock = require('socket').udp()
local res
if sock:setpeername(domain, 123) then
res = sock:getpeername()
end
sock:close()
return res
end
ip = resolve('openrb.com')
log(ip)