tis-charles icon

Charles

Silent install package for Charles

5.0.2-3

  • package: tis-charles
  • name: Charles
  • version: 5.0.2-3
  • maintainer: WAPT Team,Tranquil IT,Flavien Schelfaut
  • licence: Copyright (c) 2019 Tam Nguyen M.
  • locale: all
  • target_os: windows
  • impacted_process: Charles
  • architecture: x64
  • signature_date:
  • size: 69.00 Mo
  • installed_size: 75.04 Mo
  • homepage : https://www.charlesproxy.com/

package           : tis-charles
version           : 5.0.2-3
architecture      : x64
section           : base
priority          : optional
name              : Charles
categories        : 
maintainer        : WAPT Team,Tranquil IT,Flavien Schelfaut
description       : Charles is an HTTP proxy / HTTP monitor / Reverse Proxy that enables a developer to view all of the HTTP and SSL / HTTPS traffic between their machine and the Internet. This includes requests, responses and the HTTP headers (which contain the cookies and caching information)
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : windows
min_wapt_version  : 2.1
sources           : 
installed_size    : 75037640
impacted_process  : Charles
description_fr    : Charles est un proxy HTTP / moniteur HTTP / proxy inverse qui permet à un développeur de visualiser l'ensemble du trafic HTTP et SSL / HTTPS entre sa machine et l'Internet. Cela inclut les requêtes, les réponses et les en-têtes HTTP (qui contiennent les cookies et les informations de mise en cache)
description_pl    : Charles to serwer proxy HTTP / monitor HTTP / Reverse Proxy, który umożliwia programiście przeglądanie całego ruchu HTTP i SSL / HTTPS między jego komputerem a Internetem. Obejmuje to żądania, odpowiedzi i nagłówki HTTP (które zawierają pliki cookie i informacje o buforowaniu)
description_de    : Charles ist ein HTTP-Proxy / HTTP-Monitor / Reverse Proxy, der es einem Entwickler ermöglicht, den gesamten HTTP- und SSL-/HTTPS-Verkehr zwischen seinem Rechner und dem Internet einzusehen. Dazu gehören Anfragen, Antworten und die HTTP-Header (die die Cookies und Caching-Informationen enthalten)
description_es    : Charles es un proxy HTTP / monitor HTTP / Proxy Inverso que permite a un desarrollador ver todo el tráfico HTTP y SSL / HTTPS entre su máquina e Internet. Esto incluye peticiones, respuestas y las cabeceras HTTP (que contienen las cookies y la información de caché)
description_pt    : O Charles é um proxy HTTP / monitor HTTP / proxy inverso que permite a um programador visualizar todo o tráfego HTTP e SSL / HTTPS entre a sua máquina e a Internet. Isto inclui pedidos, respostas e os cabeçalhos HTTP (que contêm os cookies e a informação de cache)
description_it    : Charles è un proxy HTTP / monitor HTTP / Reverse Proxy che consente a uno sviluppatore di visualizzare tutto il traffico HTTP e SSL / HTTPS tra il proprio computer e Internet. Questo include le richieste, le risposte e le intestazioni HTTP (che contengono i cookie e le informazioni sulla cache)
description_nl    : Charles is een HTTP-proxy / HTTP-monitor / Reverse Proxy waarmee een ontwikkelaar al het HTTP- en SSL / HTTPS-verkeer tussen zijn machine en het internet kan bekijken. Dit omvat verzoeken, antwoorden en de HTTP-headers (die de cookies en caching-informatie bevatten)
description_ru    : Charles - это HTTP-прокси / HTTP-монитор / обратный прокси, который позволяет разработчику просматривать весь HTTP и SSL / HTTPS трафик между его машиной и Интернетом. Сюда входят запросы, ответы и HTTP-заголовки (которые содержат куки и информацию о кэшировании)
audit_schedule    : 
editor            : 
keywords          : proxy,web,http,ssl
licence           : Copyright (c) 2019 Tam Nguyen M.
homepage          : https://www.charlesproxy.com/
package_uuid      : 8e8c3c9e-03c2-4f32-81d1-3b3254122faf
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://www.charlesproxy.com/documentation/version-history/
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 07e375c532e9eab58ddcfdcb7b2989b7a6163b2de1e179964571b2c9bbc728a2
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2025-08-16T13:00:20.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         : oTOoYRG58sNSaL1S7PQrCV/ZVjmQ4V7+rtUW86bcOL9JuJ+KvC1j0foRN1OdYb2VBIzfc43BurJf4t4jSKTScq8lXmYXLZblvB3TVAfppoKE99a+hRn9iNb+Xv7j53lwPdYPpuIsXhN2VY+aSO2Y9S661TT2WWHvYY4sVMt7C1dZoCAoHaByEzHaGCmnc4Ol/9Dti1lhHDCWWfRHQ7RxazJaGT/CF7BD1lr7MbnRjIWKZF1GR1GdNqJfHRDL3EAlBoHSMA2f/WppkWM/blYHBWPLMxFw7Aw84+AW3CcanNScVXeabkU76KN/jWY4nEOYFRgB7p8tPXnBl32y8AYwqg==

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

"""
Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()
 {
   "key":"{C71C4442-CA69-443C-AFC1-53E0D4AD7D1A}",
   "name":"Charles 4.6.6",
   "version":"4.6.6.0",
   "install_date":"2024-05-16 00:00:00",
   "install_location":"",
   "uninstall_string":"MsiExec.exe /X{C71C4442-CA69-443C-AFC1-53E0D4AD7D1A}",
   "publisher":"XK72 Ltd",
   "system_component":0,
   "win64":true
  }

"""

def install():
    # Declaring local variables
    bin_name = glob.glob("charles-proxy*.msi")[0]
    version = control.get_software_version()
    
    # Uninstalling older version of the software that can remains
    for to_uninstall in installed_softwares(name="^Charles "):
      if Version(to_uninstall["version"]) < Version(control.get_software_version()):
        print(f"Removing: {to_uninstall['name']} ({to_uninstall['version']})")
        killalltasks(ensure_list(control.impacted_process))
        run(uninstall_cmd(to_uninstall["key"]))
        wait_uninstallkey_absent(to_uninstall["key"])

    install_msi_if_needed(
        bin_name,
        name=f"Charles {version}",
        min_version=version
    )



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


def update_package():
    # Declaring local variables
    package_updated = False
    proxies = get_proxies_from_wapt_console()
    if not proxies:
        proxies = proxies = get_proxies()
    app_name = control.name

    url_base = "https://www.charlesproxy.com/latest-release/"
    
    version = bs_find(url_base,"input", "name", "version", proxies=proxies)['value'].replace('v', '')
    
    download_dict = {
        "windows-x64": f"https://www.charlesproxy.com/assets/release/{version}/charles-proxy-{version}-win-x86_64.msi",
        "darwin-x64" :f"https://www.charlesproxy.com/assets/release/{version}/charles-proxy-{version}.dmg",
        "linux-x64" : f"https://www.charlesproxy.com/assets/release/{version}/charles-proxy-{version}_amd64.tar.gz"
    }
    
    download_url = download_dict[control.target_os + "-" + ensure_list(control.architecture)[0]]
    latest_bin = download_url.split("/")[-1]
    latest_bin_extension = latest_bin.rsplit('.', 1)[-1]

    # Downloading latest binaries
    print(f"Latest {app_name} version is: {version}")
    print(f"Download URL is: {download_url}")
    if not isfile(latest_bin):
        print(f"Downloading: {latest_bin}")
        wget(download_url, latest_bin, proxies=proxies)
    else:
        print(f"Binary is present: {latest_bin}")

    expected_issuer = 'XK72 Limited'
    sign_name = waptlicences.check_msi_signature(latest_bin)[0]
    if sign_name != expected_issuer:
        error(f'Bad issuer {sign_name} != {expected_issuer} ')

    # Deleting outdated binaries
    for f in glob.glob(f'*.{latest_bin_extension}'):
        if f != latest_bin:
            remove_file(f)

    # Changing version of the package
    if Version(version) > Version(control.get_software_version()):
        print(f"Software version updated (from: {control.get_software_version()} to: {version})")
        package_updated = True
    else:
        print(f"Software version up-to-date ({version})")

    control.set_software_version(version)
    control.save_control_to_wapt()

    # Validating or not update-package-sources
    return package_updated

38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
a3fd5948b2a2bc57f26169fc913bacdf148302069e3f3deb6ef4a92c971bcf58 : WAPT/control
07e375c532e9eab58ddcfdcb7b2989b7a6163b2de1e179964571b2c9bbc728a2 : WAPT/icon.png
a676416ff4ab7ebb40f98ba4eaadcda7ee207230ca1f63aca01d0eb2a12410f2 : charles-proxy-5.0.2-win-x86_64.msi
4918f117bb3c7be028341a74f90d3a32e8134a6906920c8d860df7aaee1342be : luti.json
26072b321967e69dc22932406199e6988819232a751aa6f8813db430938463bc : setup.py
c754aef2f5ca62eb513c4c3a1f5408ba820b595256537b34dd80e097836fdb20 : update_package.py