From 5af2cca3c6418082ac77646b16276e9e93a5256d Mon Sep 17 00:00:00 2001 From: Caleb Fontenot Date: Sat, 15 Jan 2022 19:25:08 -0600 Subject: [PATCH] Added optional domain intercepting --- main.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/main.py b/main.py index bca3b70..774dceb 100755 --- a/main.py +++ b/main.py @@ -7,10 +7,17 @@ import dns.message import netifaces import os import argparse +class bcolors: + OK = '\033[92m' #GREEN + WARNING = '\033[93m' #YELLOW + FAIL = '\033[91m' #RED + RESET = '\033[0m' #RESET COLOR + parser = argparse.ArgumentParser(description='a DoT Proxy resolver.') -parser.add_argument('-r',action="store_true", help='Optional: Disable request intercepting') +parser.add_argument('-r',action="store_true", help='Optional: Enable request intercepting') args = parser.parse_args() -print(args) +if args.r == True: + print(bcolors.OK+"Domain intercepting enabled!"+bcolors.RESET) listeningIPs = [] print("DoT (DNS over TLS) Proxy resolver - ") # ASCII Art because why not @@ -30,11 +37,6 @@ for iface in netifaces.interfaces(): print("Listening on", listeningIPs) print("Hailey is my Soulmate!") ttl=53 -class bcolors: - OK = '\033[92m' #GREEN - WARNING = '\033[93m' #YELLOW - FAIL = '\033[91m' #RED - RESET = '\033[0m' #RESET COLOR # REGEX Magic, how does it work IPV4SEG = r'(?:25[0-5]|(?:2[0-4]|1{0,1}[0-9]){0,1}[0-9])'