tis-openvpn
2.5.3-34
OpenVPN is free software for creating a virtual private network.
7049 downloads

Description
- package : tis-openvpn
- name : OpenVPN Client
- version : 2.5.3-34
- categories : System and network,Drivers,Utilities
- maintainer : WAPT Team,Jimmy PELÉ,Simon Fonteneau
- installed_size :
- editor : OpenVPN Inc.
- licence : GNU GPL
- signature_date : 2021-08-17T10:18:32.153339
- size : 3.71 Mo
- locale : all
- target_os : windows
- impacted_process : openvpn-gui,openvpnserv,openvpn
- architecture : x64
- Homepage : https://openvpn.net/
control
package : tis-openvpn
version : 2.5.3-34
architecture : x64
section : base
priority : optional
name : OpenVPN Client
categories : System and network,Drivers,Utilities
maintainer : WAPT Team,Jimmy PELÉ,Simon Fonteneau
description : OpenVPN is free software for creating a virtual private network.
depends :
conflicts :
maturity : PROD
locale : all
target_os : windows
min_wapt_version : 1.8
sources : https://openvpn.net/community-downloads/
installed_size :
impacted_process : openvpn-gui,openvpnserv,openvpn
description_fr : OpenVPN est un logiciel libre permettant de créer un réseau privé virtuel
description_pl : OpenVPN – pakiet oprogramowania, który implementuje techniki tworzenia bezpiecznych połączeń punkt-punkt (VPN)
description_de : OpenVPN ist eine freie Software zum Aufbau eines Virtuellen Privaten Netzwerkes (VPN)
description_es : OpenVPN es una herramienta de conectividad VPN Virtual Private Network (red virtual privada).
description_pt :
description_it :
description_nl :
description_ru :
audit_schedule :
editor : OpenVPN Inc.
keywords : openvpn,vpn,private,network
licence : GNU GPL
homepage : https://openvpn.net/
package_uuid : 4ecd1814-622d-49ec-9ea8-fb63a6661bbd
valid_from :
valid_until :
forced_install_on :
changelog :
min_os_version : 10.0
max_os_version :
icon_sha256sum : 18848bc4babf25a75264225d9fd7251453186e19518d4426680a8d93b3c81cdb
signer : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature : uGcvSwnrtltgVqYucScGiMnRPPQ49G6Mu3VqRJ56Z6f7WuWafYKnWCRu21l8ZfkFVJPXb5+/BgLxWysCXMiZkXruWwSmxW3RBIbomiKWOyERvySXb732l9OzxHOKpszLDnktAaNrN/cOmLlCRqmx2t+I/L/E2o39UIoL830n1HqMfiaQsAYwHQD2FZpb60vbd47FiBDF4nDjbS9tiezr5DVhgYxv6iGndigkM5hp3jue8R8x1XeiIyBlw+onGHbobPZ6Y/ijEgMaKrGS4dcP0USORJay4d+CS+S8W+NssbLqRLqc7ctUEduZaMrVXvFWBZcJ+wOFBOf96MwF5W69Ng==
signature_date : 2021-08-17T10:18:32.153339
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
# informations on the new MSI installer: https://community.openvpn.net/openvpn/wiki/OpenvpnMSIInstaller
# declaring global variables - warnings: 1) wapt context is only available in package functions; 2) global variables are not persistent between calls
bin_contains = 'OpenVPN'
def install():
# declaring local variables
package_version = control.get_software_version()
bin_name = glob.glob('*%s*.msi' % bin_contains)[0]
# adding "OpenVPN Inc."" and "WireGuard LLC" trusted driver certificates
try:
run('"%s" -addstore TrustedPublisher "%s"' % (makepath(system32, 'certutil.exe'), makepath(basedir, 'openvpn.cer')), timeout=60)
run('"%s" -addstore TrustedPublisher "%s"' % (makepath(system32, 'certutil.exe'), makepath(basedir, 'wireguard.cer')), timeout=60)
except:
print("WARNING: Required Publisher Driver certificates have not been applied, you may need to apply them manually or with GPO")
# uninstalling other/older versions is not being required since the MSI seems to do it by himself
# installing the package
print("Installing: %s" % bin_name)
install_msi_if_needed(bin_name,
min_version=package_version,
)
# removing desktop shortcut
remove_desktop_shortcut('OpenVPN GUI')
def uninstall():
# removing "OpenVPN Inc."" and "WireGuard LLC" trusted driver certificates
try:
run('"%s" -delstore TrustedPublisher "OpenVPN Inc."' % (makepath(system32, 'certutil.exe')), timeout=60)
run('"%s" -delstore TrustedPublisher "WireGuard LLC"' % (makepath(system32, 'certutil.exe')), timeout=60)
except:
print("WARNING: Driver certificates have not been removed")
def update_package():
# declaring local variables
result = False
proxies = get_proxies()
if not proxies:
proxies = get_proxies_from_wapt_console()
app_name = control.name
url = 'https://openvpn.net/community-downloads/'
if control.architecture == 'x64':
arch = 'amd64'
else:
arch = 'x86'
# getting latest version from official sources
print("URL used is: %s" % url)
for bs_search in bs_find_all(url, 'a', 'class', 'ov-button w-100', proxies=proxies):
if bin_contains in bs_search.string and arch in bs_search.string and bs_search.string.endswith('.msi'):
version = bs_search['href'].split('-')[1]
latest_bin = bs_search.string
url_dl = bs_search['href']
break
print("Latest %s version is: %s" % (app_name, version))
print("Download url is: %s" % url_dl)
# downloading latest binaries
if not isfile(latest_bin):
print("Downloading: %s" % latest_bin)
wget(url_dl, latest_bin, proxies=proxies)
# changing version of the package
if Version(version) != control.get_software_version():
result = True
control.version = '%s-%s' % (version, control.version.split('-', 1)[-1])
#control.set_software_version(version)
control.save_control_to_wapt()
# deleting outdated binaries
remove_outdated_binaries(version, filename_contains=arch)
# validating or not 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 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)
3b51e9d0ee2a859a9dd4f0124683340161ac5fc9bf499129a81a13b28ddb21ce : OpenVPN-2.5.3-I601-amd64.msi
b36e7095cb428e8c3a3f2bbdc35977116e4521da5e3abee70ebc5b383bbd3ee7 : openvpn.cer
80be9dad5794e2bc025842d2c65e4a53915d350c6214c5c178a5d73cd3782361 : setup.py
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
18848bc4babf25a75264225d9fd7251453186e19518d4426680a8d93b3c81cdb : WAPT/icon.png
902be7b0c43f00b84ccbf56b21860f981667bf95f9b98bdeec7613d265614699 : wireguard.cer
a53ed757fae34431e2c565d4e87a1103940729f4538e5b85828a994caf7aa5d8 : WAPT/control