Skip to content

Commit

Permalink
New MAIN function, fix Secure function, new Exit Method
Browse files Browse the repository at this point in the history
  • Loading branch information
VittoriaAlata committed Aug 24, 2024
1 parent 9d5a885 commit c00d498
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 58 deletions.
Binary file added .SYSCOM.PS1.swm
Binary file not shown.
Binary file added .SYSCOM.PS1.swn
Binary file not shown.
90 changes: 38 additions & 52 deletions SYSCOM.PS1
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@
$isAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')

if (-not $isAdmin) {
$proc = Start-Process pwsh.exe -ArgumentList "-ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs -PassThru
$proc.WaitForExit()
Add-Type -AssemblyName PresentationFramework
[System.Windows.MessageBox]::Show("Per alcuni comandi è preferibile avere privilegi di amministratore.", "Avviso", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Information)
}

# Il resto del tuo script va qui


# Definisce una funzione per cambiare il titolo della finestra della console
function Set-ConsoleTitle {
param (
Expand Down Expand Up @@ -66,15 +62,9 @@ function DSK_SO {
Write-Host "┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛"
$MDeSO = Read-Host " "
switch ($MDeSO) {
"0" {
.\SYSCOM.PS1
}
"" {
.\SYSCOM.PS1
}
"q" {
.\SYSCOM.PS1
}
"0" {MAIN}
"" {MAIN}
"q" {MAIN}
"1" {
SO
}
Expand Down Expand Up @@ -550,10 +540,8 @@ function GestioneReteApplicazioni {
Get-Content ".\SYSCOM\Banners\RETEAPP"
Write-Host "┃ ┃"
Write-Host "┃ ┃"
Write-Host "┃NUM. COMANDO (DESCRIZIONE COMANDO) ┃"
Write-Host "┃NUM. COMANDO (DESCRIZIONE COMANDO) ┃"
Write-Host "┃━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ┃"
# Write-Host "3. taskmgr.exe (Gestione attività)"
# Write-Host "4. msconfig.exe (Config. di sistema)"
Write-Host "┃1. App (Strumenti per pachetti e programmi) ┃"
Write-Host "┃2. NET (Strumenti per il network e dischi di rete) ┃"
Write-Host "┃3. Copilot (Strumenti Copilot) ┃"
Expand All @@ -564,12 +552,8 @@ function GestioneReteApplicazioni {

$GRA = Read-Host " "
switch ($GRA) {
"0" {
.\SYSCOM.PS1
}
"" {
.\SYSCOM.PS1
}
"0" {MAIN}
"" {MAIN}
"1" {
App
}
Expand All @@ -579,16 +563,6 @@ function GestioneReteApplicazioni {
"3" {
COPILOT
}
# "3" {
# Invoke-Expression "$env:windir\System32\taskmgr.exe"
# Start-Sleep -Seconds 1
# GestioneReteApplicazioni
# }
# "4" {
# Invoke-Expression "$env:windir\System32\msconfig.exe"
# Start-Sleep -Seconds 1
# GestioneReteApplicazioni
# }
Default {
Write-Host "━━━━━━━━━━━━━━━━━━INSERISCI━UN━OPERAZIONE━VALIDA━━━━━━━━━━━━━━━━━" -ForegroundColor Red
}
Expand Down Expand Up @@ -901,29 +875,24 @@ function SicurezzaProtezione {
Get-Content ".\SYSCOM\Banners\SECURE"
Write-Host "┃ ┃"
Write-Host "┃ ┃"
Write-Host "┃NUM. COMANDO (DESCRIZIONE COMANDO)"
Write-Host "┃━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
Write-Host "┃1. wscui.cpl (Sicurezza e manutenzione)"
Write-Host "2. sigverif.exe (Verifica firma file)"
Write-Host "3. MRT.exe (Strumento di rimozione malware Microsoft Windows)"
Write-Host "4. Backup (Strumentti di Backup"
Write-Host "5. Imp. di Criptaggio (Impostazioni di crittografia del dispositivo)"
Write-Host "6. Microsoft Defender (Strumenti Microsoft Defender)"
Write-Host "7. Punti di Ripristino (Strumenti Punti di Ripristino)"
Write-Host "┃NUM. COMANDO (DESCRIZIONE COMANDO) "
Write-Host "┃━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ "
Write-Host "┃1. wscui.cpl (Sicurezza e manutenzione)"
Write-Host "2. sigverif.exe (Verifica firma file)"
Write-Host "3. MRT.exe (Rimozione malware Microsoft Windows)"
Write-Host "4. Backup (Strumentti di Backup"
Write-Host "5. Imp. di Criptaggio (Crittografia del dispositivo)"
Write-Host "6. Microsoft Defender (Strumenti Microsoft Defender)"
Write-Host "7. Punti di Ripristino (Strumenti Punti di Ripristino)"
Write-Host "┃ ┃"
Write-Host "┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫"
Write-Host "┃ Inserisci il numero per l'operazione ┃"
Write-Host "┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛"
Write-Host ""
$SeP = Read-Host " "

switch ($SeP) {
"0" {
.\SYSCOM.PS1
}
"" {
.\SYSCOM.PS1
}
"0" {MAIN}
"" {MAIN}
"1" {
Invoke-Expression "$env:windir\System32\wscui.cpl"
Start-Sleep -Seconds 1
Expand Down Expand Up @@ -965,6 +934,21 @@ function SicurezzaProtezione {
}
}

function Sicurezza {
Clear-Host
Get-Content ""
Write-Host "msconfig.exe (configurazione di sistema)"
$S=Read-Host"Inserisci il numero dell'operazione"
switch ($S) {
"1" {
Invoke-Expression "$env:windir\System32\msconfig.exe"
Start-Sleep -Seconds 1
GestioneReteApplicazioni
}

}
}

function BU {
Clear-Host
Get-Content ".\SYSCOM\Banners\BU"
Expand Down Expand Up @@ -1387,7 +1371,7 @@ function SITO {
Write-Host "┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛"
}

do {
function MAIN {
Clear-Host
Write-Host ""
Write-Host "┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓"
Expand Down Expand Up @@ -1462,7 +1446,9 @@ do {
}

$null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")

}
do {
MAIN
} while ($true)
# SIG # Begin signature block
# MIIJDAYJKoZIhvcNAQcCoIII/TCCCPkCAQExDzANBglghkgBZQMEAgEFADB5Bgor
Expand Down
11 changes: 5 additions & 6 deletions SYSCOM/Banners/SECURE
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
 ______ ______ ______ __ __ ______ ______
/\ ___\ /\ ___\ /\ ___\ /\ \/\ \ /\ == \ /\ ___\
\ \___ \ \ \ __\ \ \ \____ \ \ \_\ \ \ \ __< \ \ __\
\/\_____\ \ \_____\ \ \_____\ \ \_____\ \ \_\ \_\ \ \_____\
\/_____/ \/_____/ \/_____/ \/_____/ \/_/ /_/ \/_____/

┃ ______ ______ ______ __ __ ______ ______ ┃
┃/\ ___\ /\ ___\ /\ ___\ /\ \/\ \ /\ == \ /\ ___\ ┃
┃\ \___ \ \ \ __\ \ \ \____ \ \ \_\ \ \ \ __< \ \ __\ ┃
┃ \/\_____\ \ \_____\ \ \_____\ \ \_____\ \ \_\ \_\ \ \_____\┃
┃ \/_____/ \/_____/ \/_____/ \/_____/ \/_/ /_/ \/_____/┃

0 comments on commit c00d498

Please sign in to comment.