From 5132a31550e1b40a7777529cedac3b3e0413a012 Mon Sep 17 00:00:00 2001 From: Heuze Florent Date: Thu, 31 Dec 2020 17:31:54 +0100 Subject: [PATCH] Add a function to check the state of SMBv1, before process --- WAPT/control | 70 ++--- setup.py | 48 ++-- .../WAPT/certificate.crt | 24 -- tis/tis-disable-smb1-client/WAPT/control | 42 --- .../WAPT/manifest.sha1 | 1 - .../WAPT/manifest.sha256 | 1 - tis/tis-disable-smb1-client/WAPT/signature | 5 - .../WAPT/signature.sha256 | 5 - tis/tis-disable-smb1-client/WAPT/wapt.psproj | 247 ------------------ ...owsServer2003-KB4012598-x64-custom-ENU.exe | 3 - tis/tis-disable-smb1-client/setup.py | 120 --------- ...f9ac070a1b21bca6757de5d127427c090d581d.exe | 3 - ...47689656c58ab374521babb9bdca07304d87f5.exe | 3 - .../WAPT/certificate.crt | 24 -- tis/tis-enable-smb1-client/WAPT/control | 42 --- tis/tis-enable-smb1-client/WAPT/manifest.sha1 | 1 - .../WAPT/manifest.sha256 | 1 - tis/tis-enable-smb1-client/WAPT/signature | 5 - .../WAPT/signature.sha256 | 5 - tis/tis-enable-smb1-client/WAPT/wapt.psproj | 247 ------------------ tis/tis-enable-smb1-client/setup.py | 76 ------ 21 files changed, 58 insertions(+), 915 deletions(-) delete mode 100644 tis/tis-disable-smb1-client/WAPT/certificate.crt delete mode 100644 tis/tis-disable-smb1-client/WAPT/control delete mode 100644 tis/tis-disable-smb1-client/WAPT/manifest.sha1 delete mode 100644 tis/tis-disable-smb1-client/WAPT/manifest.sha256 delete mode 100644 tis/tis-disable-smb1-client/WAPT/signature delete mode 100644 tis/tis-disable-smb1-client/WAPT/signature.sha256 delete mode 100644 tis/tis-disable-smb1-client/WAPT/wapt.psproj delete mode 100644 tis/tis-disable-smb1-client/WindowsServer2003-KB4012598-x64-custom-ENU.exe delete mode 100644 tis/tis-disable-smb1-client/setup.py delete mode 100644 tis/tis-disable-smb1-client/windowsserver2003-kb4012598-x86-custom-fra_9cf9ac070a1b21bca6757de5d127427c090d581d.exe delete mode 100644 tis/tis-disable-smb1-client/windowsxp-kb4012598-x86-custom-fra_eb47689656c58ab374521babb9bdca07304d87f5.exe delete mode 100644 tis/tis-enable-smb1-client/WAPT/certificate.crt delete mode 100644 tis/tis-enable-smb1-client/WAPT/control delete mode 100644 tis/tis-enable-smb1-client/WAPT/manifest.sha1 delete mode 100644 tis/tis-enable-smb1-client/WAPT/manifest.sha256 delete mode 100644 tis/tis-enable-smb1-client/WAPT/signature delete mode 100644 tis/tis-enable-smb1-client/WAPT/signature.sha256 delete mode 100644 tis/tis-enable-smb1-client/WAPT/wapt.psproj delete mode 100644 tis/tis-enable-smb1-client/setup.py diff --git a/WAPT/control b/WAPT/control index 5bf7062..5c84c44 100644 --- a/WAPT/control +++ b/WAPT/control @@ -1,43 +1,43 @@ package : fws-smb1-client -version : 1 +version : 3 architecture : all section : base priority : optional -name : -categories : +name : +categories : maintainer : Heuzef -description : Ghostscript for Windows -depends : -conflicts : +description : SMBv1 Client on Windows +depends : +conflicts : maturity : PROD -locale : -target_os : -min_os_version : -max_os_version : -min_wapt_version : -sources : -installed_size : -impacted_process : +locale : +target_os : +min_os_version : +max_os_version : +min_wapt_version : +sources : +installed_size : +impacted_process : description_fr : SMBv1 Client on Windows -description_pl : -description_de : -description_es : -description_pt : -description_it : -description_nl : -description_ru : -audit_schedule : -editor : -keywords : -licence : +description_pl : +description_de : +description_es : +description_pt : +description_it : +description_nl : +description_ru : +audit_schedule : +editor : +keywords : +licence : homepage : https://docs.microsoft.com/fr-fr/windows-server/storage/file-server/troubleshoot/detect-enable-and-disable-smbv1-v2-v3 -package_uuid : -valid_from : -valid_until : -forced_install_on : -changelog : -signer : -signer_fingerprint: -signature : -signature_date : -signed_attributes : \ No newline at end of file +package_uuid : 3c1d622f-5872-4450-8c1b-78c3668fb85e +valid_from : +valid_until : +forced_install_on : +changelog : +signer : Heuze Florent +signer_fingerprint: 609cb7b3556c1468082b757d212d7416fbcb4e13b1b54497d32647ac6c57f567 +signature : uRVzEUyhA+VAJS04onz5kAdyzrmCKUHb3j0hOTQS7Cq5EIbrHcOw/F101tR5FYmZzdMBKgj31dp7UsG8E3yMTyyshexBXtrnSL97MN5K6Ju0PhycQDMIZ7uqStQtcy9330pde3Olr+HhfJ2qEDQ5d4B+hLpp8pU8Nj4y0DtphnPrmwgNUvI3aU5WcZOuDFicl3BgvDDv3vYdu5B6N9j+an4hF5LIcLUap3/Fu9dWo/AjWzHgi8RrbIkdbpSZWWrO6ICSj+Yvjrp0ePP7fhmzZktYbvmu4rf9+DMk34OM/XUnzXd4toaQ+pCC3JaK23w/EAfPeP2fHyk92BMuhbbMDA== +signature_date : 2020-12-31T17:29:57.704000 +signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_os_version,max_os_version,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,signer,signer_fingerprint,signature_date,signed_attributes \ No newline at end of file diff --git a/setup.py b/setup.py index 42af32a..3d4f0a3 100644 --- a/setup.py +++ b/setup.py @@ -5,36 +5,34 @@ import re uninstallkey = [] def install(): - print("Enable SMBv1 ...") + print("Enabling SMBv1") -# print('Checking status of SMBv1 ...') -# smbv1_status = run_powershell('Get-WindowsOptionalFeature -Online -FeatureName smb1protocol | out-string -stream | select-string State') -# print('Current status : %s' % (smbv1_status,)) + print('Checking SMBv1 state') + smbv1_status_enabled = run_powershell('Get-WindowsOptionalFeature -Online -FeatureName smb1protocol | out-string -stream | select-string "Enabled"') -# patterns = ["Enabled"] -# text = smbv1_status -# for pattern in patterns: -# print('Looking for "%s" in "%s" ->' % (pattern, text),) -# if re.search(pattern, text): -# print('FOUND A MATCH!') -# else: -# print('NO MATCH') - - smbv1_enable = run_powershell('Enable-WindowsOptionalFeature -Online -FeatureName smb1protocol -NoRestart') - - print('Turn ON SMBv1 : %s' % (smbv1_enable,)) - print('Done, SMBv1 is now enabled. Reboot is required.') - -# SMBv1 already enable -# else: -# print('SMBv1 is already enabled. No reboot required.') + if smbv1_status_enabled: + print('SMBv1 already enabled. No reboot required.') + exit + else: + run_powershell('Enable-WindowsOptionalFeature -Online -FeatureName smb1protocol -NoRestart') + print('Turn ON SMBv1 : %s' % (smbv1_status_enabled,)) + print('Done, SMBv1 is now enabled. Reboot is required.') + exit def uninstall(): - print("Disable SMBv1 ...") + print("Disabling SMBv1") - smbv1_disable = run_powershell('Disable-WindowsOptionalFeature -Online -FeatureName smb1protocol -NoRestart') + print('Checking SMBv1 state') + smbv1_status_enabled = run_powershell('Get-WindowsOptionalFeature -Online -FeatureName smb1protocol | out-string -stream | select-string "Enabled"') - print('Turn OFF SMBv1 : %s' % (smbv1_disable,)) - print('Done, SMBv1 is now disabled. Reboot is required.') \ No newline at end of file + if smbv1_status_enabled: + run_powershell('Disable-WindowsOptionalFeature -Online -FeatureName smb1protocol -NoRestart') + print('Turn OFF SMBv1 : %s' % (smbv1_status_enabled,)) + print('Done, SMBv1 is now disabled. Reboot is required.') + exit + + else: + print('SMBv1 already disabled. No reboot required.') + exit \ No newline at end of file diff --git a/tis/tis-disable-smb1-client/WAPT/certificate.crt b/tis/tis-disable-smb1-client/WAPT/certificate.crt deleted file mode 100644 index 4d9c7b0..0000000 --- a/tis/tis-disable-smb1-client/WAPT/certificate.crt +++ /dev/null @@ -1,24 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIECjCCAvKgAwIBAgIUcFRJMa4zqkCH5BWTdQs5ogRDo9swDQYJKoZIhvcNAQEL -BQAwgZAxCzAJBgNVBAYTAkZSMSIwIAYDVQQHDBlTYWludC1TZWJhc3RpZW4gc3Vy -IExvaXJlMRQwEgYDVQQKDAtUcmFucXVpbCBJVDEUMBIGA1UEAwwLVHJhbnF1aWwg -SVQxJDAiBgkqhkiG9w0BCQEWFXRlY2huaXF1ZUB0cmFucXVpbC5pdDELMAkGA1UE -CwwCSVQwHhcNMjAwMjI0MTYxNzMxWhcNMzAwMjIxMTYxNzMxWjCBkDELMAkGA1UE -BhMCRlIxIjAgBgNVBAcMGVNhaW50LVNlYmFzdGllbiBzdXIgTG9pcmUxFDASBgNV -BAoMC1RyYW5xdWlsIElUMRQwEgYDVQQDDAtUcmFucXVpbCBJVDEkMCIGCSqGSIb3 -DQEJARYVdGVjaG5pcXVlQHRyYW5xdWlsLml0MQswCQYDVQQLDAJJVDCCASIwDQYJ -KoZIhvcNAQEBBQADggEPADCCAQoCggEBAMyo955wqwhYnLdzNFQ77DbWKzCn8QMb -YcvdScsaesMnnS8ZBrdnyrFSFecde+ahGdawDxnDpGTyLcDpwoNGToJLlQi3qnns -Wl9n8x6oRWlfxkA4wLFPdkIWtkqvkijru/eJjBtTEUk0dAejym0+L9NzE6zWnx+C -1V0ShCd9wdayBzTvBREYOhHGiMOuxg9qzjgLqVPNZH1QERKf9GjUuxIW9R3cQU1A -5DD4SvFTH5rxCCV1r6NQ8Wol1l1lvk+oVHX1DmfZuJaUHIlZBz8pTW8tXvYwdioA -MzThkyCYTadAWsVqi+iSAO30mxBssdny0wiH7q4p6qcSZQBOa8W5UTkCAwEAAaNa -MFgwDwYDVR0TAQH/BAUwAwEB/zAWBgNVHSUBAf8EDDAKBggrBgEFBQcDAzAdBgNV -HQ4EFgQUKfyxoBlP6/tLnsWIxC06Q9CszV4wDgYDVR0PAQH/BAQDAgHWMA0GCSqG -SIb3DQEBCwUAA4IBAQB0vl+7NwfYgeoBF2ptolWyAsISB+gRcEBRgmaQAQnb2nxs -pYStlZIsMJnaSHaWnXGXTS6Cw6k9Rm61qrcbrVuzdbHtaDSEakMV17sIVRH0Gyd+ -9K7nXoPhN9vbBEcz8pQ5SgchKMfqAAeQQUqaSmYQ1xUsqUgUHoj6eyYTtJM3pYMN -0uukO0+aUDhvXWQYYurlzJkdqH0kV2IJw+dNBrAvXaVrYBwEIxThQ6UNaEFnPjIX -XYGrkl5wpwoIxMQ8uNjZoFOYxrjvqxEVV2ZjoOGMlYNTHsNC5g25QygCWJtGfrHO -2ywdWen+9NKRBrsVpZo5cMttMgDXrsWiMb+MRGWZ ------END CERTIFICATE----- diff --git a/tis/tis-disable-smb1-client/WAPT/control b/tis/tis-disable-smb1-client/WAPT/control deleted file mode 100644 index 761826a..0000000 --- a/tis/tis-disable-smb1-client/WAPT/control +++ /dev/null @@ -1,42 +0,0 @@ -package : tis-disable-smb1 -version : 22 -architecture : all -section : base -priority : standard -name : -categories : -maintainer : Hubert TOUVET -description : Disable SMB1 Server on Windows >= Vista. Install KB4012598 on win XP. -depends : -conflicts : -maturity : -locale : -target_os : -min_os_version : -max_os_version : -min_wapt_version : -sources : https://srvdev.tranquilit.local/sources/tis-disable-smb1-wapt/trunk/ -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 : 9253096f-9122-45e5-a71a-4b52d58a6bd0 -valid_from : -valid_until : -forced_install_on : -signer : Tranquil IT -signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb -signature : txCgBHbXkCW3CdW6+7rOTA1EiEWw7xwGGpjde3rC2bDWTE82CEI1z4A1EYy1dESY/Y79O9dxHdJYKvTECtsoYy63sqp8euc1JzRbOPxutkT8ngr5nMs0OEZRRpQ05w0wTU0hciAvMylRS5TiqT/fnwSEJOgMA7sLB7quFTFkT59m7wx3Pa/jTRxnG7iR0ms4nxBLXwOvw4W2NswFTjgcQXpSGYg1RDD+54ELDk9P0aCaRIeJO/ygIcjRNfQHiItDT92vrk+Mh7nBzsdAuKXPWrwBnhGD4Z1WToLKv2P+KsWZqPQoBdRzjrdi7B2ubLXn5W1Ml9C38nBG57xXmS3AmQ== -signature_date : 2020-02-27T21:29:45.689828 -signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_os_version,max_os_version,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,signer,signer_fingerprint,signature_date,signed_attributes \ No newline at end of file diff --git a/tis/tis-disable-smb1-client/WAPT/manifest.sha1 b/tis/tis-disable-smb1-client/WAPT/manifest.sha1 deleted file mode 100644 index 64db869..0000000 --- a/tis/tis-disable-smb1-client/WAPT/manifest.sha1 +++ /dev/null @@ -1 +0,0 @@ -[["WindowsServer2003-KB4012598-x64-custom-ENU.exe","f24d8723f246145524b9030e4752c96430981211"],["WAPT/certificate.crt","8d0a43a817fe7784c63839db94ddf8a3572c8e7a"],["WAPT/wapt.psproj","557e60050809687d56525e6ac46df9c0e02ccae6"],["windowsserver2003-kb4012598-x86-custom-fra_9cf9ac070a1b21bca6757de5d127427c090d581d.exe","9cf9ac070a1b21bca6757de5d127427c090d581d"],["setup.py","d354e5ff47cd888edb3a68d12310c0c2176a4720"],["windowsxp-kb4012598-x86-custom-fra_eb47689656c58ab374521babb9bdca07304d87f5.exe","eb47689656c58ab374521babb9bdca07304d87f5"],["WAPT/control","a31a75ea46b72eb7e8381ea334045f8d0c79bd7d"]] \ No newline at end of file diff --git a/tis/tis-disable-smb1-client/WAPT/manifest.sha256 b/tis/tis-disable-smb1-client/WAPT/manifest.sha256 deleted file mode 100644 index 5dd1570..0000000 --- a/tis/tis-disable-smb1-client/WAPT/manifest.sha256 +++ /dev/null @@ -1 +0,0 @@ -[["WindowsServer2003-KB4012598-x64-custom-ENU.exe","fa2f1ac56bb81d236e797afea75ce4f4ecf374ed1182e7e2337350f387fd5eac"],["WAPT/certificate.crt","a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf"],["WAPT/wapt.psproj","795d36d10109ca85357285f79090fac2be856e5830ea31fa913cc55cb825807b"],["windowsserver2003-kb4012598-x86-custom-fra_9cf9ac070a1b21bca6757de5d127427c090d581d.exe","1f113bbcb4ec87efb80b105de1591e42dd9ff41f2f81fe04bab3e878cd5c069e"],["setup.py","2d19c818ea1223ac4e9e9585a805243d2c78290bd7b33fe77a65b3e47be58d26"],["windowsxp-kb4012598-x86-custom-fra_eb47689656c58ab374521babb9bdca07304d87f5.exe","3b5aa3201ca409a073dabff9c5fdd8a635851eb37befaef28829c4f374367412"],["WAPT/control","998096546ac1e098ef0669e53c168919fc6d3411388e44a355621f42f5243e56"]] \ No newline at end of file diff --git a/tis/tis-disable-smb1-client/WAPT/signature b/tis/tis-disable-smb1-client/WAPT/signature deleted file mode 100644 index fa1d1af..0000000 --- a/tis/tis-disable-smb1-client/WAPT/signature +++ /dev/null @@ -1,5 +0,0 @@ -ivYRrF6e04Vr/9rakIPqGXfed6ncWq30DUNoQ8SmPDZbCR9rWI90AqPmMw84LkxORPxmAGbTH3/t -d4QcDqPmChoefdf16wudEqf0H4FXGQYpnqG3TQ5i1m3bfymjn8H9W945ZR1r2KJLqMEC5W7Iqhwh -vk49iRRejdcdNk9uLObMSsMN50x2MEMsiI3k0ExxqfazlBxxnTXtUX/b0QYYXlZrUeOukhHj3y2J -Supfj5pbGe+MNkiKFlW18FCbCYOJLn+yZNtFJAHlyb0XWKbIu3CsU56fN4MJluj8yI1KW3nDezIy -jZ8zrX0zY/viC+ftaI1j20bZ89w/jawGNV/L/A== diff --git a/tis/tis-disable-smb1-client/WAPT/signature.sha256 b/tis/tis-disable-smb1-client/WAPT/signature.sha256 deleted file mode 100644 index f2e0468..0000000 --- a/tis/tis-disable-smb1-client/WAPT/signature.sha256 +++ /dev/null @@ -1,5 +0,0 @@ -FcJVI/orDVJPYstrpw8ueevz/tn7jK0rIBlBIJcsSGtytJjpxT5SKyv9ezGHXC40XQcy2m7GKgih -kETKDnJm05u1gYFSzsjxRh0D61QV/vquTVgidlZTvp/80ejbXo5Sk2owxqQzJTu300AOKMUZ83uC -XjMbvA8vwW+X6VJtf/NU+hK9fpTQsNzHKmGfFLvA04+z1D1ojukdrder8PTZiej1ceZD/oOubXtI -Bl9berDu0eBe9t7VL8l5sDOaLnXNQ9XDpLZWQ92HmUsWO14LdF5iSLCv0MVdJfuRF0tefgHDYTc1 -RbfpSEv1SVhtsmsy3CVTGMIqZKv9O/nNG3a+nA== diff --git a/tis/tis-disable-smb1-client/WAPT/wapt.psproj b/tis/tis-disable-smb1-client/WAPT/wapt.psproj deleted file mode 100644 index be63f91..0000000 --- a/tis/tis-disable-smb1-client/WAPT/wapt.psproj +++ /dev/null @@ -1,247 +0,0 @@ -[PyScripter] -Version=2.5.3.0 - -[Project] -ClassName=TProjectRootNode -StoreRelativePaths=TRUE -ShowFileExtensions=FALSE - -[Project\ChildNodes\Node0] -ClassName=TProjectFilesNode - -[Project\ChildNodes\Node0\ChildNodes\Node0] -ClassName=TProjectFolderNode -Name=wapt - -[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node0] -ClassName=TProjectFileNode -FileName=c:\wapt\common.py - -[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1] -ClassName=TProjectFileNode -FileName=c:\wapt\setuphelpers.py - -[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node2] -ClassName=TProjectFileNode -FileName=c:\wapt\wapt-get.py - -[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3] -ClassName=TProjectFileNode -FileName=c:\wapt\wapt-get.ini - -[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node4] -ClassName=TProjectFileNode -FileName=c:\wapt\waptpackage.py - -[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes] -Count=5 - -[Project\ChildNodes\Node0\ChildNodes\Node1] -ClassName=TProjectFileNode -FileName=$[Project-Path]control - -[Project\ChildNodes\Node0\ChildNodes\Node2] -ClassName=TProjectFileNode -FileName=$[Project-Path]..\setup.py - -[Project\ChildNodes\Node0\ChildNodes] -Count=3 - -[Project\ChildNodes\Node1] -ClassName=TProjectRunConfiguationsNode - -[Project\ChildNodes\Node1\ChildNodes\Node0] -ClassName=TProjectRunConfiguationNode -Name=install - -[Project\ChildNodes\Node1\ChildNodes\Node0\RunConfig] -ScriptName=c:\wapt\wapt-get.py -EngineType=peRemote -ReinitializeBeforeRun=TRUE -Parameters=-ldebug install "$[ActiveDoc-Dir]" -WorkingDir=$[ActiveScript-Dir] -WriteOutputToFile=FALSE -OutputFileName=$[ActiveScript-NoExt].log -AppendToFile=FALSE - -[Project\ChildNodes\Node1\ChildNodes\Node0\RunConfig\ExternalRun] -Caption=External Run -Description=Run script using an external Python Interpreter -ApplicationName=$[PythonExe-Short] -Parameters=$[ActiveScript-Short] -WorkingDirectory=$[ActiveScript-Dir] -ShortCut=0 -MessagesFormat=$[FileName] $[LineNumber] - -[Project\ChildNodes\Node1\ChildNodes\Node1] -ClassName=TProjectRunConfiguationNode -Name=remove - -[Project\ChildNodes\Node1\ChildNodes\Node1\RunConfig] -ScriptName=c:\wapt\wapt-get.py -EngineType=peRemote -ReinitializeBeforeRun=TRUE -Parameters=-ldebug remove "$[ActiveDoc-Dir]" -WorkingDir=$[ActiveScript-Dir] -WriteOutputToFile=FALSE -OutputFileName=$[ActiveScript-NoExt].log -AppendToFile=FALSE - -[Project\ChildNodes\Node1\ChildNodes\Node1\RunConfig\ExternalRun] -Caption=External Run -Description=Run script using an external Python Interpreter -ApplicationName=$[PythonExe-Short] -Parameters=$[ActiveScript-Short] -WorkingDirectory=$[ActiveScript-Dir] -ShortCut=0 -MessagesFormat=$[FileName] $[LineNumber] - -[Project\ChildNodes\Node1\ChildNodes\Node2] -ClassName=TProjectRunConfiguationNode -Name=session-setup - -[Project\ChildNodes\Node1\ChildNodes\Node2\RunConfig] -ScriptName=c:\wapt\wapt-get.py -EngineType=peRemote -ReinitializeBeforeRun=TRUE -Parameters=-ldebug session-setup "$[ActiveDoc-Dir]" -WorkingDir=$[ActiveScript-Dir] -WriteOutputToFile=FALSE -OutputFileName=$[ActiveScript-NoExt].log -AppendToFile=FALSE - -[Project\ChildNodes\Node1\ChildNodes\Node2\RunConfig\ExternalRun] -Caption=External Run -Description=Run script using an external Python Interpreter -ApplicationName=$[PythonExe-Short] -Parameters=$[ActiveScript-Short] -WorkingDirectory=$[ActiveScript-Dir] -ShortCut=0 -MessagesFormat=$[FileName] $[LineNumber] - -[Project\ChildNodes\Node1\ChildNodes\Node3] -ClassName=TProjectRunConfiguationNode -Name=update - -[Project\ChildNodes\Node1\ChildNodes\Node3\RunConfig] -ScriptName=c:\wapt\wapt-get.py -EngineType=peRemote -ReinitializeBeforeRun=TRUE -Parameters=-ldebug update -WorkingDir=$[ActiveScript-Dir] -WriteOutputToFile=FALSE -OutputFileName=$[ActiveScript-NoExt].log -AppendToFile=FALSE - -[Project\ChildNodes\Node1\ChildNodes\Node3\RunConfig\ExternalRun] -Caption=External Run -Description=Run script using an external Python Interpreter -ApplicationName=$[PythonExe-Short] -Parameters=$[ActiveScript-Short] -WorkingDirectory=$[ActiveScript-Dir] -ShortCut=0 -MessagesFormat=$[FileName] $[LineNumber] - -[Project\ChildNodes\Node1\ChildNodes\Node4] -ClassName=TProjectRunConfiguationNode -Name=upgrade - -[Project\ChildNodes\Node1\ChildNodes\Node4\RunConfig] -ScriptName=c:\wapt\wapt-get.py -EngineType=peRemote -ReinitializeBeforeRun=TRUE -Parameters=-f -ldebug upgrade -WorkingDir=$[ActiveScript-Dir] -WriteOutputToFile=FALSE -OutputFileName=$[ActiveScript-NoExt].log -AppendToFile=FALSE - -[Project\ChildNodes\Node1\ChildNodes\Node4\RunConfig\ExternalRun] -Caption=External Run -Description=Run script using an external Python Interpreter -ApplicationName=$[PythonExe-Short] -Parameters=$[ActiveScript-Short] -WorkingDirectory=$[ActiveScript-Dir] -ShortCut=0 -MessagesFormat=$[FileName] $[LineNumber] - -[Project\ChildNodes\Node1\ChildNodes\Node5] -ClassName=TProjectRunConfiguationNode -Name=-i build-upload - -[Project\ChildNodes\Node1\ChildNodes\Node5\RunConfig] -ScriptName=c:\wapt\wapt-get.py -EngineType=peRemote -ReinitializeBeforeRun=TRUE -Parameters=-ldebug -i build-upload "$[ActiveDoc-Dir]" -WorkingDir=$[ActiveScript-Dir] -WriteOutputToFile=FALSE -OutputFileName=$[ActiveScript-NoExt].log -AppendToFile=FALSE - -[Project\ChildNodes\Node1\ChildNodes\Node5\RunConfig\ExternalRun] -Caption=External Run -Description=Run script using an external Python Interpreter -ApplicationName=$[PythonExe-Short] -Parameters=$[ActiveScript-Short] -WorkingDirectory=$[ActiveScript-Dir] -ShortCut=0 -MessagesFormat=$[FileName] $[LineNumber] - -[Project\ChildNodes\Node1\ChildNodes\Node6] -ClassName=TProjectRunConfiguationNode -Name=svn update - -[Project\ChildNodes\Node1\ChildNodes\Node6\RunConfig] -ScriptName=c:\wapt\wapt-get.py -EngineType=peRemote -ReinitializeBeforeRun=TRUE -Parameters=-ldebug sources "$[ActiveDoc-Dir]" -WorkingDir=$[ActiveScript-Dir] -WriteOutputToFile=FALSE -OutputFileName=$[ActiveScript-NoExt].log -AppendToFile=FALSE - -[Project\ChildNodes\Node1\ChildNodes\Node6\RunConfig\ExternalRun] -Caption=External Run -Description=Run script using an external Python Interpreter -ApplicationName=$[PythonExe-Short] -Parameters=$[ActiveScript-Short] -WorkingDirectory=$[ActiveScript-Dir] -ShortCut=0 -MessagesFormat=$[FileName] $[LineNumber] - -[Project\ChildNodes\Node1\ChildNodes\Node7] -ClassName=TProjectRunConfiguationNode -Name=uninstall - -[Project\ChildNodes\Node1\ChildNodes\Node7\RunConfig] -ScriptName=c:\wapt\wapt-get.py -EngineType=peRemote -ReinitializeBeforeRun=TRUE -Parameters=-ldebug uninstall "$[ActiveDoc-Dir]" -WorkingDir=$[ActiveScript-Dir] -WriteOutputToFile=FALSE -OutputFileName=$[ActiveScript-NoExt].log -AppendToFile=FALSE - -[Project\ChildNodes\Node1\ChildNodes\Node7\RunConfig\ExternalRun] -Caption=External Run -Description=Run script using an external Python Interpreter -ApplicationName=$[PythonExe-Short] -Parameters=$[ActiveScript-Short] -WorkingDirectory=$[ActiveScript-Dir] -ShortCut=0 -MessagesFormat=$[FileName] $[LineNumber] - -[Project\ChildNodes\Node1\ChildNodes] -Count=8 - -[Project\ChildNodes] -Count=2 - -[Project\ExtraPythonPath] -Item0=c:\wapt -Item1=c:\wapt\lib\site-packages -Count=2 - diff --git a/tis/tis-disable-smb1-client/WindowsServer2003-KB4012598-x64-custom-ENU.exe b/tis/tis-disable-smb1-client/WindowsServer2003-KB4012598-x64-custom-ENU.exe deleted file mode 100644 index 8f05779..0000000 --- a/tis/tis-disable-smb1-client/WindowsServer2003-KB4012598-x64-custom-ENU.exe +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fa2f1ac56bb81d236e797afea75ce4f4ecf374ed1182e7e2337350f387fd5eac -size 974072 diff --git a/tis/tis-disable-smb1-client/setup.py b/tis/tis-disable-smb1-client/setup.py deleted file mode 100644 index cf4335e..0000000 --- a/tis/tis-disable-smb1-client/setup.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -from setuphelpers import * -import platform - -uninstallkey = [] - -def pending_reboot_reasons(): - result = [] - reboot_required = registry_readstring(HKEY_LOCAL_MACHINE,r'SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update','RebootRequired',0) - if reboot_required: - result.append('Windows Update: %s' % reboot_required) - reboot_pending = registry_readstring(HKEY_LOCAL_MACHINE,r'SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing','RebootPending',0) - if reboot_pending: - result.append('CBS Updates: %s' % reboot_pending) - renames_pending = registry_readstring(HKEY_LOCAL_MACHINE,r'SYSTEM\CurrentControlSet\Control\Session Manager','PendingFileRenameOperations',None) - if renames_pending: - result.append('File renames: %s' % renames_pending) - return result - -def is_kb_installed(hotfixid): - installed_update = installed_windows_updates() - if [kb for kb in installed_update if kb['HotFixID' ].upper() == hotfixid.upper()]: - return True - return False - - -def install_kb4012598(): - if windows_version() < Version('5.2'): - install_exe_if_needed('windowsxp-kb4012598-x86-custom-fra_eb47689656c58ab374521babb9bdca07304d87f5.exe','/quiet /norestart',key='',min_version='1') - elif windows_version() < Version('5.3'): - if iswin64(): - install_exe_if_needed('WindowsServer2003-KB4012598-x64-custom-ENU.exe','/quiet /norestart',key='',min_version='1') - else: - install_exe_if_needed('windowsserver2003-kb4012598-x86-custom-fra_9cf9ac070a1b21bca6757de5d127427c090d581d.exe','/quiet /norestart',key='',min_version='1') - else: - error('Please install kb4012598') - -def install(): - restart_needed_by = [] - - """ - if service_installed('mrxsmb10') and service_is_running('mrxsmb10'): - print('Disable SMB1 client') - run('sc.exe config lanmanworkstation depend= bowser/mrxsmb20/nsi') - run('sc.exe config mrxsmb10 start= disabled') - restart_needed_by.append('Disable SMB1 client service') - else: - print('OK: SMB1 client not running') - """ - - if windows_version() < Version('8.1',2): - was_smb1server = registry_readstring(HKEY_LOCAL_MACHINE,r'SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters','SMB1',1) - registry_setstring(HKEY_LOCAL_MACHINE,r'SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters','SMB1',0,type=REG_DWORD) - if was_smb1server: - restart_needed_by.append('Disable SMB1 server service') - else: - print('OK: SMB1 server disabled in registry') - else: - was_smb1server = run_powershell('Get-SmbServerConfiguration | Select EnableSMB1Protocol').get('EnableSMB1Protocol',True) - print('Current SMB1 status : %s' % (was_smb1server,)) - if was_smb1server: - print('Disabling SMB1') - result = run_powershell('Set-SmbServerConfiguration -EnableSMB1Protocol $false -Force') - result = run_powershell('Disable-WindowsOptionalFeature -Online -FeatureName smb1protocol -NoRestart') - # {u'ScratchDirectory': None, u'RestartNeeded': True, u'LogLevel': 2, u'LogPath': u'C:\\Windows\\Logs\\DISM\\dism.log', u'WinPath': None, u'Online': True, u'SysDrivePath': None, u'Path': None} - if result.get('RestartNeeded',True): - restart_needed_by.append('Disable SMB1 Server Feature') - - # before Vista, no SMB2, so check patch - if windows_version() < Version('6.0'): - # check if KB4012598 is installed - if not is_kb_installed('KB4012598'): - install_kb4012598() - - restart_needed_by.extend(pending_reboot_reasons()) - if was_smb1server or restart_needed_by: - with disable_file_system_redirection(): - run_notfatal('msg * /time:360 Merci de redemarrer votre ordinateur pour terminer la desactivation du service vulnerable serveur SMB1. Tranquil IT Systems.') - error('Redemarrage necessaire pour : %s ' % restart_needed_by) - else: - print('No reboot required') - - -def uninstall(): - restart_needed_by = [] - """ - if service_installed('mrxsmb10') and not service_is_running('mrxsmb10'): - print('Enable SMB1 client') - # see https://support.microsoft.com/fr-fr/help/2696547/how-to-enable-and-disable-smbv1,-smbv2,-and-smbv3-in-windows-vista,-windows-server-2008,-windows-7,-windows-server-2008-r2,-windows-8,-and-windows-server-2012 - run('sc.exe config lanmanworkstation depend= bowser/mrxsmb10/mrxsmb20/nsi') - run('sc.exe config mrxsmb10 start= auto') - restart_needed_by.append('Enable SMB1 client service') - else: - print('OK: SMB1 client running or not installed') - """ - - if windows_version() < Version('8.1'): - was_smb1server = registry_readstring(HKEY_LOCAL_MACHINE,r'SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters','SMB1',0) - registry_setstring(HKEY_LOCAL_MACHINE,r'SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters','SMB1',1,type=REG_DWORD) - if not was_smb1server: - restart_needed_by.append('Enable SMB1 server service') - else: - print('OK: SMB1 server enabled in registry') - else: - was_smb1server = run_powershell('Get-SmbServerConfiguration | Select EnableSMB1Protocol').get('EnableSMB1Protocol',True) - print('Current SMB1 status : %s' % (was_smb1server,)) - if not was_smb1server: - print('Enabling SMB1') - result = run_powershell('Set-SmbServerConfiguration -EnableSMB1Protocol $true -Force') - result = run_powershell('Enable-WindowsOptionalFeature -Online -FeatureName smb1protocol -NoRestart') - # {u'ScratchDirectory': None, u'RestartNeeded': True, u'LogLevel': 2, u'LogPath': u'C:\\Windows\\Logs\\DISM\\dism.log', u'WinPath': None, u'Online': True, u'SysDrivePath': None, u'Path': None} - if result.get('RestartNeeded',True): - restart_needed_by.append('Enable SMB1 Server Feature') - - restart_needed_by.extend(pending_reboot_reasons()) - if not was_smb1server or restart_needed_by: - with disable_file_system_redirection(): - run_notfatal('msg * /time:360 Merci de redemarrer votre ordinateur pour terminer la reactivation du service serveur SMB1. Tranquil IT Systems.') - else: - print('No reboot required') diff --git a/tis/tis-disable-smb1-client/windowsserver2003-kb4012598-x86-custom-fra_9cf9ac070a1b21bca6757de5d127427c090d581d.exe b/tis/tis-disable-smb1-client/windowsserver2003-kb4012598-x86-custom-fra_9cf9ac070a1b21bca6757de5d127427c090d581d.exe deleted file mode 100644 index 0e04afd..0000000 --- a/tis/tis-disable-smb1-client/windowsserver2003-kb4012598-x86-custom-fra_9cf9ac070a1b21bca6757de5d127427c090d581d.exe +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1f113bbcb4ec87efb80b105de1591e42dd9ff41f2f81fe04bab3e878cd5c069e -size 707320 diff --git a/tis/tis-disable-smb1-client/windowsxp-kb4012598-x86-custom-fra_eb47689656c58ab374521babb9bdca07304d87f5.exe b/tis/tis-disable-smb1-client/windowsxp-kb4012598-x86-custom-fra_eb47689656c58ab374521babb9bdca07304d87f5.exe deleted file mode 100644 index f737192..0000000 --- a/tis/tis-disable-smb1-client/windowsxp-kb4012598-x86-custom-fra_eb47689656c58ab374521babb9bdca07304d87f5.exe +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3b5aa3201ca409a073dabff9c5fdd8a635851eb37befaef28829c4f374367412 -size 688880 diff --git a/tis/tis-enable-smb1-client/WAPT/certificate.crt b/tis/tis-enable-smb1-client/WAPT/certificate.crt deleted file mode 100644 index 4d9c7b0..0000000 --- a/tis/tis-enable-smb1-client/WAPT/certificate.crt +++ /dev/null @@ -1,24 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIECjCCAvKgAwIBAgIUcFRJMa4zqkCH5BWTdQs5ogRDo9swDQYJKoZIhvcNAQEL -BQAwgZAxCzAJBgNVBAYTAkZSMSIwIAYDVQQHDBlTYWludC1TZWJhc3RpZW4gc3Vy -IExvaXJlMRQwEgYDVQQKDAtUcmFucXVpbCBJVDEUMBIGA1UEAwwLVHJhbnF1aWwg -SVQxJDAiBgkqhkiG9w0BCQEWFXRlY2huaXF1ZUB0cmFucXVpbC5pdDELMAkGA1UE -CwwCSVQwHhcNMjAwMjI0MTYxNzMxWhcNMzAwMjIxMTYxNzMxWjCBkDELMAkGA1UE -BhMCRlIxIjAgBgNVBAcMGVNhaW50LVNlYmFzdGllbiBzdXIgTG9pcmUxFDASBgNV -BAoMC1RyYW5xdWlsIElUMRQwEgYDVQQDDAtUcmFucXVpbCBJVDEkMCIGCSqGSIb3 -DQEJARYVdGVjaG5pcXVlQHRyYW5xdWlsLml0MQswCQYDVQQLDAJJVDCCASIwDQYJ -KoZIhvcNAQEBBQADggEPADCCAQoCggEBAMyo955wqwhYnLdzNFQ77DbWKzCn8QMb -YcvdScsaesMnnS8ZBrdnyrFSFecde+ahGdawDxnDpGTyLcDpwoNGToJLlQi3qnns -Wl9n8x6oRWlfxkA4wLFPdkIWtkqvkijru/eJjBtTEUk0dAejym0+L9NzE6zWnx+C -1V0ShCd9wdayBzTvBREYOhHGiMOuxg9qzjgLqVPNZH1QERKf9GjUuxIW9R3cQU1A -5DD4SvFTH5rxCCV1r6NQ8Wol1l1lvk+oVHX1DmfZuJaUHIlZBz8pTW8tXvYwdioA -MzThkyCYTadAWsVqi+iSAO30mxBssdny0wiH7q4p6qcSZQBOa8W5UTkCAwEAAaNa -MFgwDwYDVR0TAQH/BAUwAwEB/zAWBgNVHSUBAf8EDDAKBggrBgEFBQcDAzAdBgNV -HQ4EFgQUKfyxoBlP6/tLnsWIxC06Q9CszV4wDgYDVR0PAQH/BAQDAgHWMA0GCSqG -SIb3DQEBCwUAA4IBAQB0vl+7NwfYgeoBF2ptolWyAsISB+gRcEBRgmaQAQnb2nxs -pYStlZIsMJnaSHaWnXGXTS6Cw6k9Rm61qrcbrVuzdbHtaDSEakMV17sIVRH0Gyd+ -9K7nXoPhN9vbBEcz8pQ5SgchKMfqAAeQQUqaSmYQ1xUsqUgUHoj6eyYTtJM3pYMN -0uukO0+aUDhvXWQYYurlzJkdqH0kV2IJw+dNBrAvXaVrYBwEIxThQ6UNaEFnPjIX -XYGrkl5wpwoIxMQ8uNjZoFOYxrjvqxEVV2ZjoOGMlYNTHsNC5g25QygCWJtGfrHO -2ywdWen+9NKRBrsVpZo5cMttMgDXrsWiMb+MRGWZ ------END CERTIFICATE----- diff --git a/tis/tis-enable-smb1-client/WAPT/control b/tis/tis-enable-smb1-client/WAPT/control deleted file mode 100644 index d1456db..0000000 --- a/tis/tis-enable-smb1-client/WAPT/control +++ /dev/null @@ -1,42 +0,0 @@ -package : tis-enable-smb1-client -version : 11 -architecture : all -section : base -priority : critical -name : -categories : -maintainer : Hubert TOUVET -description : Enable SMB1 Client on Windows > Vista -depends : -conflicts : -maturity : -locale : -target_os : -min_os_version : 6.0 -max_os_version : -min_wapt_version : -sources : https://srvdev.tranquilit.local/sources/tis-disable-smb1-wapt/trunk/ -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 : b6bdffa4-e2a9-4a8a-b0e7-d7d1a2a9c228 -valid_from : -valid_until : -forced_install_on : -signer : Tranquil IT -signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb -signature : gR0xemqsVCcFJ0e05lTebfdv2JRHCJXHsm52jA7wsP0TWh/TRMJAac/VoNNGbQKGo7QXfo/y3dAX1VVu0DZ0QauAv9Mja9zzgfcUcBpQm7k2p7+im4waHyeVoNSl19c6A2dycdpStZlWBtG6s2E2KBMSYpCveH1Sn2MSsUb1f5eiy84UisFGkUNNhmn+6y6qo7FvSIAZ+TglIhT30n6Ur8RrV8/y+KOBNr1tVXr5KQs2IWVGZVBnj73Frj9k0apniIWs7gX+dVFLTCgt44DabsqgXCMS3nxVamTYNGgHDRpWlmZjuUqqjlfJuj7B4RjPbQJVOKCRLW19f0vB4iaeXw== -signature_date : 2020-02-27T21:31:57.375055 -signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_os_version,max_os_version,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,signer,signer_fingerprint,signature_date,signed_attributes \ No newline at end of file diff --git a/tis/tis-enable-smb1-client/WAPT/manifest.sha1 b/tis/tis-enable-smb1-client/WAPT/manifest.sha1 deleted file mode 100644 index 3739c0b..0000000 --- a/tis/tis-enable-smb1-client/WAPT/manifest.sha1 +++ /dev/null @@ -1 +0,0 @@ -[["setup.py","7b54165a3fba1d3cbace3bc8db1e2eb1e56f0d6c"],["WAPT/certificate.crt","8d0a43a817fe7784c63839db94ddf8a3572c8e7a"],["WAPT/wapt.psproj","557e60050809687d56525e6ac46df9c0e02ccae6"],["WAPT/control","b7ebf575e07b9e983bce337a6f717a8dc9c791a8"]] \ No newline at end of file diff --git a/tis/tis-enable-smb1-client/WAPT/manifest.sha256 b/tis/tis-enable-smb1-client/WAPT/manifest.sha256 deleted file mode 100644 index 32bdc76..0000000 --- a/tis/tis-enable-smb1-client/WAPT/manifest.sha256 +++ /dev/null @@ -1 +0,0 @@ -[["setup.py","1979e98fd406487a37762cb51ba6dc21079b2cf4711971595fdf6febe87ff384"],["WAPT/certificate.crt","a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf"],["WAPT/wapt.psproj","795d36d10109ca85357285f79090fac2be856e5830ea31fa913cc55cb825807b"],["WAPT/control","557a8ad7bdbb6bda9b4a115744c888ebabd5cc104802312481ae6ec5366ad763"]] \ No newline at end of file diff --git a/tis/tis-enable-smb1-client/WAPT/signature b/tis/tis-enable-smb1-client/WAPT/signature deleted file mode 100644 index cba0d3a..0000000 --- a/tis/tis-enable-smb1-client/WAPT/signature +++ /dev/null @@ -1,5 +0,0 @@ -VVqiYvx5M0oCLBdh9BjQSFXKvmYEaD9MNClN7oqNosxDDOql9lxdHzppAdNLIkzTE0YmPe4TGG3T -D1puyUuSjn70k1mo1xsdu5xdPViElZuyG9XjOw7ZmleaeKf/DAnMjsTKK7OMIdMtbtxqlhBUBK2u -uvwtCuYLXeV/x4JOi1go7W2/mHA4mglnAr/h9UkPqGKlisjA9qFOYYDqn7ODTd58blRb3ZtzFk1j -ZrxJ9VQPyJu8c7PIYBgsEd0ouWVdM1ldsar05JQzmUvC0b933WNidDwUq/AsP4uzKyHLo4Sf7cut -pMnGIS3444QGhtEXANMeCs2VQGs/TldxE+6omg== diff --git a/tis/tis-enable-smb1-client/WAPT/signature.sha256 b/tis/tis-enable-smb1-client/WAPT/signature.sha256 deleted file mode 100644 index 104897c..0000000 --- a/tis/tis-enable-smb1-client/WAPT/signature.sha256 +++ /dev/null @@ -1,5 +0,0 @@ -v2cEqFjlhrfJZmU2hxkr48FlXwxce0tpeRjTzdmKjaZJrR6QSa8akziOR/R2+t7ALvGrZRPn1uI6 -6gCUukdrtA9voFoCvZ37vHsFkG3Fn7TAdY49LxHymKY2TK8p3YrDvkDaaAzVamSVJRg1NB2kDjzn -Gxec1Fw572bqczW/wvgpvBLtogkHoUeDeheXhTa+hWpEo2IJK1qtK2Q1fVfPg7Llxhsf9UAM9L9G -QAq9Z6Qf3pzramIDnyTO6DxZKssFQYFU/crQsecFioh703jHUSHJUnQfuqeHCCgwqELLD+iMUOHp -roAPhgB4qmam+6m6qMGNDmyoZG7TnKNHnvptCA== diff --git a/tis/tis-enable-smb1-client/WAPT/wapt.psproj b/tis/tis-enable-smb1-client/WAPT/wapt.psproj deleted file mode 100644 index be63f91..0000000 --- a/tis/tis-enable-smb1-client/WAPT/wapt.psproj +++ /dev/null @@ -1,247 +0,0 @@ -[PyScripter] -Version=2.5.3.0 - -[Project] -ClassName=TProjectRootNode -StoreRelativePaths=TRUE -ShowFileExtensions=FALSE - -[Project\ChildNodes\Node0] -ClassName=TProjectFilesNode - -[Project\ChildNodes\Node0\ChildNodes\Node0] -ClassName=TProjectFolderNode -Name=wapt - -[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node0] -ClassName=TProjectFileNode -FileName=c:\wapt\common.py - -[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1] -ClassName=TProjectFileNode -FileName=c:\wapt\setuphelpers.py - -[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node2] -ClassName=TProjectFileNode -FileName=c:\wapt\wapt-get.py - -[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3] -ClassName=TProjectFileNode -FileName=c:\wapt\wapt-get.ini - -[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node4] -ClassName=TProjectFileNode -FileName=c:\wapt\waptpackage.py - -[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes] -Count=5 - -[Project\ChildNodes\Node0\ChildNodes\Node1] -ClassName=TProjectFileNode -FileName=$[Project-Path]control - -[Project\ChildNodes\Node0\ChildNodes\Node2] -ClassName=TProjectFileNode -FileName=$[Project-Path]..\setup.py - -[Project\ChildNodes\Node0\ChildNodes] -Count=3 - -[Project\ChildNodes\Node1] -ClassName=TProjectRunConfiguationsNode - -[Project\ChildNodes\Node1\ChildNodes\Node0] -ClassName=TProjectRunConfiguationNode -Name=install - -[Project\ChildNodes\Node1\ChildNodes\Node0\RunConfig] -ScriptName=c:\wapt\wapt-get.py -EngineType=peRemote -ReinitializeBeforeRun=TRUE -Parameters=-ldebug install "$[ActiveDoc-Dir]" -WorkingDir=$[ActiveScript-Dir] -WriteOutputToFile=FALSE -OutputFileName=$[ActiveScript-NoExt].log -AppendToFile=FALSE - -[Project\ChildNodes\Node1\ChildNodes\Node0\RunConfig\ExternalRun] -Caption=External Run -Description=Run script using an external Python Interpreter -ApplicationName=$[PythonExe-Short] -Parameters=$[ActiveScript-Short] -WorkingDirectory=$[ActiveScript-Dir] -ShortCut=0 -MessagesFormat=$[FileName] $[LineNumber] - -[Project\ChildNodes\Node1\ChildNodes\Node1] -ClassName=TProjectRunConfiguationNode -Name=remove - -[Project\ChildNodes\Node1\ChildNodes\Node1\RunConfig] -ScriptName=c:\wapt\wapt-get.py -EngineType=peRemote -ReinitializeBeforeRun=TRUE -Parameters=-ldebug remove "$[ActiveDoc-Dir]" -WorkingDir=$[ActiveScript-Dir] -WriteOutputToFile=FALSE -OutputFileName=$[ActiveScript-NoExt].log -AppendToFile=FALSE - -[Project\ChildNodes\Node1\ChildNodes\Node1\RunConfig\ExternalRun] -Caption=External Run -Description=Run script using an external Python Interpreter -ApplicationName=$[PythonExe-Short] -Parameters=$[ActiveScript-Short] -WorkingDirectory=$[ActiveScript-Dir] -ShortCut=0 -MessagesFormat=$[FileName] $[LineNumber] - -[Project\ChildNodes\Node1\ChildNodes\Node2] -ClassName=TProjectRunConfiguationNode -Name=session-setup - -[Project\ChildNodes\Node1\ChildNodes\Node2\RunConfig] -ScriptName=c:\wapt\wapt-get.py -EngineType=peRemote -ReinitializeBeforeRun=TRUE -Parameters=-ldebug session-setup "$[ActiveDoc-Dir]" -WorkingDir=$[ActiveScript-Dir] -WriteOutputToFile=FALSE -OutputFileName=$[ActiveScript-NoExt].log -AppendToFile=FALSE - -[Project\ChildNodes\Node1\ChildNodes\Node2\RunConfig\ExternalRun] -Caption=External Run -Description=Run script using an external Python Interpreter -ApplicationName=$[PythonExe-Short] -Parameters=$[ActiveScript-Short] -WorkingDirectory=$[ActiveScript-Dir] -ShortCut=0 -MessagesFormat=$[FileName] $[LineNumber] - -[Project\ChildNodes\Node1\ChildNodes\Node3] -ClassName=TProjectRunConfiguationNode -Name=update - -[Project\ChildNodes\Node1\ChildNodes\Node3\RunConfig] -ScriptName=c:\wapt\wapt-get.py -EngineType=peRemote -ReinitializeBeforeRun=TRUE -Parameters=-ldebug update -WorkingDir=$[ActiveScript-Dir] -WriteOutputToFile=FALSE -OutputFileName=$[ActiveScript-NoExt].log -AppendToFile=FALSE - -[Project\ChildNodes\Node1\ChildNodes\Node3\RunConfig\ExternalRun] -Caption=External Run -Description=Run script using an external Python Interpreter -ApplicationName=$[PythonExe-Short] -Parameters=$[ActiveScript-Short] -WorkingDirectory=$[ActiveScript-Dir] -ShortCut=0 -MessagesFormat=$[FileName] $[LineNumber] - -[Project\ChildNodes\Node1\ChildNodes\Node4] -ClassName=TProjectRunConfiguationNode -Name=upgrade - -[Project\ChildNodes\Node1\ChildNodes\Node4\RunConfig] -ScriptName=c:\wapt\wapt-get.py -EngineType=peRemote -ReinitializeBeforeRun=TRUE -Parameters=-f -ldebug upgrade -WorkingDir=$[ActiveScript-Dir] -WriteOutputToFile=FALSE -OutputFileName=$[ActiveScript-NoExt].log -AppendToFile=FALSE - -[Project\ChildNodes\Node1\ChildNodes\Node4\RunConfig\ExternalRun] -Caption=External Run -Description=Run script using an external Python Interpreter -ApplicationName=$[PythonExe-Short] -Parameters=$[ActiveScript-Short] -WorkingDirectory=$[ActiveScript-Dir] -ShortCut=0 -MessagesFormat=$[FileName] $[LineNumber] - -[Project\ChildNodes\Node1\ChildNodes\Node5] -ClassName=TProjectRunConfiguationNode -Name=-i build-upload - -[Project\ChildNodes\Node1\ChildNodes\Node5\RunConfig] -ScriptName=c:\wapt\wapt-get.py -EngineType=peRemote -ReinitializeBeforeRun=TRUE -Parameters=-ldebug -i build-upload "$[ActiveDoc-Dir]" -WorkingDir=$[ActiveScript-Dir] -WriteOutputToFile=FALSE -OutputFileName=$[ActiveScript-NoExt].log -AppendToFile=FALSE - -[Project\ChildNodes\Node1\ChildNodes\Node5\RunConfig\ExternalRun] -Caption=External Run -Description=Run script using an external Python Interpreter -ApplicationName=$[PythonExe-Short] -Parameters=$[ActiveScript-Short] -WorkingDirectory=$[ActiveScript-Dir] -ShortCut=0 -MessagesFormat=$[FileName] $[LineNumber] - -[Project\ChildNodes\Node1\ChildNodes\Node6] -ClassName=TProjectRunConfiguationNode -Name=svn update - -[Project\ChildNodes\Node1\ChildNodes\Node6\RunConfig] -ScriptName=c:\wapt\wapt-get.py -EngineType=peRemote -ReinitializeBeforeRun=TRUE -Parameters=-ldebug sources "$[ActiveDoc-Dir]" -WorkingDir=$[ActiveScript-Dir] -WriteOutputToFile=FALSE -OutputFileName=$[ActiveScript-NoExt].log -AppendToFile=FALSE - -[Project\ChildNodes\Node1\ChildNodes\Node6\RunConfig\ExternalRun] -Caption=External Run -Description=Run script using an external Python Interpreter -ApplicationName=$[PythonExe-Short] -Parameters=$[ActiveScript-Short] -WorkingDirectory=$[ActiveScript-Dir] -ShortCut=0 -MessagesFormat=$[FileName] $[LineNumber] - -[Project\ChildNodes\Node1\ChildNodes\Node7] -ClassName=TProjectRunConfiguationNode -Name=uninstall - -[Project\ChildNodes\Node1\ChildNodes\Node7\RunConfig] -ScriptName=c:\wapt\wapt-get.py -EngineType=peRemote -ReinitializeBeforeRun=TRUE -Parameters=-ldebug uninstall "$[ActiveDoc-Dir]" -WorkingDir=$[ActiveScript-Dir] -WriteOutputToFile=FALSE -OutputFileName=$[ActiveScript-NoExt].log -AppendToFile=FALSE - -[Project\ChildNodes\Node1\ChildNodes\Node7\RunConfig\ExternalRun] -Caption=External Run -Description=Run script using an external Python Interpreter -ApplicationName=$[PythonExe-Short] -Parameters=$[ActiveScript-Short] -WorkingDirectory=$[ActiveScript-Dir] -ShortCut=0 -MessagesFormat=$[FileName] $[LineNumber] - -[Project\ChildNodes\Node1\ChildNodes] -Count=8 - -[Project\ChildNodes] -Count=2 - -[Project\ExtraPythonPath] -Item0=c:\wapt -Item1=c:\wapt\lib\site-packages -Count=2 - diff --git a/tis/tis-enable-smb1-client/setup.py b/tis/tis-enable-smb1-client/setup.py deleted file mode 100644 index 573efb2..0000000 --- a/tis/tis-enable-smb1-client/setup.py +++ /dev/null @@ -1,76 +0,0 @@ -# -*- coding: utf-8 -*- -from setuphelpers import * -import platform - -uninstallkey = [] - -def pending_reboot_reasons(): - result = [] - reboot_required = registry_readstring(HKEY_LOCAL_MACHINE,r'SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update','RebootRequired',0) - if reboot_required: - result.append('Windows Update: %s' % reboot_required) - reboot_pending = registry_readstring(HKEY_LOCAL_MACHINE,r'SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing','RebootPending',0) - if reboot_pending: - result.append('CBS Updates: %s' % reboot_pending) - #renames_pending = registry_readstring(HKEY_LOCAL_MACHINE,r'SYSTEM\CurrentControlSet\Control\Session Manager','PendingFileRenameOperations',None) - #if renames_pending: - # result.append('File renames: %s' % renames_pending) - return result - -def install(): - restart_needed_by = [] - if windows_version() == Version('10.0'): - print('enable smb1protocol') - result = run_powershell('Enable-WindowsOptionalFeature -Online -FeatureName smb1protocol -NoRestart') - if result.get('RestartNeeded',False): - restart_needed_by.append('Enable Windows 10 optional feature smb1protocol') - elif windows_version() == Version('6.2'): - print('add SMB1-FS') - result = run_powershell('Add-WindowsFeature -Name SMB1-FS -NoRestart') - if result.get('RestartNeeded',False): - restart_needed_by.append('Enable windows 12 feature smb1protocol') - elif (service_installed('mrxsmb10') and not service_is_running('mrxsmb10')): - print('Enable SMB1 client') - # see https://support.microsoft.com/fr-fr/help/2696547/how-to-enable-and-disable-smbv1,-smbv2,-and-smbv3-in-windows-vista,-windows-server-2008,-windows-7,-windows-server-2008-r2,-windows-8,-and-windows-server-2012 - run('sc.exe config lanmanworkstation depend= bowser/mrxsmb10/mrxsmb20/nsi') - run('sc.exe config mrxsmb10 start= auto') - try: - to_restart = [] - svcdepends = run('sc enumdepend lanmanworkstation').splitlines() - # ['SessionEnv', 'Netlogon', 'Browser'] - depends = [s.split(': ')[1] for s in svcdepends if s.startswith('SERVICE_NAME: ')] - for svc in depends: - if service_is_running(svc): - print('Stopping %s'%svc) - service_stop(svc) - to_restart.append(svc) - print('Restarting lanmanworkstation...') - if service_is_running('lanmanworkstation'): - service_restart('lanmanworkstation') - else: - service_start('lanmanworkstation') - print('Done.') - - print('lanmanworkstation redemarre avec SMB1') - except Exception as e: - print('Error trying to stop depends or start lanmanworkstation: %s' % repr(e)) - restart_needed_by.append('Enable SMB1 client service') - if not service_is_running('lanmanworkstation'): - service_start('lanmanworkstation') - finally: - for svc in to_restart: - if not service_is_running(svc): - print('Starting %s'%svc) - service_start(svc) - else: - print('OK: SMB1 client running or not installed or windows system not supported (version %s)' % windows_version()) - - #restart_needed_by.extend(pending_reboot_reasons()) - if (service_installed('mrxsmb10') and not service_is_running('mrxsmb10')) or restart_needed_by: - with disable_file_system_redirection(): - run_notfatal('msg * /time:360 Merci de redemarrer votre ordinateur pour terminer la l''activation du service client SMB1. Tranquil IT Systems.') - error('Redemarrage necessaire pour : %s ' % restart_needed_by) - else: - print('No reboot required') - -