tis-anydesk
7.0.7-7
Connect to a computer remotely, be it from the other end of the office or halfway around the world. AnyDesk ensures secure and reliable remote desktop connections for IT professionals and on-the-go individuals alike.
2407 downloads
See build result See VirusTotal scan

Description
- package : tis-anydesk
- name : AnyDesk
- version : 7.0.7-7
- architecture : all
- categories : Utilities
- maintainer : WAPT Team,Tranquil IT,Bertrand Lemoigne,Gaëtan Segat,Jimmy PELÉ
- locale : all
- target_os : windows
- installed_size : 4220576
- impacted_process : AnyDesk
- editor :
- licence :
- signature_date : 2022-03-28T18:00:11.061485
- Homepage : https://anydesk.com
control
package : tis-anydesk
version : 7.0.7-7
architecture : all
section : base
priority : optional
name : AnyDesk
categories : Utilities
maintainer : WAPT Team,Tranquil IT,Bertrand Lemoigne,Gaëtan Segat,Jimmy PELÉ
description : Connect to a computer remotely, be it from the other end of the office or halfway around the world. AnyDesk ensures secure and reliable remote desktop connections for IT professionals and on-the-go individuals alike.
depends :
conflicts :
maturity : PROD
locale : all
target_os : windows
min_wapt_version : 1.8
sources : https://anydesk.com/downloads
installed_size : 4220576
impacted_process : AnyDesk
description_fr : Connectez-vous à un ordinateur à distance, que vous soyez de l’autre côté du bureau ou à l’autre bout du monde. AnyDesk garantit aux professionnels de l’informatique comme aux particuliers mobiles des connexions sûres et fiables aux bureaux à distance
description_pl :
description_de :
description_es :
description_pt :
description_it :
description_nl :
description_ru :
audit_schedule :
editor :
keywords :
licence :
homepage : https://anydesk.com
package_uuid : 92015007-1514-46be-9201-8a9e31f3e929
valid_from :
valid_until :
forced_install_on :
changelog : https://download.anydesk.com/changelog.txt
min_os_version :
max_os_version :
icon_sha256sum : 61e27edac9e3eeb15cdea6114a0bc2f09a150e39add65fde398c03cd322aab0e
signer : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature : K6iADEuacn+7raV+rdBoWHXb8nwlT5wft83WC8IOAwiTJQpFWEhHUYk7oeuM82FwE5Y0FZGkQ21yWFZS4rSbYQtD9CW91vN+3k6RMu+NSsXNG+p/d5T1xTm633jOWwTTAFC2a1JrdoYvvJwJ05jdgEsggjvpagKzU5cFmEEMKfgN9xYEd4iZucjTh7SpaJUSlYXfDTC9oLCIm1QupIFU5fw1t9XFwpyy0403ItsEZUUeZfUReZUiO0jXL8TcobFnv39O3eb9Ri69dsHGTQx8D5j3sXsGYA9lseAEHuC74TE35bFt0cdmStrACIwWo/DVQ0vmw3y2QZpm74393n2uow==
signature_date : 2022-03-28T18:00:11.061485
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
import wmi
import time
r"""
Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()
Installation procedures:
https://support.anydesk.com/knowledge/use-cases-for-the-command-line-interface
https://support.anydesk.com/knowledge/command-line-interface-for-windows
"""
# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls
bin_contains = "AnyDesk-"
app_name = "AnyDesk"
app_dir = makepath(programfiles32, app_name)
silent_args = '--install "%s" --silent --remove-first --update-disabled --create-shortcuts' % app_dir
app_uninstallkey = "AnyDesk"
def get_version(key):
return key['version'].split(' ')[-1]
def install():
# Declaring local variables
package_version = control.get_software_version()
bin_name = glob.glob("*%s*.exe" % bin_contains)[0]
# Installing the software
print("Installing: %s" % bin_name)
install_exe_if_needed(
bin_name,
silentflags=silent_args,
key=app_uninstallkey,
min_version=package_version,
get_version=get_version
)
# Avoiding the usage by WAPT of the app built-in Uninstallstring
uninstallkey.remove(app_uninstallkey)
# register_uninstall(app_uninstallkey, quiet_uninstall_string='"%s" --remove' % app_dir)
# Changing default start mode of the application services
set_service_start_mode("AnyDesk", "Manual")
def uninstall():
# Uninstalling the package
for uninstall in installed_softwares(app_uninstallkey):
print("Removing: %s (%s)" % (uninstall["name"], uninstall["version"]))
killalltasks(control.impacted_process.split(","))
app_uninstall_cmd = uninstall["uninstall_string"].replace("--uninstall", "--silent --remove")
run(app_uninstall_cmd)
wait_uninstallkey_absent(uninstall["key"])
# Remove remaining files
if isdir(app_dir):
if not installed_softwares(app_uninstallkey):
remove_tree(app_dir)
def update_package():
# Initializing variables
result = False
proxies = get_proxies()
if not proxies:
proxies = get_proxies_from_wapt_console()
app_name = control.name
url = "https://anydesk.com/downloads"
download_url = "https://download.anydesk.com/AnyDesk.exe"
sub_bin_name = bin_contains + "%s" + ".exe"
# Getting latest version from official sources
print("URL used is: %s" % url)
for bs_search in bs_find_all(url, "div", "class", "d-block", proxies=proxies):
if bs_search.text.split("v")[1].split("(")[0]:
version = bs_search.text.split("v")[1].split(" (")[0]
latest_bin = sub_bin_name % version
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 = ".".join(get_version_from_binary(latest_bin, "FileVersion").split(".")[:3])
# if not version_from_file.startswith(version) and version_from_file != '':
if Version(version_from_file) != Version(version) 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 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.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 wait_uninstallkey_absent(key=None, max_loop=120, keywords=None, name=None, raise_on_timeout=False):
if len([f for f in [key, keywords, name] if f]) > 1:
error("Arguments conflict key: %s keywords: %s name: %s" % (key, keywords, name))
if key:
searchparam = "key: %s" % str(key)
elif name:
searchparam = "name: %s" % str(name)
else:
searchparam = "keywords: %s" % str(keywords)
print("Waiting for the removal of %s from Windows registry" % searchparam)
loop = 0
while uninstall_key_exists(key, keywords=keywords, name=name):
loop += 1
if loop > max_loop:
if raise_on_timeout:
error("timeout after %s seconds" % max_loop)
else:
return "timeout after %s seconds" % max_loop
time.sleep(1)
def set_service_start_mode(service_name, start_mode, change_state=True):
r"""Changing start mode of a service and changing his running status accordingly
Usable values: 'Auto', 'Manual', 'Disabled'
Informations: https://msdn.microsoft.com/en-us/library/aa384896(v=vs.85).aspx
.. versionchanged:: 2.2
Now interact on the running state
"""
if not service_installed(service_name):
return print("WARNING: %s service do not exist, skipped")
to_start = False
to_stop = False
if start_mode == "Auto":
start_mode = "Automatic"
to_start = True
elif start_mode == "Disabled" or start_mode == "Manual":
to_stop = True
elif start_mode == "Boot" or start_mode == "System":
# Handle driver services but it do not seems to work
pass
else:
raise Exception("Start mode value specified is incorrect")
c = wmi.WMI()
for svc in c.Win32_Service(Name=service_name):
if svc.StartMode != start_mode:
svc.ChangeStartMode(StartMode=start_mode)
if to_start and change_state:
if not service_is_running(service_name):
try:
service_start(service_name)
except:
print("Unable to start the service: %s" % service_name)
elif to_stop and change_state:
if service_is_running(service_name):
try:
service_stop(service_name)
except:
print("Unable to stop the service: %s" % service_name)
def get_service_start_mode(service_name):
r"""Getting actual start mode of a service
Returned values: 'Auto', 'Manual', 'Disabled'
"""
c = wmi.WMI()
for svc in c.Win32_Service(Name=service_name):
return svc.StartMode
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)
0a62b5f87ded441f2c482dd4d4900d28b44ac126074aa031d140c9821e945154 : setup.py
af61905129f377f5934b3bbf787e8d2417901858bb028f40f02200e985ee62f6 : AnyDesk-7.0.7.exe
61e27edac9e3eeb15cdea6114a0bc2f09a150e39add65fde398c03cd322aab0e : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
da020e0455ded562721f4387371fe07cdd34df17089eba99372f079208ddc3af : luti.json
c60bfc9c670ade97589f858c0100ae933cfd6d197e1d5aaa95fae7a77d8bda5b : WAPT/control
Changelog
Changelog software url: https://download.anydesk.com/changelog.txt