SHARE
TWEET

myprogram.lua

a guest Jan 22nd, 2020 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top