From bba6e37b05da0b150cc063cae795ab0766f5031f Mon Sep 17 00:00:00 2001 From: Brett Laptop Date: Wed, 25 Oct 2023 17:02:04 -0400 Subject: [PATCH] hello --- cmake-build-debug/.ninja_deps | Bin 323564 -> 327084 bytes cmake-build-debug/.ninja_log | 2 ++ .../Testing/Temporary/LastTest.log | 4 ++-- src/main.cpp | 12 ++++++++++-- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/cmake-build-debug/.ninja_deps b/cmake-build-debug/.ninja_deps index 3cc6b5c306acf33399083fff678dedd7ddd978ad..aab93381e93373320fdf9c06db6d661012c6fa37 100644 GIT binary patch delta 40 wcmaEJUwF-L;f5B*7N!>FEi7-|PuHo1U*Px# delta 17 ZcmZ4UTlmd=;f5B*7N!>FEi7-|0{~4D2tEJ+ 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);