Updating dns_resolved module
parent
30c4e12a2e
commit
feddbbc3e8
|
@ -34,7 +34,7 @@ class Client:
|
||||||
|
|
||||||
while (byte_reader < len(data_to_transmit) + self.length):
|
while (byte_reader < len(data_to_transmit) + self.length):
|
||||||
encoded_data = base64.b64encode(data_to_transmit[byte_reader:byte_reader + self.length])
|
encoded_data = base64.b64encode(data_to_transmit[byte_reader:byte_reader + self.length])
|
||||||
encoded_data = encoded_data.replace("=", ".--")
|
encoded_data = encoded_data.replace("=", ".---")
|
||||||
|
|
||||||
# calcalate total packets
|
# calcalate total packets
|
||||||
if ((len(data_to_transmit) % self.length) == 0):
|
if ((len(data_to_transmit) % self.length) == 0):
|
||||||
|
|
|
@ -25,8 +25,14 @@ class Server:
|
||||||
if packet.haslayer(DNSQR):
|
if packet.haslayer(DNSQR):
|
||||||
dnsqr_strings = repr(packet[DNSQR])
|
dnsqr_strings = repr(packet[DNSQR])
|
||||||
try:
|
try:
|
||||||
incoming_data = base64.b64decode(dnsqr_strings.split('\'')[1].rstrip('.'))
|
incoming_data = dnsqr_strings.split('\'')[1].rstrip('.')
|
||||||
print incoming_data
|
number_equals = incoming_data.count('.--')
|
||||||
|
if '.---' in incoming_data:
|
||||||
|
encoded_data = incoming_data.split('.')[0] + "=" * number_equals
|
||||||
|
else:
|
||||||
|
encoded_data = incoming_data.split('.')[0]
|
||||||
|
|
||||||
|
print encoded_data
|
||||||
|
|
||||||
except TypeError:
|
except TypeError:
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in New Issue