tis-ccleaner
5.92.9652-26
CCleaner is a computer utility program used to clean potentially unwanted files (including temporary internet files, where malicious programs and code tend to reside) and invalid Windows Registry entries from a computer, originally supporting Microsoft Windows only.
7802 downloads
See build result See VirusTotal scan

Description
- package : tis-ccleaner
- name : CCleaner
- version : 5.92.9652-26
- categories : Utilities,System and network
- maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ
- installed_size : 53272576
- editor : Piriform
- licence : Freemium
- signature_date : 2022-04-16T17:00:49.147413
- size : 43.63 Mo
- locale : all
- target_os : windows
- impacted_process : CCleaner64,CCleaner,CCUpdate
- architecture : all
- Homepage : https://www.ccleaner.com
control
package : tis-ccleaner
version : 5.92.9652-26
architecture : all
section : base
priority : optional
name : CCleaner
categories : Utilities,System and network
maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ
description : CCleaner is a computer utility program used to clean potentially unwanted files (including temporary internet files, where malicious programs and code tend to reside) and invalid Windows Registry entries from a computer, originally supporting Microsoft Windows only.
depends :
conflicts :
maturity : PROD
locale : all
target_os : windows
min_wapt_version : 1.7
sources : https://www.ccleaner.com/ccleaner/builds
installed_size : 53272576
impacted_process : CCleaner64,CCleaner,CCUpdate
description_fr : CCleaner (abréviation de Crap Cleaner) est un gratuiciel permettant d'optimiser le fonctionnement d'un ordinateur muni du système d'exploitation Windows. Il supprime les fichiers et les enregistrements inutiles, ce qui permet à l'ordinateur de fonctionner plus rapidement et libère de l'espace sur les périphériques de stockage (disques durs ou SSD).
description_pl : CCleaner (dawniej Crap Cleaner) – opracowany przez firmę Piriform program narzędziowy na licencji freemium służący między innymi do oczyszczania komputera z niepotrzebnych plików i nieprawidłowych wpisów rejestru systemu Windows.
description_de : CCleaner (früherer Name Crap Cleaner) ist ein kostenloses Programm zur Optimierung für die Betriebssysteme Windows, macOS und Android. Windows wird ab Windows XP auf 32- und 64-Bit-Systemen unterstützt.
description_es : CCleaner (anteriormente Crap Cleaner) es una aplicación gratuita, de código cerrado, que tiene como propósito mejorar el rendimiento de cualquier equipo que ejecute Microsoft Windows mediante la eliminación de los archivos innecesarios y las entradas inválidas del registro de Windows.
description_pt :
description_it :
description_nl :
description_ru :
audit_schedule :
editor : Piriform
keywords : cleaner,ccleaner,disk,cleanup
licence : Freemium
homepage : https://www.ccleaner.com
package_uuid : 0feeb479-f037-4e94-8e3e-fe39afe977f2
valid_from :
valid_until :
forced_install_on :
changelog : https://www.ccleaner.com/ccleaner/version-history
min_os_version : 5.1
max_os_version :
icon_sha256sum : e178a6e3cb2f5123bbba384661c37d867c4b7a0308ee8bb6a43576e03e3ff4a8
signer : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature : a9hPRKQseuahhFJDQA9Pk+52lWfspGJoe04Is1qYehh+Fn1jqpNsTk4ncL+zwTp7x1lFdqxCveEGWtX/i3BZIm/rwQj6yXa4742FcGlrMAcNjWA4VT9ZrMAO+N2AH8NnmXfRPRSv/67XsqBLN/2JS+jLpDcEsc2oAtmmq15fTpWqk39P+zVdsMrlkfMS2duFJTWXWZOxQaopRQa+UYCDZfXK50mAVtvuaVQxsSNdtDYIenTBhyu6Q2xvIZrUJ7BHte0AjXjl+4JdQK0kMfZc1RB4OsTnjI8r0m6pyrZGaEO+ZtExjql/qzXI7Ax7cqb3KTD6svnGAqfCS7Slc/Fsbw==
signature_date : 2022-04-16T17:00:49.147413
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
Setup.py
# -*- coding: utf-8 -*-
from setuphelpers import *
import platform
import bs4 as BeautifulSoup
"""
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
sub_bin_name = "ccsetup_%s_slim.exe"
silent_inst_arg = "/S"
uninstall_key = "CCleaner"
app_path = makepath(programfiles, "CCleaner")
conf_file_path = makepath(programfiles, "CCleaner", "ccleaner.ini")
schtasks_to_disable = [r"\CCleaner Update", r"\CCleanerSkipUAC"]
list_recycle_bin_context_menu = ["Exécuter CCleaner", "Ouvrir CCleaner...", "Run CCleaner", "Open CCleaner..."]
def install():
# Initializing variables
package_version = control.version.split("-")[0]
bin_name = sub_bin_name % package_version
package_version_split = package_version.split(".")
short_package_version = "%s.%s" % (package_version_split[0], package_version_split[1])
app_name = control.name
# Uninstalling older versions
# Uninstalling older versions of the software
for to_uninstall in installed_softwares(name=r"CCleaner"):
if Version(to_uninstall["version"]) < Version(package_version) or force:
print("Removing: %s (%s)" % (to_uninstall["name"], to_uninstall["version"]))
killalltasks(control.impacted_process.split(","))
run(uninstall_cmd(to_uninstall["key"]))
wait_uninstallkey_absent(to_uninstall["key"])
# Installing the package
print("Installing: %s" % bin_name)
install_exe_if_needed(bin_name, silentflags=silent_inst_arg, key=uninstall_key, min_version=short_package_version)
# Removing Shortcut
remove_desktop_shortcut(app_name)
# Disabling CCleaner Scheduled Tasks
for task in schtasks_to_disable:
if task_exists(task):
try:
disable_task(task)
except:
print("Unable to disable the task: %s" % task)
# Removing global configuration file
if isfile(conf_file_path):
remove_file(conf_file_path)
# Disable CCleaner Telemetry
registry_set(HKEY_LOCAL_MACHINE, r"SOFTWARE\Piriform\CCleaner", "(Cfg)QuickClean", "0")
registry_set(HKEY_LOCAL_MACHINE, r"SOFTWARE\Piriform\CCleaner", "(Cfg)QuickCleanIpm", "0")
registry_set(HKEY_LOCAL_MACHINE, r"SOFTWARE\Piriform\CCleaner", "(Cfg)SoftwareUpdater", "0")
registry_set(HKEY_LOCAL_MACHINE, r"SOFTWARE\Piriform\CCleaner", "(Cfg)SoftwareUpdaterIpm", "0")
registry_set(HKEY_LOCAL_MACHINE, r"SOFTWARE\Piriform\CCleaner", "(Cfg)GetIpmForTrial", "0")
registry_set(HKEY_LOCAL_MACHINE, r"SOFTWARE\Piriform\CCleaner", "(Cfg)HealthCheck", "0")
registry_set(HKEY_LOCAL_MACHINE, r"SOFTWARE\Piriform\CCleaner", "(Cfg)HealthCheckCommentsConfused", "0")
registry_set(HKEY_LOCAL_MACHINE, r"SOFTWARE\Piriform\CCleaner", "(Cfg)HealthCheckCommentsDislike", "0")
registry_set(HKEY_LOCAL_MACHINE, r"SOFTWARE\Piriform\CCleaner", "(Cfg)HealthCheckCommentsHate", "0")
registry_set(HKEY_LOCAL_MACHINE, r"SOFTWARE\Piriform\CCleaner", "(Cfg)HealthCheckCommentsLike", "0")
registry_set(HKEY_LOCAL_MACHINE, r"SOFTWARE\Piriform\CCleaner", "(Cfg)HealthCheckCommentsLove", "0")
registry_set(HKEY_LOCAL_MACHINE, r"SOFTWARE\Piriform\CCleaner", "(Cfg)HealthCheckCommentsOkay", "0")
registry_set(HKEY_LOCAL_MACHINE, r"SOFTWARE\Piriform\CCleaner", "(Cfg)HealthCheckIpm", "0")
registry_set(HKEY_LOCAL_MACHINE, r"SOFTWARE\Piriform\CCleaner", "(Cfg)HealthCheckVersion", "0")
registry_set(HKEY_LOCAL_MACHINE, r"SOFTWARE\Piriform\CCleaner", "(Cfg)AlphaIntegration", "0")
registry_set(HKEY_LOCAL_MACHINE, r"SOFTWARE\Piriform\CCleaner", "(Cfg)TrialOnboarding", "0")
# Remove CCleaner from Recycle Bin context menu
for menu in list_recycle_bin_context_menu:
if reg_key_exists(HKEY_LOCAL_MACHINE, r"SOFTWARE\Classes\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shell\%s" % menu):
registry_deletekey(
HKEY_LOCAL_MACHINE, r"SOFTWARE\Classes\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shell\%s\command" % menu, "", force=True
)
registry_deletekey(HKEY_LOCAL_MACHINE, r"SOFTWARE\Classes\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shell\%s" % menu, "", force=True)
""" # Removing CCleaner Spying values in machine registry # Not recommended
registry_delete(HKEY_LOCAL_MACHINE,r'SOFTWARE\Piriform\CCleaner','(Cfg)LastUpdate')
registry_delete(HKEY_LOCAL_MACHINE,r'SOFTWARE\Piriform\CCleaner','(Cfg)TTL')
registry_delete(HKEY_LOCAL_MACHINE,r'SOFTWARE\Piriform\CCleaner','(Cfg)TTL-Spread')
registry_delete(HKEY_LOCAL_MACHINE,r'SOFTWARE\Piriform\CCleaner','(Cfg)TTL-Spread')
registry_delete(HKEY_LOCAL_MACHINE,r'SOFTWARE\Piriform\CCleaner','GD')
registry_delete(HKEY_LOCAL_MACHINE,r'SOFTWARE\Piriform\CCleaner','(Cfg)ABTestingNames')
registry_delete(HKEY_LOCAL_MACHINE,r'SOFTWARE\Piriform\CCleaner','(Cfg)ccst-prev-001') """
""" # No longer using global parameters since it do not work properly with non-admin users
inifile_writestring(conf_file_path,'Options','RunICS','0')
inifile_writestring(conf_file_path,'Options','Monitoring','0')
inifile_writestring(conf_file_path,'Options','SystemMonitoring','0')
inifile_writestring(conf_file_path,'Options','CheckTrialOffer','0')
inifile_writestring(conf_file_path,'Options','SystemMonitoringRunningNotification','0')
inifile_writestring(conf_file_path,'Options','HelpImproveCCleaner','0')
inifile_writestring(conf_file_path,'Options','PrefsPrivacyShowOffers1stParty','0')
inifile_writestring(conf_file_path,'Options','DelayTemp','0')
inifile_writestring(conf_file_path,'Options','HideWarnings','1')
inifile_writestring(conf_file_path,'Options','UpdateAuto','0')
inifile_writestring(conf_file_path,'Options','UpdateNotify','0')
inifile_writestring(conf_file_path,'Options','UpdateCheck','0')
inifile_writestring(conf_file_path,'Options','DefaultDetailedView','2')
inifile_writestring(conf_file_path,'Options','ShowCleanWarning','False')
inifile_writestring(conf_file_path,'Options','JumplistTasks','1')
inifile_writestring(conf_file_path,'Options','SkipUAC','1')
inifile_writestring(conf_file_path,'Options','BackupPrompt','0') """
def session_setup():
print("Configuring: minimum intrusion and base parameters")
# Language part
lang_code_string = "%s" % get_language_code()
registry_set(HKEY_CURRENT_USER, r"SOFTWARE\Piriform\CCleaner", "Language", lang_code_string)
# Telemetry part
registry_set(HKEY_CURRENT_USER, r"SOFTWARE\Piriform\CCleaner", "AutoICS", "0")
registry_set(HKEY_CURRENT_USER, r"SOFTWARE\Piriform\CCleaner", "CheckTrialOffer", "0")
registry_set(HKEY_CURRENT_USER, r"SOFTWARE\Piriform\CCleaner", "Monitoring", "0")
registry_set(HKEY_CURRENT_USER, r"SOFTWARE\Piriform\CCleaner", "HelpImproveCCleaner", "0")
registry_set(HKEY_CURRENT_USER, r"SOFTWARE\Piriform\CCleaner", "SystemMonitoring", "0")
registry_set(HKEY_CURRENT_USER, r"SOFTWARE\Piriform\CCleaner", "UpdateAuto", "0")
registry_set(HKEY_CURRENT_USER, r"SOFTWARE\Piriform\CCleaner", "UpdateCheck", "0")
registry_set(HKEY_CURRENT_USER, r"SOFTWARE\Piriform\CCleaner", "UpdateNotify", "0")
registry_set(HKEY_CURRENT_USER, r"SOFTWARE\Piriform\CCleaner", "RunICS", "0")
registry_set(HKEY_CURRENT_USER, r"SOFTWARE\Piriform\CCleaner", "SystemMonitoring", "0")
registry_set(HKEY_CURRENT_USER, r"SOFTWARE\Piriform\CCleaner", "PrefsPrivacyShowOffers1stParty", "0")
if reg_value_exists(HKEY_CURRENT_USER, r"SOFTWARE\Piriform\CCleaner", "Brandover"):
registry_delete(HKEY_CURRENT_USER, r"SOFTWARE\Piriform\CCleaner", "Brandover")
if reg_value_exists(HKEY_CURRENT_USER, r"SOFTWARE\Piriform\CCleaner", "CookiesToSave"):
cookies_saved = registry_readstring(HKEY_CURRENT_USER, r"SOFTWARE\Piriform\CCleaner", "CookiesToSave")
if "*.avast.com|*.ccleaner.com|*.ccleanercloud.com" in cookies_saved:
cookies_saved = cookies_saved.replace("*.avast.com|*.ccleaner.com|*.ccleanercloud.com", "")
if cookies_saved.startswith("|"):
cookies_saved = cookies_saved[1:]
registry_setstring(HKEY_CURRENT_USER, r"SOFTWARE\Piriform\CCleaner", "CookiesToSave", cookies_saved)
# CCleaner part
registry_set(HKEY_CURRENT_USER, r"SOFTWARE\Piriform\CCleaner", "BackupPrompt", "0")
registry_set(HKEY_CURRENT_USER, r"SOFTWARE\Piriform\CCleaner", "DefaultDetailedView", "2")
registry_set(HKEY_CURRENT_USER, r"SOFTWARE\Piriform\CCleaner", "ShowCleanWarning", "False")
registry_set(HKEY_CURRENT_USER, r"SOFTWARE\Piriform\CCleaner", "ShowCookiesCleanWarning", "False")
registry_set(HKEY_CURRENT_USER, r"SOFTWARE\Piriform\CCleaner", "ShowGoogleChromeCleanWarning", "False")
registry_set(HKEY_CURRENT_USER, r"SOFTWARE\Piriform\CCleaner", "ShowSpotifyCleanSuspendedWarning", "False")
registry_set(HKEY_CURRENT_USER, r"SOFTWARE\Piriform\CCleaner", "DelayTemp", "0")
registry_set(HKEY_CURRENT_USER, r"SOFTWARE\Piriform\CCleaner", "HideWarnings", "1")
registry_set(HKEY_CURRENT_USER, r"SOFTWARE\Piriform\CCleaner", "SkipUAC", "1")
registry_set(HKEY_CURRENT_USER, r"SOFTWARE\Piriform\CCleaner", "HideWarnings", "1")
# registry_set(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','JumplistTasks','1')
# Applications part, you may add what you need here
registry_set(HKEY_CURRENT_USER, r"SOFTWARE\Piriform\CCleaner", "(App)Game Explorer", "True")
""" # Removing CCleaner Spying values in user registry # Not recommended
registry_delete(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','UpdateKey')
registry_delete(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','NewVersion')
registry_delete(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','LatestICS') """
def update_package():
# Declaring local variables
result = False
proxies = get_proxies()
if not proxies:
proxies = get_proxies_from_wapt_console()
app_name = control.name
url = "https://www.ccleaner.com/fr-fr/ccleaner/builds"
# Getting latest version from official sources
print("URL used is: %s" % url)
for bs_search in bs_find_all(url, "h3", proxies=proxies):
version = bs_search.string.split("(v")[1].split(")")[0]
latest_bin = sub_bin_name % version
download_url = "https://bits.avcdn.net/productfamily_CCLEANER/insttype_SLIM/platform_WIN_PIR/installertype_ONLINE/build_RELEASE"
break
print("Latest %s version is: %s" % (app_name, version))
print("Download URL is: %s" % download_url)
# Downloading latest binaries
if not isfile(latest_bin):
print("Downloading: %s" % latest_bin)
wget(download_url, latest_bin, proxies=proxies)
# Checking version from file
version_from_file = get_version_from_binary(latest_bin)
if not version.startswith((version_from_file).split(".0")[0]) and version_from_file != "":
print("Changing version to the version number of the binary (from: %s to: %s)" % (version, version_from_file))
os.rename(latest_bin, sub_bin_name % version_from_file)
version = version_from_file
else:
print("Binary file version correspond to online version")
# Changing version of the package
if Version(version) > Version(control.get_software_version()):
print("Software version updated (from: %s to: %s)" % (control.get_software_version(), Version(version)))
result = True
control.version = "%s-%s" % (Version(version), control.version.split("-", 1)[-1])
# control.set_software_version(version)
control.save_control_to_wapt()
# Deleting outdated binaries
remove_outdated_binaries(version)
# Validating or not update-package-sources
return result
def get_proxies():
r"""Return system proxy with the urllib python library
>>> get_proxies()
{'http': 'http://srvproxy.ad.domain.lan:8080',
'https': 'http://srvproxy.ad.domain.lan:8080'}
"""
if platform.python_version_tuple()[0] == "3":
from urllib.request import getproxies
else:
from urllib import getproxies
return getproxies()
def get_proxies_from_wapt_console():
r"""Return proxy information from the current user WAPT console
>>> get_proxies_from_wapt_console()
{'http': 'http://srvproxy.ad.domain.lan:8080',
'https': 'http://srvproxy.ad.domain.lan:8080'}
"""
proxies = {}
if platform.system() == "Windows":
waptconsole_ini_path = makepath(user_local_appdata(), "waptconsole", "waptconsole.ini")
else:
waptconsole_ini_path = makepath(user_home_directory(), ".config", "waptconsole", "waptconsole.ini")
if isfile(waptconsole_ini_path):
proxy_wapt = inifile_readstring(waptconsole_ini_path, "global", "http_proxy")
if proxy_wapt:
proxies = {"http": proxy_wapt, "https": proxy_wapt}
return proxies
def bs_find(url, element, attribute=None, value=None, user_agent=None, proxies=None, features="html.parser", **kwargs):
r""" "Parse html web page with BeautifulSoup and get the first result
Args:
url (str): url of the web page to parse
element (str): searched element
attribute (str): selected attribute of the element
value (str): value of the selected attribute
user_agent (str): specify a user-agent if needed
proxies (dict): specify your proxy if needed
**kwargs (str): joker for requests parameters
features (str): bs feature to use
>>> bs_find('https://www.w3.org/', 'a', 'title', 'Open Web Platform testing')['href']
'https://web-platform-tests.org/'
>>> bs_find('https://www.w3.org/', 'span', 'class', 'alt-logo').string
'W3C'
.. versionadded:: 2.0
"""
import requests
if user_agent:
page = requests.get(url, proxies=proxies, headers={"User-Agent": "%s" % user_agent}, **kwargs).text
else:
page = requests.get(url, proxies=proxies, **kwargs).text
soup = BeautifulSoup.BeautifulSoup(page, features=features)
if value:
return soup.find(element, {attribute: value})
else:
return soup.find(element)
def bs_find_all(url, element, attribute=None, value=None, user_agent=None, proxies=None, features="html.parser", **kwargs):
r""" "Parse html web page with BeautifulSoup and get a list of the result
Args:
url (str): url of the web page to parse
element (str): searched element
attribute (str): selected attribute of the element
value (str): value of the selected attribute
user_agent (str): specify a user-agent if needed
proxies (dict): specify your proxy if needed
**kwargs (str): joker for requests parameters
features (str): bs feature to use
>>> bs_find_all('https://www.w3.org/', 'a', 'title', 'Open Web Platform testing')[0]['href']
'https://web-platform-tests.org/'
>>> bs_find_all('https://www.w3.org/', 'span', 'class', 'alt-logo')[0].string
'W3C'
.. versionadded:: 2.0
"""
import requests
if user_agent:
page = requests.get(url, proxies=proxies, headers={"User-Agent": "%s" % user_agent}, **kwargs).text
else:
page = requests.get(url, proxies=proxies, **kwargs).text
soup = BeautifulSoup.BeautifulSoup(page, features=features)
if value:
return soup.find_all(element, {attribute: value})
else:
return soup.find_all(element)
def get_version_from_binary(filename, property_name="ProductVersion"):
r"""Get installer version from file informations, for now, only exe and msi files are compatibles
Args:
filename (str): path to the file
property_name (str): selected property
Returns:
str: version number
"""
if filename.endswith(".msi"):
return get_msi_properties(filename)[property_name]
else:
return get_file_properties(filename)[property_name]
def remove_outdated_binaries(version, filename_contains=None, list_extensions=["exe", "msi", "deb", "rpm", "dmg", "pkg"]):
r"""Remove files based on the version contained in his filename
Args:
version (str): version number of keeped files
filename_contains (str or list of str): Part of the filename that must be contained (useful for distinguishing architecture and os)
list_extensions (str or list of str): file extensions of verified files
Returns:
None
.. versionadded:: 2.0
"""
if type(list_extensions) != list:
list_extensions = [list_extensions]
if filename_contains:
if type(filename_contains) != list:
filename_contains = [filename_contains]
list_extensions = ["." + ext for ext in list_extensions if ext[0] != "."]
for file_ext in list_extensions:
for bin_in_dir in glob.glob("*%s" % file_ext):
if not version in bin_in_dir:
remove_file(bin_in_dir)
if filename_contains:
for filename_contain in filename_contains:
if not filename_contain in bin_in_dir:
remove_file(bin_in_dir)
bd8331b82303b441a0f84b0dd01f2ba26441cd018cd410781f87ee829c06b967 : setup.py
d32080420de2e15276ff404934258a7b68fe3340cbf694c8cb78433b07ca7cd6 : ccsetup_5.92.9652_slim.exe
e178a6e3cb2f5123bbba384661c37d867c4b7a0308ee8bb6a43576e03e3ff4a8 : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
08f7d712f4c108ac487436f335924769a834b358b2788c0aac5bebb56207463f : luti.json
e2846cfb7c292dbd3521699132da79a602648fc51ecbf3972ea27064f31c7ecb : WAPT/control