Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/lua
- require('socket') --puxa o modulo socket
- target = (arg[1]) or os.exit() --define que target seja o endereço dado pelo usuario
- local targethostname = socket.dns.tohostname(target) --define o targethostname para a função que pega o hostname
- local targetip = socket.dns.toip(target) --define o targetip para a função que pega o ip do hostname
- print(targethostname) --imprime o hostname
- print(targetip) --imprime o ip
Advertisement
Add Comment
Please, Sign In to add comment