commit ca728c51fdb7bf9375fa4e5d1fc37e8bac9cd84f Author: Gabriel Gendron Date: Mon Mar 18 12:25:37 2024 +0100 first commit diff --git a/.env b/.env new file mode 100644 index 0000000..7d8f006 --- /dev/null +++ b/.env @@ -0,0 +1,2 @@ +VIRTUAL_ENV=C:\Program Files (x86)\wapt\ +PYTHONPATH=C:\Program Files (x86)\wapt\ diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..584d5a5 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,305 @@ +{ + "version": "0.2.4", + "configurations": [ + { + "name": "WAPT: install", + "type": "python", + "request": "launch", + "justMyCode": false, + "program": "${config:python.wapt-get}", + "args": [ + "install", + "--no-ide", + "${workspaceFolder}" + ], + "console": "integratedTerminal", + "linux": { + "sudo": true + }, + "osx": { + "sudo": true + }, + "python": "${command:python.interpreterPath}", + "pythonArgs": [ + "-I", + "-B" + ] + }, + { + "name": "WAPT: remove", + "type": "python", + "request": "launch", + "justMyCode": false, + "program": "${config:python.wapt-get}", + "args": [ + "remove", + "--no-ide", + "${workspaceFolder}" + ], + "console": "integratedTerminal", + "linux": { + "sudo": true + }, + "osx": { + "sudo": true + }, + "python": "${command:python.interpreterPath}", + "pythonArgs": [ + "-I", + "-B" + ] + }, + { + "name": "WAPT: uninstall", + "type": "python", + "request": "launch", + "justMyCode": false, + "program": "${config:python.wapt-get}", + "args": [ + "uninstall", + "--no-ide", + "${workspaceFolder}" + ], + "console": "integratedTerminal", + "linux": { + "sudo": true + }, + "osx": { + "sudo": true + }, + "python": "${command:python.interpreterPath}", + "pythonArgs": [ + "-I", + "-B" + ] + }, + { + "name": "WAPT: session-setup", + "type": "python", + "request": "launch", + "justMyCode": false, + "program": "${config:python.wapt-get}", + "args": [ + "session-setup", + "--no-ide", + "${workspaceFolder}" + ], + "console": "integratedTerminal", + "python": "${command:python.interpreterPath}", + "pythonArgs": [ + "-I", + "-B" + ] + }, + { + "name": "WAPT: audit", + "type": "python", + "request": "launch", + "justMyCode": false, + "program": "${config:python.wapt-get}", + "args": [ + "audit", + "-f", + "--no-ide", + "${workspaceFolder}" + ], + "console": "integratedTerminal", + "linux": { + "sudo": true + }, + "osx": { + "sudo": true + }, + "python": "${command:python.interpreterPath}", + "pythonArgs": [ + "-I", + "-B" + ] + }, + { + "name": "WAPT: update-package", + "type": "python", + "request": "launch", + "justMyCode": false, + "program": "${config:python.wapt-get}", + "args": [ + "update-package-sources", + "--no-ide", + "${workspaceFolder}" + ], + "console": "integratedTerminal", + "python": "${command:python.interpreterPath}", + "pythonArgs": [ + "-I", + "-B" + ] + }, + { + "name": "WAPT: -i build-upload", + "type": "python", + "request": "launch", + "justMyCode": false, + "program": "${config:python.wapt-get}", + "args": [ + "-i", + "--use-gui", + "build-upload", + "--no-ide", + "${workspaceFolder}" + ], + "console": "integratedTerminal", + "python": "${command:python.interpreterPath}", + "pythonArgs": [ + "-I", + "-B" + ] + }, + { + "name": "WAPT: build-package", + "type": "python", + "request": "launch", + "justMyCode": false, + "program": "${config:python.wapt-get}", + "args": [ + "build-package", + "--no-ide", + "${workspaceFolder}" + ], + "python": "${command:python.interpreterPath}", + "pythonArgs": [ + "-I", + "-B" + ] + }, + { + "name": "DEV: import setup.py", + "type": "python", + "request": "launch", + "justMyCode": false, + "program": "C:/Program Files (x86)/wapt/public/persistent/package-tools/package-template/launch_import_setup_template.py", + "console": "integratedTerminal", + "python": "${command:python.interpreterPath}", + "pythonArgs": [ + "-I", + "-B" + ] + }, + { + "name": "DEV: import update_package.py", + "type": "python", + "request": "launch", + "justMyCode": false, + "program": "C:/Program Files (x86)/wapt/public/persistent/package-tools/package-template/launch_import_update_template.py", + "console": "integratedTerminal", + "python": "${command:python.interpreterPath}", + "pythonArgs": [ + "-I", + "-B" + ] + }, + { + "name": "DEV: complete-package", + "type": "python", + "request": "launch", + "justMyCode": false, + "program": "C:/Program Files (x86)/wapt/public/persistent/package-tools/package-template/launch_complete_control.py", + "console": "integratedTerminal", + "python": "${command:python.interpreterPath}", + "pythonArgs": [ + "-I", + "-B" + ] + }, + { + "name": "DEV: translate-control", + "type": "python", + "request": "launch", + "justMyCode": false, + "program": "C:/Program Files (x86)/wapt/public/persistent/package-tools/package-template/launch_translate_control.py", + "console": "integratedTerminal", + "python": "${command:python.interpreterPath}", + "pythonArgs": [ + "-I", + "-B" + ] + }, + { + "name": "DEV: unify-control files", + "type": "python", + "request": "launch", + "justMyCode": false, + "program": "C:/Program Files (x86)/wapt/public/persistent/package-tools/package-template/launch_unify_control.py", + "console": "integratedTerminal", + "python": "${command:python.interpreterPath}", + "pythonArgs": [ + "-I", + "-B" + ] + }, + { + "name": "DEV: duplicate-os-package-code", + "type": "python", + "request": "launch", + "justMyCode": false, + "program": "C:/Program Files (x86)/wapt/public/persistent/package-tools/package-template/launch_duplicate_os_package_code.py", + "console": "integratedTerminal", + "python": "${command:python.interpreterPath}", + "pythonArgs": [ + "-I", + "-B" + ] + }, + { + "name": "DEV: duplicate update_package.py", + "type": "python", + "request": "launch", + "justMyCode": false, + "program": "C:/Program Files (x86)/wapt/public/persistent/package-tools/package-template/launch_duplicate_update_package.py", + "console": "integratedTerminal", + "python": "${command:python.interpreterPath}", + "pythonArgs": [ + "-I", + "-B" + ] + }, + { + "name": "DEV: change luti.json", + "type": "python", + "request": "launch", + "justMyCode": false, + "program": "C:/Program Files (x86)/wapt/public/persistent/package-tools/package-template/change_luti_json.py", + "console": "integratedTerminal", + "python": "${command:python.interpreterPath}", + "pythonArgs": [ + "-I", + "-B" + ] + }, + { + "name": "DEV: import .gitignore", + "type": "python", + "request": "launch", + "justMyCode": false, + "program": "C:/Program Files (x86)/wapt/public/persistent/package-tools/package-template/launch_import_gitignore.py", + "console": "integratedTerminal", + "python": "${command:python.interpreterPath}", + "pythonArgs": [ + "-I", + "-B" + ] + }, + { + "name": "DEV: quick testing", + "type": "python", + "request": "launch", + "justMyCode": false, + "program": "C:/Program Files (x86)/wapt/public/persistent/package-tools/package-template/launch_quick_testing.py", + "console": "integratedTerminal", + "python": "${command:python.interpreterPath}", + "pythonArgs": [ + "-I", + "-B" + ] + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..1b136ec --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,13 @@ +{ + "python.defaultInterpreterPath": "C:\\Program Files (x86)\\wapt\\waptpython.exe", + "python.pythonPath": "C:\\Program Files (x86)\\wapt\\waptpython.exe", + "python.wapt-get": "C:\\Program Files (x86)\\wapt\\wapt-get.py", + "python.formatting.provider": "black", + "python.formatting.blackArgs": + [ + "--line-length", + "150" + ], + "editor.insertSpaces": true, + "files.eol": "\n" +} \ No newline at end of file diff --git a/WAPT/certificate.crt b/WAPT/certificate.crt new file mode 100644 index 0000000..6fd2b31 --- /dev/null +++ b/WAPT/certificate.crt @@ -0,0 +1,20 @@ +-----BEGIN CERTIFICATE----- +MIIDNzCCAh+gAwIBAgIUSsaILn1scDCUhHvihORUTceVhO8wDQYJKoZIhvcNAQEL +BQAwJDELMAkGA1UEBhMCRlIxFTATBgNVBAMMDGdnZW5kcm9uX3BlbTAeFw0yMzEx +MDgwODM0MjhaFw0zMzExMDUwODM0MjhaMCQxCzAJBgNVBAYTAkZSMRUwEwYDVQQD +DAxnZ2VuZHJvbl9wZW0wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCj +Qt/K76QyhKl8ulRmnrCSRnD3UyHBmgAxSDml14sVxuyjVE+WW3umCqrJ2/QL2Sqy +DbxiBeexaaVSM15pKcsHQSGnCy762IjBhJIc9iW1QxNi1z/BivBVmAZRmM12IsKj +VeVs5oKpHjO5Uw2R+/MKkqg/9rNk3MQNA44YcFIz4RSfU5IElKU3CwzYFPwdRBSv +Sjf+onG4MkbEbL7B0axeMsKYZ2gxyuU9H73eUwWXgs2ICUu0wlyzKil1jJabKlEr +vREIvt+TL1hUFVLzbADgQPmZhCC2aylzdiYlwaKgNUmwEOip3JpZe0ay8XkIhH2O +H0i5RzPHD0FJae1Og9J7AgMBAAGjYTBfMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0O +BBYEFIJMVc1b++36XjWfjFhF+5AfxigaMA4GA1UdDwEB/wQEAwIB1jAdBgNVHSUE +FjAUBggrBgEFBQcDAgYIKwYBBQUHAwMwDQYJKoZIhvcNAQELBQADggEBAJkDZMAN +7aI3TPEXKAHWFBI25+CkV1OL+/NIhgdI3JVvu3rQ2iUcFS08+7rMa555OT3YjTFJ +4Cm0onhdXhVS0ENjvlfm2gWoD5t9SP9ZN4t1K19PDY6SCAqV79pYu2KfuHRXhmSZ +2p/tS1i01dkulJ49AKZNSp3BJ3xThL5oJHHOMgF5msRjZHBMRPsz3HgksaKzn3TE +fzyJ2/izHvTzllez7Ns90eVGPKMvZtZDSq+YpAhVSb6Fn46WVS2Z6Ce3GfRUiN6b +RJ4IQ6a+JhTgjJR6XJFQcmfDWFyzHjajd8OhbLuQjTIaiHyYcUNB9oZeyonMZ4ea +5MedsXgtUISHfhs= +-----END CERTIFICATE----- diff --git a/WAPT/control b/WAPT/control new file mode 100644 index 0000000..6f5a27c --- /dev/null +++ b/WAPT/control @@ -0,0 +1,44 @@ +package : comi-audit-freespace-template +version : 1.0-4 +architecture : all +section : base +priority : optional +name : Audit FreeSpace +categories : System and network +maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ +description : Audit FreeSpace +depends : +conflicts : +maturity : PROD +locale : all +target_os : all +min_wapt_version : 2.0 +sources : +installed_size : +impacted_process : +description_fr : +description_pl : +description_de : +description_es : +description_pt : +description_it : +description_nl : +description_ru : +audit_schedule : 24h +editor : +keywords : +licence : +homepage : +package_uuid : 94017ac5-23b8-4507-b73b-a0160c4bc170 +valid_from : +valid_until : +forced_install_on : +changelog : +min_os_version : +max_os_version : +icon_sha256sum : 0c223120ac1a6e4cd0d0abe04cd831c7d4a4c2661947e758c0f703b656933d9a +signer : ggendron_pem +signer_fingerprint: 244cdf15fa2ea3ead58e4abf232fdf9a30a8a28a798677f71d6a3e76e65f9003 +signature_date : 2024-01-31T14:49:22.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 : nTsjYl7qAomJuOMQnYgq74jjtRwbW7kvZ0O1lHWpzz8++/fnvCQuogike/jKeTeUb/vpJM8NWeOgJM9a3XFGRqb1O9JgPlqc6nYXCEv8NS85am3pLdBody0AkzhuZscQL3NRZKVQL/F8M+6i7zEHM+h4ANKlw1vvZ1JXDU2LPpBbA4Ca4WqLvpYt9CdoyxQ+s95iIzxDvb8TqlgJkVb1jmlZBy34GLoxW/yezHORCDdNOryApWKwpSun3lAHCuy97qPS4i7+x+3JqfTMoqLK9h/4DtH4I5GhY1hZSBmx06rSVgfWqUx8AL+dHDd+eYIfaGOwv5B7sY1IV3hYVMqpkA== \ No newline at end of file diff --git a/WAPT/icon.png b/WAPT/icon.png new file mode 100644 index 0000000..b834393 Binary files /dev/null and b/WAPT/icon.png differ diff --git a/WAPT/manifest.sha256 b/WAPT/manifest.sha256 new file mode 100644 index 0000000..4ee59e1 --- /dev/null +++ b/WAPT/manifest.sha256 @@ -0,0 +1 @@ +[[".env","720b2be3b2d977425b68892f478262e7d3f764ca56c86e4d6aa2f639ea3dd214"],[".vscode/launch.json","7185f7797616d2fefe06cdb959ccb08bf0f677287a21aacc3111a65d4f072584"],[".vscode/settings.json","c4ef3e7d26642471ae3a2faaa131a40791fda1542ede085de266c5144adb2a3c"],["WAPT/certificate.crt","68194bca04eef7aaf4dc3c3bd12b017a1263bb5fcc034919fc7edda0c62db266"],["WAPT/control","6db7ce53ee117173b3a99095819d524f54009a58c6ae0b8885df5eceebe56def"],["WAPT/icon.png","0c223120ac1a6e4cd0d0abe04cd831c7d4a4c2661947e758c0f703b656933d9a"],["WAPT/wapt.psproj","c6246be77fa0d87cb8860fc9de433dfc02b56edaaca368712d5b6267141eeee4"],["luti.json","b87e0aebd9b5bc3c009a98e4416e9bf9e83f1961419027c1cad02b2645f995dd"],["setup.py","aa04e8170a9780d10cbd5009d3367a6c5ca5146a17796d7a10bb22a9bfd42f1e"],["update_package.py","d53fbebc6ddbd12841df51c7805827dba99ac2a8455aec757433e8fd23692553"]] \ No newline at end of file diff --git a/WAPT/signature.sha256 b/WAPT/signature.sha256 new file mode 100644 index 0000000..4150e85 --- /dev/null +++ b/WAPT/signature.sha256 @@ -0,0 +1 @@ +b0WhNtQnQl3tiO3L1SdlPXvCFuyWyYa5Uobv8Tqufj+JbknsluqqQCPGAtP14cPBNS0pGBBdtQKeZkg5jDoi68QbZQU1UmeRqCHy4egYw93zrlT+XeRRrr07G+5Z+IB3pIyrXtCQH6ih2lBTQ+EcsF/lUdeiKmCBZxPXWIUFssbGEntPQNHIUp8qbvW0fazfJN7QmDDw9/i0+FOO9SwKzAZr0Kjy1efWV9QkZtI8+hzjkNRZI0tGqmPMfVcoKHB+1x8yq3De5o8s8TYum2cCSJHfAvIe+S2x0wxBoaC9Ynf/QZpJOwzsoEhjv57QlFRhKz8GTBqtYn3cZuGeRbA8dg== \ No newline at end of file diff --git a/WAPT/wapt.psproj b/WAPT/wapt.psproj new file mode 100644 index 0000000..31fd757 --- /dev/null +++ b/WAPT/wapt.psproj @@ -0,0 +1,235 @@ +[PyScripter] +Version=3.6.4.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:\Program Files (x86)\wapt\common.py + +[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1] +ClassName=TProjectFileNode +FileName=C:\Program Files (x86)\wapt\setuphelpers.py + +[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node2] +ClassName=TProjectFileNode +FileName=C:\Program Files (x86)\wapt\setuphelpers_linux.py + +[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3] +ClassName=TProjectFileNode +FileName=C:\Program Files (x86)\wapt\setuphelpers_macos.py + +[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node4] +ClassName=TProjectFileNode +FileName=C:\Program Files (x86)\wapt\setuphelpers_unix.py + +[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node5] +ClassName=TProjectFileNode +FileName=C:\Program Files (x86)\wapt\setuphelpers_windows.py + +[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node6] +ClassName=TProjectFileNode +FileName=C:\Program Files (x86)\wapt\wapt-get.ini + +[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node7] +ClassName=TProjectFileNode +FileName=C:\Program Files (x86)\wapt\wapt-get.py + +[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node8] +ClassName=TProjectFileNode +FileName=C:\Program Files (x86)\wapt\waptpackage.py + +[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes] +Count=9 + +[Project\ChildNodes\Node0\ChildNodes\Node1] +ClassName=TProjectFileNode +FileName=$[Project-Path]changelog.txt + +[Project\ChildNodes\Node0\ChildNodes\Node2] +ClassName=TProjectFileNode +FileName=$[Project-Path]control + +[Project\ChildNodes\Node0\ChildNodes\Node3] +ClassName=TProjectFileNode +FileName=$[Project-Path]..\setup.py + +[Project\ChildNodes\Node0\ChildNodes] +Count=4 + +[Project\ChildNodes\Node1] +ClassName=TProjectRunConfiguationsNode + +[Project\ChildNodes\Node1\ChildNodes\Node0] +ClassName=TProjectRunConfiguationNode +Name=WAPT: install + +[Project\ChildNodes\Node1\ChildNodes\Node0\RunConfig] +ScriptName=C:\Program Files (x86)\wapt\wapt-get.py +Description=Launch package installation. +EngineType=peRemote +ReinitializeBeforeRun=TRUE +Parameters=install "$[Project-Path].." +WorkingDir=$[Project-Path].. +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] + +[Project\ChildNodes\Node1\ChildNodes\Node1] +ClassName=TProjectRunConfiguationNode +Name=WAPT: remove + +[Project\ChildNodes\Node1\ChildNodes\Node1\RunConfig] +ScriptName=C:\Program Files (x86)\wapt\wapt-get.py +Description=Launch uninstallation (the uninstallation code found in local wapt database, remember to launch after an installation). +EngineType=peRemote +ReinitializeBeforeRun=TRUE +Parameters=remove "$[Project-Path].." +WorkingDir=$[Project-Path].. +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] + +[Project\ChildNodes\Node1\ChildNodes\Node2] +ClassName=TProjectRunConfiguationNode +Name=WAPT: uninstall + +[Project\ChildNodes\Node1\ChildNodes\Node2\RunConfig] +ScriptName=C:\Program Files (x86)\wapt\wapt-get.py +Description=Launch uninstallation code (for debugging purpose, it only runs the code of uninstall function). +EngineType=peRemote +ReinitializeBeforeRun=TRUE +Parameters=uninstall "$[Project-Path].." +WorkingDir=$[Project-Path].. +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=$[Project-Path].. + +[Project\ChildNodes\Node1\ChildNodes\Node3] +ClassName=TProjectRunConfiguationNode +Name=WAPT: session-setup + +[Project\ChildNodes\Node1\ChildNodes\Node3\RunConfig] +ScriptName=C:\Program Files (x86)\wapt\wapt-get.py +Description=Launch session-setup (it runs directly as current user). +EngineType=peRemote +ReinitializeBeforeRun=TRUE +Parameters=session-setup "$[Project-Path].." +WorkingDir=$[Project-Path].. +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] + +[Project\ChildNodes\Node1\ChildNodes\Node4] +ClassName=TProjectRunConfiguationNode +Name=WAPT: audit + +[Project\ChildNodes\Node1\ChildNodes\Node4\RunConfig] +ScriptName=C:\Program Files (x86)\wapt\wapt-get.py +Description=Launch package audit. +EngineType=peRemote +ReinitializeBeforeRun=TRUE +Parameters=audit -f "$[Project-Path].." +WorkingDir=$[Project-Path].. +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] + +[Project\ChildNodes\Node1\ChildNodes\Node5] +ClassName=TProjectRunConfiguationNode +Name=WAPT: update-package + +[Project\ChildNodes\Node1\ChildNodes\Node5\RunConfig] +ScriptName=C:\Program Files (x86)\wapt\wapt-get.py +Description=Launch update_package (it usually serve to update binaries of the package). +EngineType=peRemote +ReinitializeBeforeRun=TRUE +Parameters=update-package-sources "$[Project-Path].." +WorkingDir=$[Project-Path].. +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] + +[Project\ChildNodes\Node1\ChildNodes\Node6] +ClassName=TProjectRunConfiguationNode +Name=WAPT: -i build-upload + +[Project\ChildNodes\Node1\ChildNodes\Node6\RunConfig] +ScriptName=C:\Program Files (x86)\wapt\wapt-get.py +Description=Build and upload package to the waptserver. +EngineType=peRemote +ReinitializeBeforeRun=TRUE +Parameters=--use-gui -i build-upload "$[Project-Path].." +WorkingDir=$[Project-Path].. +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] + +[Project\ChildNodes\Node1\ChildNodes] +Count=7 + +[Project\ChildNodes] +Count=2 + +[Project\ExtraPythonPath] +Count=0 + diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..e56ef4a --- /dev/null +++ b/setup.py @@ -0,0 +1,149 @@ +# -*- coding: utf-8 -*- +from setuphelpers import * +import winreg + +def install(): + + #CIS-15500 - Password History + run("net accounts /uniquepw:24") + #CIS-15501 - Maximum password Age + run("net accounts /MAXPWAGE:90") + #CIS-15502 - Minimum password Age + run("net accounts /minpwage:1") + #CIS-15503 - Minimum password Lenght + run("net accounts /MINPWLEN:14") + #CIS-15505 - Relax minimum password length limits + registry_set(HKEY_LOCAL_MACHINE, r"System\CurrentControlSet\Control\SAM", "RelaxMinimumPasswordLengthLimits","1") + #CIS-15506 - Account lockout duration + run("net accounts /lockoutduration:15") + #CIS-15507 - Account lockout Threshold + run("net accounts /lockoutthreshold:5") + #CIS-15508 - Reset lockout counter after + run("net accounts /lockoutwindow:15") + #CIS-15509 - Administrator account status disabled (fr) + run("net user administrateur /active:no") + #CIS-15510 - 'Accounts: Block Microsoft accounts' is set to 'Users can't add or log on with Microsoft accounts'. + registry_set(HKEY_LOCAL_MACHINE, r"Software\Microsoft\Windows\CurrentVersion\Policies\System", "NoConnectedUser","3") + #CIS-15511 - Guest account status disabled (fr) + #run("net user Invité /active no") + #CIS-15512 - Accounts: Limit local account use of blank passwords to console logon only' + registry_set(HKEY_LOCAL_MACHINE, r"System\CurrentControlSet\Control\Lsa", "LimitBlankPasswordUse","1") + #CIS-15513 - Accounts: Rename Administrator Account' (fr) + run("wmic useraccount where name='Administrateur' rename 'comi-adm'") + #CIS-15514 - Accounts: Rename Guest Account' (fr) + run("wmic useraccount where name='Invité' rename 'comiguest'") + #CIS-15515 - Audit: Force audit policy subcategory settings (Windows Vista or later) to override audit policy category settings + registry_set(HKEY_LOCAL_MACHINE, r"System\CurrentControlSet\Control\Lsa", "SCENoApplyLegacyAuditPolicy","1") + #CIS-15516 - Audit: Shut down system immediately if unable to log security audits + registry_set(HKEY_LOCAL_MACHINE, r"System\CurrentControlSet\Control\Lsa", "CrashOnAuditFail","0") + #CIS-15517 - Devices: Allowed to format and eject removable media' is set to 'Administrators and Interactive Users' + registry_set(HKEY_LOCAL_MACHINE, r"Software\Microsoft\Windows NT\CurrentVersion\Winlogon", "AllocateDASD","2") + #CIS-15518 - 'Devices: Prevent users from installing printer drivers' is set to 'Enabled'. + registry_set(HKEY_LOCAL_MACHINE, r"System\CurrentControlSet\Control\Print\Providers\LanMan Print Services\Servers", "AddPrinterDrivers","1") + #CIS-15519 - 'Domain member: Digitally encrypt or sign secure channel data (always)' is set to 'Enabled'. + registry_set(HKEY_LOCAL_MACHINE, r"System\CurrentControlSet\Services\Netlogon\Parameters", "RequireSignOrSeal","1") + #CIS-15520 - 'Domain member: Digitally encrypt secure channel data (when possible)' is set to 'Enabled'. + #CIS-15521 - 'Domain member: Digitally sign secure channel data (when possible)' is set to 'Enabled'. + registry_set(HKEY_LOCAL_MACHINE, r"System\CurrentControlSet\Services\Netlogon\Parameters", "SealSecureChannel","1") + #CIS-15522 - 'Domain member: Disable machine account password changes' is set to 'Disabled'. + registry_set(HKEY_LOCAL_MACHINE, r"System\CurrentControlSet\Services\Netlogon\Parameters", "DisablePasswordChange","0") + #CIS-15523 - 'Domain member: Maximum machine account password age' is set to '30 or fewer days, but not 0'. + registry_set(HKEY_LOCAL_MACHINE, r"System\CurrentControlSet\Services\Netlogon\Parameters", "MaximumPasswordAge","30") + #CIS-15524 - 'Domain member: Require strong (Windows 2000 or later) session key' is set to 'Enabled'. + registry_set(HKEY_LOCAL_MACHINE, r"System\CurrentControlSet\Services\Netlogon\Parameters", "RequireStrongKey","1") + #CIS-15525 - 'Interactive logon: Do not require CTRL+ALT+DEL' is set to 'Disabled'. + registry_set(HKEY_LOCAL_MACHINE, r"Software\Microsoft\Windows\CurrentVersion\Policies\System", "DisableCAD","0") + #CIS-15526 - 'Interactive logon: Don't display last signed-in' is set to 'Enabled'. + registry_set(HKEY_LOCAL_MACHINE, r"Software\Microsoft\Windows\CurrentVersion\Policies\System", "DontDisplayLastUserName","1") + #CIS-15527 - 'Interactive logon: Machine account lockout threshold' is set to '10 or fewer invalid logon attempts, but not 0'. + registry_set(HKEY_LOCAL_MACHINE, r"Software\Microsoft\Windows\CurrentVersion\Policies\System", "MaxDevicePasswordFailedAttempts","10") + #CIS-15529 - 'Interactive logon: Message text for users attempting to log on'. + registry_set(HKEY_LOCAL_MACHINE, r"Software\Microsoft\Windows\CurrentVersion\Policies\System", "LegalNoticeText","Bienvenue sur un poste COMITARI, Toute personne non autorisé à se connecter à la machine sera poursuivi.",REG_SZ) + #CIS-15530 - 'Interactive logon: Message title for users attempting to log on'. + registry_set(HKEY_LOCAL_MACHINE, r"Software\Microsoft\Windows\CurrentVersion\Policies\System", "LegalNoticeCaption","Bienvenue sur un poste COMITARI") + #CIS-15531 - 'Interactive logon: Number of previous logons to cache (in case domain controller is not available)' is set to '4''. + registry_set(HKEY_LOCAL_MACHINE, r"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "CachedLogonsCount","4") + #CIS-15532 - 'Interactive logon: Prompt user to change password before expiration' is set to 'between 5 and 14 days'. + registry_set(HKEY_LOCAL_MACHINE, r"Software\Microsoft\Windows NT\CurrentVersion\Winlogon", "PasswordExpiryWarning","10") + #CIS-15533 - 'Interactive logon: Smart card removal behavior' is set to 'Lock Workstation' or higher. + registry_set(HKEY_LOCAL_MACHINE, r"Software\Microsoft\Windows NT\CurrentVersion\Winlogon", "SCRemoveOption","2") + #CIS-15534 - 'Microsoft network client: Digitally sign communications (always)' is set to 'Enabled'. + registry_set(HKEY_LOCAL_MACHINE, r"System\CurrentControlSet\Services\LanmanWorkstation\Parameters", "RequireSecuritySignature","2") + #CIS-15535 - 'Microsoft network client: Digitally sign communications (if server agrees)' is set to 'Enabled'. + registry_set(HKEY_LOCAL_MACHINE, r"System\CurrentControlSet\Services\LanmanWorkstation\Parameters", "EnableSecuritySignature","1") + #CIS-15536 - 'Microsoft network client: Send unencrypted password to third-party SMB servers' is set to 'Disabled'. + registry_set(HKEY_LOCAL_MACHINE, r"System\CurrentControlSet\Services\LanmanWorkstation\Parameters", "EnablePlainTextPassword","0") + #CIS-15537 - Ensure 'Microsoft network server: Amount of idle time required before suspending session' is set to '15 or fewer minute(s)'. + registry_set(HKEY_LOCAL_MACHINE, r"System\CurrentControlSet\Services\LanmanWorkstation\Parameters", "AutoDisconnect","15") + #CIS-15538 - 'Microsoft network server: Digitally sign communications (always)' is set to 'Enabled'. + registry_set(HKEY_LOCAL_MACHINE, r"System\CurrentControlSet\Services\LanmanWorkstation\Parameters", "RequireSecuritySignature","1") + #CIS-15539 - 'Microsoft network server: Digitally sign communications (if client agrees)' is set to 'Enabled'. + registry_set(HKEY_LOCAL_MACHINE, r"System\CurrentControlSet\Services\LanmanWorkstation\Parameters", "EnableSecuritySignature","1") + #CIS-15540 - Ensure 'Microsoft network server: Disconnect clients when logon hours expire' is set to 'Enabled'. + registry_set(HKEY_LOCAL_MACHINE, r"System\CurrentControlSet\Services\LanmanWorkstation\Parameters", "EnableForcedLogOff","1") + #CIS-15541 - Ensure 'Microsoft network server: Server SPN target name validation level' is set to 'Accept if provided by client' or higher. + registry_set(HKEY_LOCAL_MACHINE, r"System\CurrentControlSet\Services\LanmanWorkstation\Parameters", "SMBServerNameHardeningLevel","1") + #CIS-15542 - Ensure 'Network access: Allow anonymous SID/Name translation' is set to 'Disabled'. + #run("") + #CIS-15543 - Ensure 'Network access: Do not allow anonymous enumeration of SAM accounts' is set to 'Enabled'. + registry_set(HKEY_LOCAL_MACHINE, r"SYSTEM\CurrentControlSet\Control\Lsa", "RestrictAnonymousSAM","1") + #CIS-15544 - Ensure 'Network access: Do not allow anonymous enumeration of SAM accounts and shares' is set to 'Enabled'. + registry_set(HKEY_LOCAL_MACHINE, r"SYSTEM\CurrentControlSet\Control\Lsa", "RestrictAnonymous","1") + #CIS-15545 - Ensure 'Network access: Do not allow storage of passwords and credentials for network authentication' is set to 'Enabled'. + registry_set(HKEY_LOCAL_MACHINE, r"SYSTEM\CurrentControlSet\Control\Lsa", "DisableDomainCreds","1") + #CIS-15546 - Ensure 'Network access: Let Everyone permissions apply to anonymous users' is set to 'Disabled'. + registry_set(HKEY_LOCAL_MACHINE, r"SYSTEM\CurrentControlSet\Control\Lsa", "EveryoneIncludesAnonymous","0") + #CIS-15547 - Ensure 'Network access: Named Pipes that can be accessed anonymously' is set to 'None'. + #run("") + #CIS-15548 - Ensure 'Network access: Remotely accessible registry paths' is configured. + # registry_set(HKEY_LOCAL_MACHINE, r"System\CurrentControlSet\Control\SecurePipeServers\Winreg\AllowedExactPaths", "Machine","System\\CurrentControlSet\\Control\\ProductOptions System\\CurrentControlSet\\Control\\Server Applications Software\\Microsoft\\Windows NT\\CurrentVersion") + #CIS-15549 - Ensure 'Network access: Remotely accessible registry paths and sub-paths' is configured. + #run("") + #CIS-15550 - Ensure 'Network access: Restrict anonymous access to Named Pipes and Shares' is set to 'Enabled'. + registry_set(HKEY_LOCAL_MACHINE, r"System\CurrentControlSet\Services\LanManServer\Parameters", "RestrictNullSessAccess","1") + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +