tis-adwcleaner
8.3.2-3
AdwCleaner is a free software program that allows you to detect and clean unwanted software such as adware, toolbars, browser hijackers and potentially unwanted programs
4041 downloads
Download
See build result See VirusTotal scan

- package : tis-adwcleaner
- name : AdwCleaner
- version : 8.3.2-3
- categories : Utilities,Security
- maintainer : WAPT Team,Tranquil IT,Gaëtan SEGAT
- editor : Malwarebytes
- licence : Freeware
- locale : all
- target_os : windows
- impacted_process : adwcleaner
- architecture : all
- signature_date : 2022-05-07 01:07
- size : 8.48 Mo
- installed_size : 8.54 Mo
- homepage : https://malwarebytes.com/adwcleaner/
package : tis-adwcleaner
version : 8.3.2-3
architecture : all
section : base
priority : optional
name : AdwCleaner
categories : Utilities,Security
maintainer : WAPT Team,Tranquil IT,Gaëtan SEGAT
description : AdwCleaner is a free software program that allows you to detect and clean unwanted software such as adware, toolbars, browser hijackers and potentially unwanted programs
depends :
conflicts :
maturity : PROD
locale : all
target_os : windows
min_wapt_version : 2.0
sources : https://malwarebytes.com/adwcleaner/
installed_size : 8544256
impacted_process : adwcleaner
description_fr : AdwCleaner est un logiciel gratuit qui vous permet de détecter et de nettoyer les logiciels indésirables tels que les logiciels publicitaires, les barres d'outils, les pirates de navigateur et les programmes potentiellement indésirables
description_pl :
description_de :
description_es :
description_pt :
description_it :
description_nl :
description_ru :
audit_schedule :
editor : Malwarebytes
keywords : software,program,adware,toolbars,hijackers
licence : Freeware
homepage : https://malwarebytes.com/adwcleaner/
package_uuid : 48347e4a-cc75-4c81-994f-8fcf316a2e95
valid_from :
valid_until :
forced_install_on :
changelog :
min_os_version : 6.1
max_os_version :
icon_sha256sum : 081f425535b79f27e5b03cd47848906355190c58d49c1df1ac318d454593d676
signer : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature : fLeh5shZVlG4lR4tMfbAk63ypyYpifzfth+quTcxc1yjV6Lw7b1107p80krxUJSvlVrvMNwvTrpeS2My99+2uW3wT4Xd3cp7WMqI+2FuEUt3GjjoOr8YO8LP+/SkOYBCpcwEvMHzLIQZa4c9S5ExezZH3YZvSs1rbzQ/ongSlbyVvkjEY5kArbeNOx3yXZWWIIEaVSs08BrInpPO2WAtc/5WDUyos2DXQrQSbpYml0/c4AvEaGLqH86xmIL8E39F0sN7NAFvdn4rehhNpRrfKv2YVUo3YR2EnHdwoQqrkGdDUuPh3ZKKPpqtaiuG/KfkrKOEWkspQPwv1sn7Mlc+HA==
signature_date : 2022-05-07T01:07:24.832541
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 platform
import requests
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
bin_contain = "adwcleaner_%s.exe"
app_name = "AdwCleaner"
app_dir = makepath(programfiles32, app_name)
def install():
# Declaring local variables
package_version = control.get_software_version()
bin_name = bin_contain % package_version
app_path = makepath(app_dir, bin_name)
# Getting installed software version
if isfile(app_path):
installed_version = get_version_from_binary(app_path, property_name="FileVersion")
else:
installed_version = None
# Installing software
print("Installing: %s" % app_name)
if installed_version is None or installed_version < package_version or force:
killalltasks(control.get_impacted_process_list())
mkdirs(app_dir)
if isfile(app_path):
remove_file(app_path)
print("Copying: %s to: %s" % (bin_name, app_dir))
filecopyto(bin_name, app_dir)
# Creating shortcuts
create_desktop_shortcut(app_name, app_path)
create_programs_menu_shortcut(app_name, app_path)
# Adding software to "list-registry"
print("Registering %s to Windows Registry" % app_name)
register_windows_uninstall(control, win64app=False)
register_uninstall(app_name, icon=app_path)
else:
print("%s already installed. Skipping" % app_name)
def uninstall():
# Uninstalling software
killalltasks(control.get_impacted_process_list())
if isdir(app_dir):
remove_tree(app_dir)
unregister_uninstall(app_name)
# Removing shortcuts
remove_desktop_shortcut(app_name)
remove_programs_menu_shortcut(app_name)
def audit():
# Declaring local variables
package_version = control.get_software_version()
bin_name = bin_contain % package_version
app_path = makepath(app_dir, bin_name)
# Getting installed software version
if isfile(app_path):
installed_version = get_version_from_binary(app_path, property_name="FileVersion")
else:
installed_version = None
# Auditing software
print("Auditing: %s" % control.package)
if installed_version is None or installed_version < package_version:
print("%s version is incorrect (%s)" % (app_name, installed_version))
return "ERROR"
else:
print("%s is installed in correct version (%s)" % (app_name, installed_version))
return "OK"
def update_package():
# Declaring local variables
result = False
proxies = get_proxies()
if not proxies:
proxies = get_proxies_from_wapt_console()
download_url = "https://downloads.malwarebytes.com/file/adwcleaner"
# Getting latest version information from download url
last_version = requests.head(download_url, allow_redirects=True).headers["Content-Disposition"]
version = last_version.split("_")[-1].split(".exe")[0]
bin_name = bin_contain % version
print("Latest %s version is: %s" % (app_name, version))
print("Download url is: %s" % download_url)
# Downloading latest binaries
if not isfile(bin_name):
print("Downloading: %s" % bin_name)
wget(download_url, bin_name, proxies=proxies)
# Checking version from file
version_from_file = get_version_from_binary(bin_name, property_name="FileVersion")
if not version_from_file.startswith(version) and version_from_file != "":
print("Changing version to the version number of the binary")
version = version_from_file
else:
print("Binary file version corresponds 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
else:
print("Software version up-to-date (%s)" % Version(version))
control.version = "%s-%s" % (Version(version), control.version.split("-", 1)[-1])
control.save_control_to_wapt()
# Validating 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 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)
5c225f4afa16e9a4ed820e49f7391016e12050165b0850e20b3130ac8e392200 : setup.py
081f425535b79f27e5b03cd47848906355190c58d49c1df1ac318d454593d676 : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
6256155ac4cc493f8511a3838f6f705683c64222ec868a394b1d228d252ed125 : WAPT/changelog.txt
697f170dfd8f47b72d154b2ab602baee52f1ac53944484c0829dec1b0ffcdff8 : luti.json
e94afe0973fbbb4f5f38fc7a71b7e129530ed3837044311f2cff57aa626c187b : adwcleaner_8.3.2.exe
0f115340832a81ee4a9189561fc1b0c429a7a8312519718dc0e105f465a2e5a7 : WAPT/control
8.3.1-3
Improve the package code