tis-enable-rdp
1.1-9
Enable Remote Desktop (RDP) on Windows, and open suitable firewall rules
159 downloads

Description
- package : tis-enable-rdp
- version : 1.1-9
- architecture : all
- categories : System and network,Security
- maintainer : Tranquil IT
- description : Enable Remote Desktop (RDP) on Windows, and open suitable firewall rules
- locale :
- target_os : windows
- min_os_version : 6.1
- max_os_version :
- min_wapt_version : 1.7
- sources :
- installed_size :
- impacted_process :
- description_fr : Active le Bureau à distance (RDP) sur Windows, et ouvre les règles de pare-feu adéquates
- description_pl :
- description_de :
- description_es :
- description_pt :
- description_it :
- description_nl :
- description_ru :
- editor :
- licence :
- signature_date : 2020-11-23T16:36:50.035479
- Conflicts :
Setup.py
# -*- coding: utf-8 -*-
from setuphelpers import *
uninstallkey = []
def install():
# enable RDP
print('Enabling RDP with lowest security and without NLA ')
registry_set(HKEY_LOCAL_MACHINE,r'SYSTEM\CurrentControlSet\Control\Terminal Server','fDenyTSConnections',0)
registry_set(HKEY_LOCAL_MACHINE,r'SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp','UserAuthentication',0)
registry_set(HKEY_LOCAL_MACHINE,r'SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp','SecurityLayer',0)
# opening firewall for RDP
print('Opening firewall for RDP')
run('netsh firewall set service type=RemoteDesktop mode=enable profile=all')
def uninstall():
# disable RDP
print('Reverting RDP to default options')
registry_delete(HKEY_LOCAL_MACHINE,r'SYSTEM\CurrentControlSet\Control\Terminal Server','fDenyTSConnections')
registry_delete(HKEY_LOCAL_MACHINE,r'SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp','UserAuthentication')
registry_delete(HKEY_LOCAL_MACHINE,r'SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp','SecurityLayer')
# closing firewall for RDP
print('Closing firewall for RDP')
run('netsh firewall set service type=RemoteDesktop mode=disable profile=all')
def audit():
if not service_is_running('TermService'):
print('WARNING: RDP service is not running, WAPT is starting RDP service')
service_start('TermService')
return "WARNING"
else:
print('OK: RDP service is running')
return "OK"
def update_package():
# Initializing variables
version = control.version.split('-')[0]
# Incrementing version of the package
control.version = '%s-%s'%(version,int(control.version.split('-')[-1])+1)
control.save_control_to_wapt()
print('Changing package version to: %s in WAPT\\control' % control.version)
[["setup.py","f7982069e0de94cb137fa31ab106c98be735e0a4cd4388c6ad23d359ceadb895"],["WAPT/icon.png","2e567e7058c8bff31d451b9ccdd74df552803ff5acd65854cd767e43ae900a6f"],["WAPT/certificate.crt","a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf"],["WAPT/control","81d7c66ae2d0203865d5bbf5207fd0c42ab909696221fdb1cf135e67b89eeeb4"]]