tis-vncrestricted 2.8.11-6

  • package : tis-vncrestricted
  • version : 2.8.11-6
  • architecture : all
  • locale : all
  • description : TightVNC Viewer and serveur for x86 and x64 with password and IP restriction
  • maintainer : TIS <technique@tranquil-it-systems.fr>
  • date : 2018-09-24 09:58:43
  • min_wapt_version :
  • min_os_version : 5.0
  • max_os_version :
  • impacted_process :

setup.py

# -*- coding: utf-8 -*-
from setuphelpers import *

uninstallkey = []

# password for full access VNC viewer
password = 'mainpass'

# list of IP of authorized VNC viewers
authorized_ips = ['192.168.149.14','192.168.149.16']

def install_msi_if_needed(msi,min_version=None,killbefore=[],properties={}):
    if not isfile(msi):
        error('msi file %s not found in package' % msi)
    key = get_msi_properties(msi)['ProductCode']
    # will try to add key in the caller's (setup.py) uninstallkey list
    import inspect
    caller_globals = inspect.stack()[1][0].f_globals
    WAPT = caller_globals.get('WAPT',None)
    force = WAPT and WAPT.options.force

    if not min_version:
        min_version = getproductprops(msi)['version']

    if need_install(key,min_version=min_version,force=force):
        props = ' '.join(["%s=%s" % (k,v) for (k,v) in properties.iteritems()])
        if killbefore:
            killalltasks(killbefore)
        run(r'msiexec /norestart /q /i "%s" %s' % (msi,props))
        if not installed_softwares(uninstallkey=key):
            error('MSI %s has been installed but the uninstall key %s can not be found' % (msi,key))
    else:
        print('MSI %s already installed. Skipping msiexec' % msi)
    if key:
        if 'uninstallkey' in caller_globals and not key in caller_globals['uninstallkey']:
            caller_globals['uninstallkey'].append(key)

def install():
    version = control['version'].split('-',1)[0]
    # be sure to remove old vnc and associated settings...
    old_vnc = installed_softwares('TightVNC')
    for soft in old_vnc:
        print('Uninstall %s' % soft['name'])
        run_notfatal(uninstall_cmd(soft['key']))

    if iswin64():
        msi = 'tightvnc-%s-gpl-setup-64bit.msi' % version
    else:
        msi = 'tightvnc-%s-gpl-setup-32bit.msi' % version
    options = dict(
        SET_USEVNCAUTHENTICATION=1,
        VALUE_OF_USEVNCAUTHENTICATION=1,
        SET_PASSWORD=1,
        VALUE_OF_PASSWORD=password,
        SET_IPACCESSCONTROL=1,
        VALUE_OF_IPACCESSCONTROL= '"%s"'%( ','.join('%s-%s:0'%(ip,ip) for ip in ensure_list(authorized_ips))))

    install_msi_if_needed(msi,properties=options)

    

Changelog

No changelog
    

manifest.sha256

WAPT/certificate.crt 13fb474c5c23c135a77aba592eb8821b9ecbcc463f5b7312312b87b20eac6779
WAPT/wapt.psproj df3e2fa87fea9c7bdfcc22039b9ef7303f092898882d9f3f4233f5d92f90b3c7
wapt.psproj 93644cc18ef33e7f11b5fbc5f2f4177ee7757939de0038a4d6ebc0720ecb5906
tightvnc-2.8.11-gpl-setup-64bit.msi ec42c674b06b37b5d6be32875356df29bb11e1d4e63bbf6049a91f01f0053e9a
setup.py d5c7f9d902e29303096b1db7a81c130b11a58e7b5f0defe48eef8f453e0dc57e
tightvnc-2.8.11-gpl-setup-32bit.msi eefda3f6dbf599a3679aa4cced15dd2e766e37ed1536ad2868d7748e3f44e68f
WAPT/control e162535139e450a27666570d750b6fac255aa088d139621b8be135e5628fd0eb