tis-nomachine-client
7.7.4-10
NoMachine is a cross-platform remote desktop program developed by NoMachine S.à r.l. The software provides access to remote desktops and applications running on Linux, Windows, Mac and Linux ARM devices
4074 downloads

Description
- package : tis-nomachine-client
- name : NoMachine
- version : 7.7.4-10
- categories : Utilities,System and network
- maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ
- installed_size :
- editor : NoMachine S.à r.l.
- licence : Proprietary,GPL
- signature_date : 2021-10-22T12:22:44.699100
- size : 34.27 Mo
- locale : all
- target_os : windows
- impacted_process : nxclient,nxagent,nxauth,nxclient,nxd,nxdisplay,nxdx32,nxdx64,nxexec,nxfs,nxnode,nxplayer,nxserver,nxservice32,nxservice64
- architecture : all
- Homepage : https://www.nomachine.com/
- Conflicts :
control
package : tis-nomachine-client
version : 7.7.4-10
architecture : all
section : base
priority : optional
name : NoMachine
categories : Utilities,System and network
maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ
description : NoMachine is a cross-platform remote desktop program developed by NoMachine S.à r.l. The software provides access to remote desktops and applications running on Linux, Windows, Mac and Linux ARM devices
depends :
conflicts : tis-nomachine
maturity : PROD
locale : all
target_os : windows
min_wapt_version : 1.8
sources : https://www.nomachine.com/download/download&id=8
installed_size :
impacted_process : nxclient,nxagent,nxauth,nxclient,nxd,nxdisplay,nxdx32,nxdx64,nxexec,nxfs,nxnode,nxplayer,nxserver,nxservice32,nxservice64
description_fr :
description_pl :
description_de :
description_es :
description_pt :
description_it :
description_nl :
description_ru :
audit_schedule :
editor : NoMachine S.à r.l.
keywords :
licence : Proprietary,GPL
homepage : https://www.nomachine.com/
package_uuid : f2b4620c-fc80-47ef-9f5f-4162e9412d88
valid_from :
valid_until :
forced_install_on :
changelog : https://www.nomachine.com/softwareupdates
min_os_version : 5.1
max_os_version :
icon_sha256sum : 2d811e7a320f6a1da912e889989b6e9a41edfe0832f8d18ebfba936f7fb78fda
signer : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature : szqSMZSaXjayppQai29eiH7L3g+tE+Ur+Wcsoqn66m4W81qt8C0/8335MuhuVdUBRX19ypnPU01rVMAZVi7wnLRXGMors5Zp/Ar9oMfjI5eSrixMFsLLt1aJ4NlS3oHVP//cR4+/zn/Sc9xgbVK1KXDYKB6b1+K2SBY15qpTQ+JKo841rUei9GwSknsFdxaQhgSuv2C+/GsedHsBC3VBtLuqCxg2i3me+FY9sfugI2INBZbr19voBBgO9VOlnrVu/rPFq5q1aIDR+F9GIIlmLAwckqX8gg8NlnszW36M41cXdMYZHhn1DolrSVSIjeRQb/N89kD8knq+9IBBuccyiQ==
signature_date : 2021-10-22T12:22:44.699100
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
# 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_contains = 'nomachine_'
silent_args = '/usbinstall="0" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' # Silent # '/usbinstall="0" /silent' # Semi-silent
app_uninstallkey = 'NoMachine_is1'
app_name = 'NoMachine'
server_cfg_file = makepath(programfiles32, 'NoMachine', 'etc', 'server.cfg')
node_cfg_file = makepath(programfiles32, 'NoMachine', 'etc', 'node.cfg')
app_service_list = ['nxservice']
def install():
# Declaring local variables
package_version = control.get_software_version()
bin_name = glob.glob('*%s*.exe' % bin_contains)[0]
# Uninstalling older versions of the software
for uninstall in installed_softwares(name=r'\bNoMachine\b'):
if uninstall['version'] < control.get_software_version() or force:
print("Removing: %s (%s)" % (uninstall['name'], uninstall['version']))
run(uninstall_cmd(uninstall['key']))
wait_uninstallkey_absent(uninstall['key'])
# Installing the software
print("Installing: %s" % bin_name)
install_exe_if_needed(bin_name,
silentflags=silent_args,
key=app_uninstallkey,
min_version=package_version,
)
# Configuring server.cfg default preferences
if isfile(server_cfg_file):
file = open(server_cfg_file, 'r')
old_data = file.read()
file.close()
data = old_data
data = data.replace('#UpdateFrequency 172800','UpdateFrequency 0')
data = data.replace('#StartNXDaemon Automatic','StartNXDaemon 0')
data = data.replace('StartNXDaemon Automatic','StartNXDaemon 0')
data = data.replace('#PhysicalDesktopSharing 1','PhysicalDesktopSharing 0')
data = data.replace('PhysicalDesktopSharing 1','PhysicalDesktopSharing 0')
data = data.replace('#PhysicalDesktopSharing 1','PhysicalDesktopSharing 0')
data = data.replace('#EnableNetworkBroadcast 1','EnableNetworkBroadcast 0')
data = data.replace('EnableNetworkBroadcast 1','EnableNetworkBroadcast 0')
new_data = data
if not old_data == new_data:
print("Writing configuration file with minimum instrusion parameters (%s)" % server_cfg_file)
file = open(server_cfg_file, 'w')
file.write(data)
file.close()
# Configuring node.cfg default preferences
if isfile(node_cfg_file):
file = open(node_cfg_file, 'r')
old_data = file.read()
file.close()
data = old_data
data = data.replace('#EnableDiskSharing','EnableDiskSharing none')
data = data.replace('#EnablePrinterSharing both','EnablePrinterSharing none')
data = data.replace('#EnableUSBSharing both','EnableUSBSharing none')
data = data.replace('#EnableNetworkSharing both','EnableNetworkSharing none')
data = data.replace('EnableSmartcardSharing 1','EnableSmartcardSharing 0')
data = data.replace('#AudioInterface disabled','AudioInterface disabled')
new_data = data
if not old_data == new_data:
print("Writing configuration file with minimum instrusion parameters (%s)" % node_cfg_file)
file = open(node_cfg_file, 'w')
file.write(data)
file.close()
# Changing default start mode of the application services
for service_name in app_service_list:
if service_installed(service_name):
if get_service_start_mode(service_name) != 'Disabled':
try:
set_service_start_mode(service_name, 'Disabled')
if service_is_running(service_name):
try:
service_stop(service_name)
except:
print("Unable to stop the service: %s" % service_name)
except:
print("Unable to set start mode of the service: %s" % service_name)
def update_package():
# Declaring local variables
result = False
proxies = get_proxies()
if not proxies:
proxies = get_proxies_from_wapt_console()
app_name = control.name
sub_bin_name = bin_contains + '%s.exe'
url = 'https://www.nomachine.com/download/download&id=8'
# Getting latest version from official sources
print("URL used is: %s" % url)
for bs_search in bs_find_all(url, 'a','href','javascript:void(0)', proxies=proxies):
if bin_contains in bs_search['onclick']:
latest_bin = bs_search['onclick'].split("'")[1]
version = latest_bin.split('_')[1]
download_url = bs_search['onclick'].split("'")[-2]
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 Version(version) != Version(version_from_file) 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 set_service_start_mode(service_name, start_mode):
r"""Changing start mode of a service
Usable values: 'Automatic', 'Manual', 'Disabled'
Informations: https://msdn.microsoft.com/en-us/library/aa384896(v=vs.85).aspx
"""
for svc in wmi.WMI().Win32_Service(Name=service_name):
svc.ChangeStartMode(StartMode=start_mode)
if start_mode == 'Disabled':
service_stop(service_name)
def get_service_start_mode(service_name):
r"""Getting actual start mode of a service
Returned values: 'Auto', 'Manual', 'Disabled'
"""
for svc in wmi.WMI().Win32_Service(Name=service_name):
return svc.StartMode
def wait_uninstallkey_absent(key=None, max_loop=120):
loop=0
while uninstall_key_exists(key):
loop = loop + 1
if loop > max_loop:
return "timout"
time.sleep(1)
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)
b2a4330b917c7406957c4e0d3b1d5d5c5d10dc226258f24c3aca75064a4e834d : nomachine_7.7.4_1.exe
eee792bf342d214aa9945e39256104586af4b3897d5bd018ed913b57de865fac : setup.py
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
2d811e7a320f6a1da912e889989b6e9a41edfe0832f8d18ebfba936f7fb78fda : WAPT/icon.png
25b4c81a55ea9eb434ef3cb101d89b240ca2fdd73982ef86a45b7342a0fd38cf : WAPT/control