tis-mitmproxy icon

mitmproxy

Paquet d’installation silencieuse pour mitmproxy

12.1.2-1

  • package: tis-mitmproxy
  • name: mitmproxy
  • version: 12.1.2-1
  • categories: Internet
  • maintainer: WAPT Team,Tranquil IT,Amel FRADJ
  • licence: opensource_free,wapt_public
  • target_os: windows
  • architecture: x64
  • signature_date:
  • size: 54.66 Mo
  • homepage : https://mitmproxy.org/

package           : tis-mitmproxy
version           : 12.1.2-1
architecture      : x64
section           : base
priority          : optional
name              : mitmproxy
categories        : Internet
maintainer        : WAPT Team,Tranquil IT,Amel FRADJ
description       : mitmproxy is a man-in-the-middle interactive proxy for HTTP and HTTPS with a console interface
depends           : 
conflicts         : 
maturity          : PROD
locale            : 
target_os         : windows
min_wapt_version  : 2.3
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : mitmproxy est un proxy interactif de type man-in-the-middle pour HTTP et HTTPS avec une interface console
description_pl    : mitmproxy to interaktywny serwer proxy typu man-in-the-middle dla HTTP i HTTPS z interfejsem konsoli (jeszcze niedostępny w systemie Windows)
description_de    : mitmproxy ist ein interaktiver Man-in-the-middle-Proxy für HTTP und HTTPS mit einer Konsolenschnittstelle (noch nicht für Windows verfügbar)
description_es    : mitmproxy es un proxy interactivo man-in-the-middle para HTTP y HTTPS con interfaz de consola (aún no disponible en Windows)
description_pt    : O mitmproxy é um proxy interativo man-in-the-middle para HTTP e HTTPS com uma interface de consola (ainda não disponível no Windows)
description_it    : mitmproxy è un proxy interattivo man-in-the-middle per HTTP e HTTPS con interfaccia console (non ancora disponibile su Windows)
description_nl    : mitmproxy is een interactieve man-in-the-middle proxy voor HTTP en HTTPS met een console-interface (nog niet beschikbaar op Windows)
description_ru    : mitmproxy - интерактивный прокси для HTTP и HTTPS с консольным интерфейсом (пока недоступен для Windows)
audit_schedule    : 
editor            : 
keywords          : 
licence           : opensource_free,wapt_public
homepage          : https://mitmproxy.org/
package_uuid      : 3b8919e0-cf1e-4c22-8cfc-1f59c276e797
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 556365db50e3ca3d7943485cea92ed4bf0ff45da2ff6f5cca2bf41182dfee9e2
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2025-08-30T07:00:22.000000
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
signature         : rRjnxQZ+gzuF7iL/Ow06Ec0VGA4DHPhVYNHeLMv4ciOtVEQKLCONMtdcrwlreUHEPHqvUO32LVNaqKB4VZp9ogFqMTMj/jF4+OcyLEd9Tsa13X9kSeXOZdSVzGm1TUvC6sHQNq9iKw3BSTpYrYZUzC7+OKN0bCBIAlYyxgHIBUCAsxqRG9r4D0egIYpZlUPuR2x6Zo6heWoDyudrTghupPWV/L6b7dXfP7/lJOCT/IV5RHZ5/1NVUo093AbitwBeyNZ2IIlYfA2NIeUrz1ILJnc3T9+MyX6W/3OO0DAZ3qeFGR7HDNpL0H09n5/UOIh+IoGyMj6lYEaxZMRqe56kSw==

# -*- coding: utf-8 -*-
from setuphelpers import *

r"""
Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()

"""
# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls


def install():
    # Declaring local variables
    bin_name = glob.glob('mitmproxy-*.exe')[0]
    version = control.get_software_version()
    uninstall_key = f"mitmproxy {version}"
    # Installing the software
    install_exe_if_needed(bin_name,
        silentflags='--mode unattended',
        key=uninstall_key,
        min_version=version,
    )
    uninstallkey.clear()

def audit():
    # Declaring local variables
    audit_status = "OK"
    detected_apps = installed_softwares("mitmproxy")
    if detected_apps:
        installed_version = detected_apps[0]["version"]
        control.name = detected_apps[0]["name"]
    else:
        installed_version = ""
        control.name = control.package.split("-", 1)[-1].replace("-", " ").title()
    audit_version = False

    # Auditing software
    if not installed_version:
        print(f"{control.name} is not installed.")
        audit_status = "ERROR"
    elif audit_version and Version(installed_version, 4) < Version(control.get_software_version(), 4):
        print(f"{control.name} ({installed_version}) installed version should be: {control.get_software_version()}")
        audit_status = "WARNING"
    else:
        print(f'{control.name} ({installed_version if not installed_version in control.name else "" }) is installed.')
        audit_status = "OK"

    return audit_status

def uninstall():
    # Force uninstalling the software
    for to_uninstall in installed_softwares(name="mitmproxy"):
        print("Removing: %s (%s)" % (to_uninstall["name"], to_uninstall["version"]))
        killalltasks(ensure_list(control.impacted_process))
        
        try:
            # Adding silent flags to the uninstall command
            uninstall_command = uninstall_cmd(to_uninstall["key"]) + " --mode unattended"
            run(uninstall_command)
            wait_uninstallkey_absent(to_uninstall["key"], max_loop=60)
        except Exception as e:
            print(f"Error during uninstallation: {e}")
            # Handling the case where mitmproxy might already be partially uninstalled
            print("mitmproxy might have already been uninstalled.")
            print("Removing mitmproxy from the list of installed programs.")
            
        if uninstall_key_exists(to_uninstall["key"]):
            unregister_uninstall(to_uninstall["key"], win64app=to_uninstall["win64"])
        
        # Clean up any remaining files
        if isdir(to_uninstall["install_location"]):
            print(f"Removing remaining files in {to_uninstall['install_location']}")
            remove_tree(to_uninstall["install_location"])
    

# -*- coding: utf-8 -*-
from setuphelpers import *
from setupdevhelpers import *
import json

# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls


def update_package():
    result = False
    proxies = get_proxies()

    if not proxies:
        proxies = get_proxies_from_wapt_console()
    
    git_repo = "mitmproxy/mitmproxy"
    url_api = "https://api.github.com/repos/%s/releases/latest" % git_repo   
    # Getting latest version information from official sources
    print("API used is: %s" % url_api)
    json_load = json.loads(wgets(url_api, proxies=proxies))
    version = json_load["tag_name"].replace("v","")
    
    url_dl = f"https://downloads.mitmproxy.org/{version}/mitmproxy-{version}-windows-x86_64-installer.exe"
    filename = url_dl.split("/")[-1]

    if not isfile(filename):
        package_updated = True
        wget(url_dl,filename,proxies=proxies)

    #nettoyer les fichiers temporaires
    for f in glob.glob('*.exe'):
        if f != filename:
            remove_file(f)

    version =get_version_from_binary(filename)
    control.set_software_version(version)
    control.save_control_to_wapt()

38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
11d0820d854815ebd5e018b4d630001e7524d53abe0505eb105af56ef79554ff : WAPT/control
556365db50e3ca3d7943485cea92ed4bf0ff45da2ff6f5cca2bf41182dfee9e2 : WAPT/icon.png
3f1cbef1ed2d8a287bd907e7a06b441014792169c3894cb85c81054aea1923f9 : luti.json
a7c1ea281576c01b55e5ed65e2834e58f498938ed1d60229ea679b288c795a7f : mitmproxy-12.1.2-windows-x86_64-installer.exe
ded04258c482a8dcfea2ba833d82922f7af544641c7752457fa6c4e6c2dbf9df : setup.py
22cb86e8e1ad6ca2a7192b063daf081237e945acb2e3cd112426b90b66a5e9bb : update_package.py