diff --git a/cmake-build-debug/.ninja_deps b/cmake-build-debug/.ninja_deps index 3cc6b5c..aab9338 100644 Binary files a/cmake-build-debug/.ninja_deps and b/cmake-build-debug/.ninja_deps differ diff --git a/cmake-build-debug/.ninja_log b/cmake-build-debug/.ninja_log index f3bca87..2482bd4 100644 --- a/cmake-build-debug/.ninja_log +++ b/cmake-build-debug/.ninja_log @@ -31,3 +31,5 @@ 2935 3019 1698265309752227101 insane_dns ff5ae500893d0be1 2 3015 1698266342759371787 CMakeFiles/insane_dns.dir/src/main.cpp.o 727da43cdbc82421 3015 3112 1698266342859370576 insane_dns ff5ae500893d0be1 +3 2850 1698267381088345489 CMakeFiles/insane_dns.dir/src/main.cpp.o 727da43cdbc82421 +2850 2933 1698267381176344149 insane_dns ff5ae500893d0be1 diff --git a/cmake-build-debug/Testing/Temporary/LastTest.log b/cmake-build-debug/Testing/Temporary/LastTest.log index f3d7b36..be24835 100644 --- a/cmake-build-debug/Testing/Temporary/LastTest.log +++ b/cmake-build-debug/Testing/Temporary/LastTest.log @@ -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 diff --git a/src/main.cpp b/src/main.cpp index f253453..8bbcbde 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,5 +1,7 @@ /** - * + * Brett Terpstra 6920201 + * Michael Boulos 6973523 + * Adrian Pinu 6970677 */ #include @@ -26,6 +28,12 @@ static constexpr bool STRICT_MATCHING = false; // true -> only match A records ; false -> match any named record (A, AAAA, CNAME) 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 . static inline constexpr IPAddress REPLACEMENT_IP() { @@ -330,7 +338,7 @@ int main() // forward to google. 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; blt::mem::fromBytes(&mod_recv_buf[6], num_of_answers);