Ping-Castle
Silent install package for Ping-Castle
3.2.0.1-1
- package: tis-ping-castle-portable
- name: Ping-Castle
- version: 3.2.0.1-1
- maintainer: Amel FRADJ
- editor: Vincent Le Toux
- licence: https://backend.pingcastle.com/Purchase
- target_os: windows
- architecture: all
- signature_date:
- size: 3.83 Mo
- homepage : https://www.pingcastle.com/
package : tis-ping-castle-portable
version : 3.2.0.1-1
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 : 8319405b-cbc9-42d8-893e-cd8d8ccb3e6e
valid_from :
valid_until :
forced_install_on :
changelog :
min_os_version :
max_os_version :
icon_sha256sum : dfcbc28f1f71e9edcf48ebb1ea4ef60aca3658739067c78e999b2c995230b6ca
signer : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature : weZi6Derm14e0FkQSbvDBclC5CGoMXuCMJvbF6xyDAeGQxopctNZCM5X2EQEqCueIrSVrEyNc2snBiCj0XRd0ZEPdlTpdO8zW7VyxtFdhEuR9tHiBf6cH9iL9/lyo0Oa1RPQkBnYyJT74z3UXLqfxiTVRr9JZR65b3UZqbKTVqhAv7yPoOfEpTx9tleXEacyO3tvXm4iqf2+X/9auQqwNlIeCo5IdTz6Uua8YCJNI4W9lWOhr1lZpUXDSdLzgYT3cgpBmOMi/1PHH3pvRwaB4auDREorAqkTxlG9jQxNUHQRSTKrr0vEGvtJ2v6lidjYOgFKbwi5PSNprANwAWg1qA==
signature_date : 2024-06-18T10:06:07.789993
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
# -*- 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 get_installed_version(app_path):
return get_file_properties(app_path).get("FileVersion", "")
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)
# Get the desktop path
desktop_path = os.path.expanduser("~\\Desktop")
desktop_shortcut_path = makepath(desktop_path, f"{app_name}.lnk")
# Create the desktop shortcut
print(f"Creating desktop shortcut: {desktop_shortcut_path}")
create_shortcut(desktop_shortcut_path, target=app_path)
print(f"Desktop shortcut created successfully: {desktop_shortcut_path}")
def create_shortcut(shortcut_path, target):
try:
create_desktop_shortcut(shortcut_path, target=target)
return True
except Exception as e:
print(f"Error creating shortcut: {e}")
return False
def audit():
# Auditing software
audit_status = "OK"
installed_version = get_installed_version(app_path)
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)
# Removing shortcuts
desktop_path = os.path.expanduser("~\\Desktop")
desktop_shortcut_path = makepath(desktop_path, f"{app_name}.lnk")
if os.path.exists(desktop_shortcut_path):
print(f"Removing desktop shortcut: {desktop_shortcut_path}")
os.remove(desktop_shortcut_path)
remove_programs_menu_shortcut(app_name)
# Additional check
if os.path.exists(desktop_shortcut_path):
print(f"Failed to remove desktop shortcut: {desktop_shortcut_path}")
else:
print(f"Desktop shortcut removed successfully: {desktop_shortcut_path}")
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()
25f9381187f1fd80c120ca20ec0b4c61a6baa461eeedb1382e4d5e2892f5f9da : setup.py
0bdb1ff75acdaf082f2a7919c731563d04ca02bc6a4e6189542a6115fe08ab5c : update_package.py
dfcbc28f1f71e9edcf48ebb1ea4ef60aca3658739067c78e999b2c995230b6ca : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
7ec3871d1dc934e3b725d9e74d167ec077364657771adf8c7ef5013cf35feb8c : luti.json
314cb197b38516ee6dea9f5494587a21f303ca00e4894df11e4739e3bebfdc6a : PingCastle_3.2.0.1.zip
1dcee50c33532ba1472533f77992a2a3ac68cddc13028af1de7d51242d09e82c : WAPT/control