Skip to content
This repository has been archived by the owner on Jul 17, 2020. It is now read-only.

Commit

Permalink
Removed "www" replace from DNS spoofing
Browse files Browse the repository at this point in the history
  • Loading branch information
xdavidhu committed Dec 17, 2017
1 parent ffb814e commit ab099ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions mitmAP.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,8 @@ def append_file(path, s):
i = 0
while int(ssl_dns_num) != i:
ssl_dns_num_temp = i + 1
ssl_dns_domain = input("[?] " + str(ssl_dns_num_temp) + ". domain to spoof (no need for 'www.'): ")
ssl_dns_domain = input("[?] " + str(ssl_dns_num_temp) + ". domain to spoof: ")
ssl_dns_ip = input("[?] Fake IP for domain '" + ssl_dns_domain + "': ")
ssl_dns_domain = ssl_dns_domain.replace("www.", "")
ssl_dns_line = ssl_dns_domain + " " + ssl_dns_ip + "\n"
os.system("sudo echo -e '" + ssl_dns_line + "' >> "+ script_path + "src/dns2proxy/spoof.cfg")
i = i + 1
Expand Down Expand Up @@ -255,9 +254,8 @@ def append_file(path, s):
i = 0
while int(dns_num) != i:
dns_num_temp = i + 1
dns_domain = input("[?] " + str(dns_num_temp) + ". domain to spoof (no need for 'www.'): ")
dns_domain = input("[?] " + str(dns_num_temp) + ". domain to spoof: ")
dns_ip = input("[?] Fake IP for domain '" + dns_domain + "': ")
dns_domain = dns_domain.replace("www.", "")
dns_line = "address=/" + dns_domain + "/" + dns_ip + "\n"
append_file("/etc/dnsmasq.conf", dns_line)
i = i + 1
Expand Down
6 changes: 2 additions & 4 deletions mitmAP_rpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,8 @@
i = 0
while int(ssl_dns_num) != i:
ssl_dns_num_temp = i + 1
ssl_dns_domain = input("[?] " + str(ssl_dns_num_temp) + ". domain to spoof (no need for 'www.'): ")
ssl_dns_domain = input("[?] " + str(ssl_dns_num_temp) + ". domain to spoof: ")
ssl_dns_ip = input("[?] Fake IP for domain '" + ssl_dns_domain + "': ")
ssl_dns_domain = ssl_dns_domain.replace("www.", "")
ssl_dns_line = ssl_dns_domain + " " + ssl_dns_ip + "\n"
os.system("sudo echo -e '" + ssl_dns_line + "' >> "+ script_path + "src/dns2proxy/spoof.cfg")
i = i + 1
Expand Down Expand Up @@ -244,9 +243,8 @@
i = 0
while int(dns_num) != i:
dns_num_temp = i + 1
dns_domain = input("[?] " + str(dns_num_temp) + ". domain to spoof (no need for 'www.'): ")
dns_domain = input("[?] " + str(dns_num_temp) + ". domain to spoof: ")
dns_ip = input("[?] Fake IP for domain '" + dns_domain + "': ")
dns_domain = dns_domain.replace("www.", "")
dns_line = "address=/" + dns_domain + "/" + dns_ip
os.system("sudo echo -e '" + dns_line + "' >> /etc/dnsmasq.conf")
i = i + 1
Expand Down

0 comments on commit ab099ce

Please sign in to comment.