Here is a DNS message. Answer the following questions about it:
Hint, you will definitely want to google and find the RFC or some other detailed source that describes the format of the request/response in detail. You might also capture a DNS message in Wireshark, and use that as an example.
44 02 81 80
00 01 00 01
00 00 00 00
0c 72 61 6d
62 6c 69 6e
77 72 65 63
6b 03 63 6f
6d 00 00 01
00 01 c0 0c
00 01 00 01
00 00 06 2b
00 04 40 1e
e4 14
In [3]:
dec = int('0x10',16)
dec
Out[3]:
In [16]:
# logical and and or
print(bin(16),bin(1),bin(16|1))
print(bin(16),bin(1),bin(16&1))
# Note that bin removes the leading zeros.
In [15]:
# Converting to characters -- Also you can google a hex ascii table
chr(int('0x73',16))
Out[15]: