hello
parent
841597d46f
commit
bba6e37b05
Binary file not shown.
|
@ -31,3 +31,5 @@
|
||||||
2935 3019 1698265309752227101 insane_dns ff5ae500893d0be1
|
2935 3019 1698265309752227101 insane_dns ff5ae500893d0be1
|
||||||
2 3015 1698266342759371787 CMakeFiles/insane_dns.dir/src/main.cpp.o 727da43cdbc82421
|
2 3015 1698266342759371787 CMakeFiles/insane_dns.dir/src/main.cpp.o 727da43cdbc82421
|
||||||
3015 3112 1698266342859370576 insane_dns ff5ae500893d0be1
|
3015 3112 1698266342859370576 insane_dns ff5ae500893d0be1
|
||||||
|
3 2850 1698267381088345489 CMakeFiles/insane_dns.dir/src/main.cpp.o 727da43cdbc82421
|
||||||
|
2850 2933 1698267381176344149 insane_dns ff5ae500893d0be1
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Start testing: Oct 25 16:39 EDT
|
Start testing: Oct 25 16:56 EDT
|
||||||
----------------------------------------------------------
|
----------------------------------------------------------
|
||||||
End testing: Oct 25 16:39 EDT
|
End testing: Oct 25 16:56 EDT
|
||||||
|
|
12
src/main.cpp
12
src/main.cpp
|
@ -1,5 +1,7 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Brett Terpstra 6920201
|
||||||
|
* Michael Boulos 6973523
|
||||||
|
* Adrian Pinu 6970677
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@ -26,6 +28,12 @@ static constexpr bool STRICT_MATCHING = false;
|
||||||
// true -> only match A records ; false -> match any named record (A, AAAA, CNAME)
|
// true -> only match A records ; false -> match any named record (A, AAAA, CNAME)
|
||||||
static constexpr bool STRICT_FILTERING = false;
|
static constexpr bool STRICT_FILTERING = false;
|
||||||
|
|
||||||
|
// DNS server to use for forwarding to / resolving DNS requests
|
||||||
|
static inline constexpr std::string DNS_SERVER_IP()
|
||||||
|
{
|
||||||
|
return "8.8.8.8";
|
||||||
|
}
|
||||||
|
|
||||||
// replacement IP address. Make sure this is a 4 octet string seperated by .
|
// replacement IP address. Make sure this is a 4 octet string seperated by .
|
||||||
static inline constexpr IPAddress REPLACEMENT_IP()
|
static inline constexpr IPAddress REPLACEMENT_IP()
|
||||||
{
|
{
|
||||||
|
@ -330,7 +338,7 @@ int main()
|
||||||
|
|
||||||
// forward to google.
|
// forward to google.
|
||||||
size_t out_bytes;
|
size_t out_bytes;
|
||||||
sendUDPMessage("8.8.8.8", recv_buf.data(), bytes, mod_recv_buf, out_bytes);
|
sendUDPMessage(DNS_SERVER_IP(), recv_buf.data(), bytes, mod_recv_buf, out_bytes);
|
||||||
|
|
||||||
uint16_t num_of_answers;
|
uint16_t num_of_answers;
|
||||||
blt::mem::fromBytes(&mod_recv_buf[6], num_of_answers);
|
blt::mem::fromBytes(&mod_recv_buf[6], num_of_answers);
|
||||||
|
|
Loading…
Reference in New Issue