Skip to content
This repository was archived by the owner on Jul 17, 2020. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions mitmAP.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
#!/usr/bin/python3
# coding=utf-8

import os
import time
import subprocess
from pathlib import Path

header = """
_ _ ___ ______
(_) | / _ \ | ___ \\
_ __ ___ _| |_ _ __ ___ / /_\ \| |_/ /
| '_ ` _ \| | __| '_ ` _ \| _ || __/
| | | | | | | |_| | | | | | | | || |
|_| |_| |_|_|\__|_| |_| |_\_| |_/\_| 2.2
|_| |_| |_|_|\__|_| |_| |_\_| |_/\_| 2.3
"""

try:
Expand All @@ -20,6 +22,7 @@

sudo = "/usr/bin/sudo"
tee = "/usr/bin/tee"
apt = Path("/usr/bin/apt") # Preformance Tweaks By @DarrenRainey

def _run_cmd_write(cmd_args, s):
# write a file using sudo
Expand Down Expand Up @@ -49,17 +52,15 @@ def append_file(path, s):
update = update.lower()
if update == "y" or update == "":
print("[I] Checking/Installing dependencies, please wait...")
os.system("sudo apt-get update")
os.system("sudo apt-get install dnsmasq -y")
os.system("sudo apt-get install wireshark -y")
os.system("sudo apt-get install hostapd -y")
os.system("sudo apt-get install screen -y")
os.system("sudo apt-get install wondershaper -y")
os.system("sudo apt-get install driftnet -y")
os.system("sudo apt-get install python-pip -y")
os.system("sudo apt-get install python3-pip -y")
os.system("sudo apt-get install python3-dev libffi-dev libssl-dev libxml2-dev libxslt1-dev libjpeg62-turbo-dev zlib1g-dev -y")
os.system("sudo apt-get install libpcap-dev -y")
if apt.is_file():
print("APT Found Using Instead Of APT-GET") # Use APT when possiable for nicer UI and speed increase
os.system("apt update")
os.system("apt install dnsmasq wireshark hostapd screen wondershaper driftnet python-pip python3-pip python3-dev libffi-dev libssl-dev libxml2-dev libxslt1-dev libjpeg62-turbo-dev zlib1g-dev libpcap-dev -y")
else:
print("APT Not Found - Falling Back To APT-GET)
os.system("apt-get update")
os.system("apt-get install dnsmasq wireshark hostapd screen wondershaper driftnet python-pip python3-pip python3-dev libffi-dev libssl-dev libxml2-dev libxslt1-dev libjpeg62-turbo-dev zlib1g-dev libpcap-dev -y")

os.system("sudo python3 -m pip install mitmproxy")
os.system("sudo python -m pip install dnspython")
os.system("sudo python -m pip install pcapy")
Expand Down