Added optional domain intercepting
This commit is contained in:
parent
d0161776a6
commit
5af2cca3c6
16
main.py
16
main.py
@ -7,10 +7,17 @@ import dns.message
|
|||||||
import netifaces
|
import netifaces
|
||||||
import os
|
import os
|
||||||
import argparse
|
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 = 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()
|
args = parser.parse_args()
|
||||||
print(args)
|
if args.r == True:
|
||||||
|
print(bcolors.OK+"Domain intercepting enabled!"+bcolors.RESET)
|
||||||
listeningIPs = []
|
listeningIPs = []
|
||||||
print("DoT (DNS over TLS) Proxy resolver - <Written by Caleb Fontenot>")
|
print("DoT (DNS over TLS) Proxy resolver - <Written by Caleb Fontenot>")
|
||||||
# ASCII Art because why not
|
# ASCII Art because why not
|
||||||
@ -30,11 +37,6 @@ for iface in netifaces.interfaces():
|
|||||||
print("Listening on", listeningIPs)
|
print("Listening on", listeningIPs)
|
||||||
print("Hailey is my Soulmate!")
|
print("Hailey is my Soulmate!")
|
||||||
ttl=53
|
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
|
# REGEX Magic, how does it work
|
||||||
IPV4SEG = r'(?:25[0-5]|(?:2[0-4]|1{0,1}[0-9]){0,1}[0-9])'
|
IPV4SEG = r'(?:25[0-5]|(?:2[0-4]|1{0,1}[0-9]){0,1}[0-9])'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user