tis-ping-castle-portable icon

Ping-Castle

Paquet d’installation silencieuse pour Ping-Castle

3.3.0.0-11

  • package: tis-ping-castle-portable
  • name: Ping-Castle
  • version: 3.3.0.0-11
  • maintainer: Amel FRADJ
  • editor: Vincent Le Toux
  • licence: https://backend.pingcastle.com/Purchase
  • target_os: windows
  • architecture: all
  • signature_date:
  • size: 5.49 Mo
  • homepage : https://www.pingcastle.com/

package           : tis-ping-castle-portable
version           : 3.3.0.0-11
architecture      : all
section           : base
priority          : optional
name              : Ping-Castle
categories        : 
maintainer        : Amel FRADJ
description       : Ping Castle is a tool designed to quickly assess the level of Active Directory security using a methodology based on risk assessment
depends           : 
conflicts         : 
maturity          : PROD
locale            : 
target_os         : windows
min_wapt_version  : 
sources           : https://github.com/vletoux/pingcastle/releases
installed_size    : 
impacted_process  : 
description_fr    : Ping Castle est un outil conçu pour évaluer rapidement le niveau de sécurité de l'Active Directory avec une méthodologie basée sur l'évaluation des risques
description_pl    : Ping Castle to narzędzie zaprojektowane do szybkiej oceny poziomu bezpieczeństwa Active Directory przy użyciu metodologii opartej na ocenie ryzyka
description_de    : Ping Castle ist ein Tool, das entwickelt wurde, um das Sicherheitsniveau von Active Directory mit einer auf Risikobewertung basierenden Methodik schnell zu bewerten
description_es    : Ping Castle es una herramienta diseñada para evaluar rápidamente el nivel de seguridad de Active Directory mediante una metodología basada en la evaluación de riesgos
description_pt    : O Ping Castle é uma ferramenta concebida para avaliar rapidamente o nível de segurança do Active Directory utilizando uma metodologia baseada na avaliação de riscos
description_it    : Ping Castle è uno strumento progettato per valutare rapidamente il livello di sicurezza di Active Directory utilizzando una metodologia basata sulla valutazione del rischio
description_nl    : Ping Castle is een hulpmiddel dat is ontworpen om snel het beveiligingsniveau van Active Directory te beoordelen met behulp van een methodologie gebaseerd op risicobeoordeling
description_ru    : Ping Castle - это инструмент, предназначенный для быстрой оценки уровня безопасности Active Directory с помощью методики, основанной на оценке рисков
audit_schedule    : 
editor            : Vincent Le Toux
keywords          : 
licence           : https://backend.pingcastle.com/Purchase
homepage          : https://www.pingcastle.com/
package_uuid      : b4f12705-edc7-4ea2-97b9-441a04daf02a
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : dfcbc28f1f71e9edcf48ebb1ea4ef60aca3658739067c78e999b2c995230b6ca
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2024-09-30T10:56:23.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         : nvWtOqO5CY2AX/rAVi7VCfuyfvQu0eCu7K8r+OQ562NA7eHusXbGb/rf5KsgNpxToxqKOzMizbvec2v1OEfL9LmX2icM4mFhk29RBbzaoixzLGmZwggBoZd2seEC/LZgGFILjBRQ1b0RqEPqkqO3tSLVQ7kFPhdwgd4688G2VFTExryTnNcNQefvwzHy+O1JTKOBAnuCKFRRRbLT7HEkxjNUJXZFM9dtYUacx/9p6PezqthwqS7vXhvX5hH+N+L+i/FIPhVGn1RTO385KWhuUR3feVNdG7Crwkw2/x2d4pooycDT8nAJyZAwDAW03L9iNx9vivFL2Hq6n6EeFhucbQ==

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

app_name = "PingCastle"
app_dir = makepath(programfiles, app_name)
app_path = makepath(app_dir, "pingCastle.exe")
audit_version = False

def install():
    # Find the zip file
    zip_name = glob.glob(f"{app_name}*.zip")[0]
    unzip_dest = makepath(".", "temp_dezip")
    
    # Remove the temporary directory if it already exists
    if isdir(unzip_dest):
        remove_tree(unzip_dest)
    
    # Extract the zip file
    print(f"Extracting: {zip_name} to: {unzip_dest}")
    unzip(zip_name, unzip_dest)
    
    # List the contents of the temporary directory
    extracted_files = os.listdir(unzip_dest)
    print(f"Contents of the temporary directory after extraction: {extracted_files}")
    
    # Find the name of the extracted directory or the extracted files
    if not extracted_files:
        raise Exception("No extracted files or directories found")
    
    # If the first extracted item is a directory, use that directory, otherwise use unzip_dest
    first_extracted_item = makepath(unzip_dest, extracted_files[0])
    if isdir(first_extracted_item):
        unzipped_dir = first_extracted_item
    else:
        unzipped_dir = unzip_dest
    
    # Verify that the extracted directory exists
    if not isdir(unzipped_dir):
        raise Exception(f"Invalid source directory for copytree2: {unzipped_dir}")
    
    # Remove the old application directory if it exists
    if isdir(app_dir):
        remove_tree(app_dir)
    
    # Move the new extracted directory or files to the final installation directory
    copytree2(unzipped_dir, app_dir, onreplace=default_overwrite)
    
    # Remove the temporary directory
    remove_tree(unzip_dest)
    
    # Create custom shortcuts
    create_programs_menu_shortcut(app_name, target=app_path,wDir="%userprofile%")
    create_desktop_shortcut(app_name, target=app_path,wDir="%userprofile%")


def audit():
    # Auditing software
    audit_status = "OK"
    installed_version = get_file_properties(app_path).get("FileVersion", "")
    if Version(installed_version) < Version(control.get_software_version()) and audit_version:
        print("%s is installed in version (%s) instead of (%s)" % (app_name, installed_version, control.get_software_version()))
        audit_status = "WARNING"
    elif isdir(app_dir) and not dir_is_empty(app_dir):
        print("%s (%s) is installed" % (app_name, installed_version))
        audit_status = "OK"
    else:
        print("%s is not installed" % app_name)
        audit_status = "ERROR"
    return audit_status

def uninstall():
    # Uninstalling software
    killalltasks(ensure_list(control.impacted_process))
    if isdir(app_dir):
        remove_tree(app_dir)

    remove_programs_menu_shortcut(app_name)
    remove_desktop_shortcut(app_name)

from setuphelpers import *
import requests
import re
import json

def update_package():
    # Déclarer les variables locales
    result = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    git_repo = "vletoux/pingcastle"
   
    url_api = f"https://api.github.com/repos/{git_repo}/releases/latest"
    
    # Getting latest version information from official sources
    print("API used is: %s" % url_api)
    json_load = json.loads(wgets(url_api, proxies=proxies))

    for download in json_load["assets"]:
        if download["browser_download_url"].endswith('.zip') :
            url_dl = download["browser_download_url"]
            version = json_load["tag_name"].replace("v","")
            filename = download["name"]
            break

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

    #nettoyer les fichiers temporaires
    for f in glob.glob('*.zip'):
        if f != filename:
            remove_file(f)
    
    control.set_software_version(version)
    control.save_control_to_wapt()

ad5f7860482ac212a2416e8589b853622d4757a8578b9dbeead77e85b0b2d036 : PingCastle_3.3.0.0.zip
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
df71070c4b2a859c83af5ddc1480c627de5c515f857af9db12f69845cf2f6e8b : WAPT/control
dfcbc28f1f71e9edcf48ebb1ea4ef60aca3658739067c78e999b2c995230b6ca : WAPT/icon.png
cfc03705b57045d4b5b4349a93826a8e1e5749a5ef3baa84af2a29cfc65e08c9 : luti.json
df529e15e41546597cd9d8f2efff2c34db0eeee86aa41491306f66bc1d228f49 : setup.py
0bdb1ff75acdaf082f2a7919c731563d04ca02bc6a4e6189542a6115fe08ab5c : update_package.py