This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ kdig @9.9.9.9 akamai.com +subnet=111.111.111.0/24 | |
;; ->>HEADER<<- opcode: QUERY; status: NOERROR; id: 9698 | |
;; Flags: qr rd ra; QUERY: 1; ANSWER: 1; AUTHORITY: 0; ADDITIONAL: 1 | |
;; EDNS PSEUDOSECTION: | |
;; Version: 0; flags: ; UDP size: 4096 B; ext-rcode: NOERROR | |
;; CLIENT-SUBNET: 73.231.144.0/20/0 | |
;; QUESTION SECTION: | |
;; akamai.com. IN A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# | |
# Copyright 2016 Google Inc | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- C definitions | |
local ffi = require('ffi') | |
local csym = ffi.C | |
ffi.cdef[[ | |
/* DHCP header format */ | |
struct __attribute__((packed)) dhcp_msg { | |
/* Header */ | |
uint8_t op; | |
uint8_t htype; | |
uint8_t hlen; |
OlderNewer