Advertisement
Guest User

myprogram.lua

a guest
Jan 22nd, 2020
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.40 KB | None | 0 0
  1. local dns = require('dns')
  2.  
  3. dns.setAddress('4d2e4c6c-b70b-42b0-85db-d3ea1b27b3c0') -- sets the DNS server address
  4. dns.setPort(42069) -- sets the DNS server port
  5.  
  6. print(dns.lookup('tutorial')) -- looks up dns with server
  7.  
  8. -- will return nil if there is no address corresponding to that dns
  9. -- will return false if the DNS server could not be reached
  10. -- will return string that contains the address for that DNS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement