YAPC::EU 2018 Glasgow Update!
This commit is contained in:
parent
22f33d4004
commit
4e2d22a71d
1170 changed files with 15042 additions and 3047 deletions
1
Task/DNS-query/Lasso/dns-query.lasso
Normal file
1
Task/DNS-query/Lasso/dns-query.lasso
Normal file
|
|
@ -0,0 +1 @@
|
|||
dns_lookup('www.kame.net', -type='A')
|
||||
6
Task/DNS-query/Lua/dns-query-1.lua
Normal file
6
Task/DNS-query/Lua/dns-query-1.lua
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
local socket = require('socket')
|
||||
local ip_tbl = socket.dns.getaddrinfo('www.kame.net')
|
||||
|
||||
for _, v in ipairs(ip_tbl) do
|
||||
io.write(string.format('%s: %s\n', v.family, v.addr))
|
||||
end
|
||||
13
Task/DNS-query/Lua/dns-query-2.lua
Normal file
13
Task/DNS-query/Lua/dns-query-2.lua
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
/* NetRexx */
|
||||
options replace format comments java crossref symbols nobinary
|
||||
|
||||
ir = InetAddress
|
||||
addresses = InetAddress[] InetAddress.getAllByName('www.kame.net')
|
||||
loop ir over addresses
|
||||
if ir <= Inet4Address then do
|
||||
say 'IPv4 :' ir.getHostAddress
|
||||
end
|
||||
if ir <= Inet6Address then do
|
||||
say 'IPv6 :' ir.getHostAddress
|
||||
end
|
||||
end ir
|
||||
11
Task/DNS-query/Lua/dns-query-3.lua
Normal file
11
Task/DNS-query/Lua/dns-query-3.lua
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
(define (dnsLookup site , ipv)
|
||||
;; captures current IPv mode
|
||||
(set 'ipv (net-ipv))
|
||||
;; IPv mode agnostic lookup
|
||||
(println "IPv4: " (begin (net-ipv 4) (net-lookup site)))
|
||||
(println "IPv6: " (begin (net-ipv 6) (net-lookup site)))
|
||||
;; returns newLISP to previous IPv mode
|
||||
(net-ipv ipv)
|
||||
)
|
||||
|
||||
(dnsLookup "www.kame.net")
|
||||
Loading…
Add table
Add a link
Reference in a new issue