tis-veyon-config-template icon

Veyon Config

Silent install package for Veyon Config

6-2

  • package: tis-veyon-config-template
  • name: Veyon Config
  • version: 6-2
  • maintainer: WAPT Team,Tranquil IT,Simon Fonteneau,Flavien SCHELFAUT
  • locale: all
  • target_os: windows
  • architecture: all
  • signature_date:
  • size: 7.59 Ko
  • depends:

package           : tis-veyon-config-template
version           : 6-2
architecture      : all
section           : base
priority          : optional
name              : Veyon Config
categories        : 
maintainer        : WAPT Team,Tranquil IT,Simon Fonteneau,Flavien SCHELFAUT
description       : Configuration Veyon with wapt groups
depends           : tis-veyon
conflicts         : 
maturity          : PROD
locale            : all
target_os         : windows
min_wapt_version  : 2.5
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : Configuration Veyon avec groupes wapt
description_pl    : Konfiguracja Veyon z grupami wapt
description_de    : Konfiguration Veyon mit wapt-Gruppen
description_es    : Configuración Veyon con grupos wapt
description_pt    : Configuração Veyon com grupos wapt
description_it    : Configurazione Veyon con gruppi wapt
description_nl    : Configuratie Veyon met wapt groepen
description_ru    : Конфигурация Veyon с группами wapt
audit_schedule    : 
editor            : 
keywords          : 
licence           : 
homepage          : 
package_uuid      : d57a664c-188b-481c-b2f8-24d873dfed2b
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : eac205adfbc9d8f9148117d0d8befddad8ed55c78f66a53211f792ac13e7f4a9
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2025-07-28T08:02:45.000000
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
signature         : h7ZJFWb3/fHipZY3JQdfBEpQj9v1pcPeFx7YH2qW57GiQhi3K8Y/0BxHaBtB+aPnIJl051WiXTfauJMkLiip9kS1yTw4VwdRj18PpXZh9erSVGG8gCGU85PTruBcxPzQVr3jyJARJas0RjLFzNI7DXRl19ijmb8RmKLgio5mGh242NMFFHot/47DO5LWdaHlSHVadeBwDhA1W89JLc9cs8cshEcN1TU4i0HTlbKw5WZcSAZxDbQDyia2tpPw0w5YtimMCWeiDsMNJsnGFbH6siTgA3SeFy9jx7peeXn5qHMktjw66Etxo8ErJnLmdPgqP6qn0WbzXaiTzFS60/hP+w==

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


def install():

    pathveyon = installed_softwares("Veyon")[0]["uninstall_string"].rsplit("\\", 1)[0]
    veyonctl = makepath(pathveyon, "veyon-cli.exe")

    config_file = makepath(basedir, "config.json")
    csv_file = makepath(basedir, "veyon_computers_list")

    if not isfile(config_file):
        error('No configuration file found ! Open veyon configuration to make and export your configuration')

    # Import configuration Veyon with config.json
    run(rf'"{veyonctl}" config import "{config_file}"')

    # Clear all networkobjects
    run(rf'"{veyonctl}" networkobjects clear"')

    run(rf'"{veyonctl}" networkobjects import "{csv_file}" format "%location%;%name%;%host%;%mac%"')

# -*- coding: utf-8 -*-
from setuphelpers import *
from setupdevhelpers import *
from common import get_requests_client_cert_session
import waptlicences
import waptguihelper

def update_package():

    ####
    # This is an exemple, adapt this code with our needs !
    ####

    # Delete all csv
    for csv in glob.glob("*.csv"):
        remove_file(csv)

    credentials_url = waptguihelper.login_password_dialog("Credentials for WAPT Server", WAPT.waptserver.server_url, "admin", "")
    t = waptlicences.waptserver_login(WAPT.config_filename, credentials_url["user"], credentials_url["password"])
    s = get_requests_client_cert_session(
        WAPT.waptserver.server_url,  
        cert=(t['client_certificate'], t['client_private_key'], t['client_private_key_password']),
        verify=False
    )

    if not 'session' in t['session_cookies']:
        session_cookies = [u for u in t['session_cookies'] if u['Domain'] == WAPT.waptserver.server_url.split('://')[-1]][0]
    else:
        session_cookies = t['session_cookies']['session']
        session_cookies['Name'] = 'session'

    s.cookies.set(session_cookies['Name'], session_cookies['Value'], domain=session_cookies['Domain'])

    computers = s.get(f'{WAPT.waptserver.server_url}/api/v1/hosts?&columns=connected_ips,mac_addresses&limit=10000')
    computers = json.loads(computers.content)['result']

    content_csv = ""
    for i in computers:
        org_unit = i['host_capabilities']['dn'].split(',')[1].replace('OU=', '') if 'OU=' in i['host_capabilities']['dn'] else 'default'
        content_csv += f'{org_unit};{i["computer_name"]};{i["main_ip"]};{i["mac_addresses"][0]}\n'

    with open("veyon_computers_list.csv", "w") as f:
        f.write(content_csv)

    control.package = control.package.replace('-template', '')
    control.save_control_to_wapt()

38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
3a89e36760a8966d9a7deae9d54c96f135118560ab2ef69ef61e8add72ca208e : WAPT/control
eac205adfbc9d8f9148117d0d8befddad8ed55c78f66a53211f792ac13e7f4a9 : WAPT/icon.png
2d0eca4152f4a5524eea2323b34f3be6cc3e80ac0633b3db323dc14510468a2e : luti.json
b4fa9ab45d137613029d4a33a0bc06ccdb0ab49d48384d5d9f4331e67b889159 : setup.py
6c7fb7c07206d551c880d5b07e94b04a68cd14c16c9006babc54e23195250e85 : update_package.py