Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function fn_kerdez {
- param(
- $Message = "ISMERETLEN SZAKASZ"
- )
- [string[]]$Choices = @("&Igen","&Nem")
- $ListChoices = @()
- foreach ($Choice in $Choices) {
- $ListChoices += [System.Management.Automation.Host.ChoiceDescription]$Choice
- }
- $Results = $Host.ui.PromptForChoice("Megerősítés", $Message, $ListChoices, 0)
- return ($Choices[$Results] -match "Igen")
- }
- if (fn_kerdez "Létrehozzuk a fájlokat?") {
- New-Item c:\windows\perfc -type file
- New-Item c:\windows\perfc.dll -type file
- New-Item c:\windows\perfc.dat -type file
- Set-ItemProperty c:\windows\perfc -name IsReadOnly -value $true
- Set-ItemProperty c:\windows\perfc.dll -name IsReadOnly -value $true
- Set-ItemProperty c:\windows\perfc.dat -name IsReadOnly -value $true
- }
- if (fn_kerdez "Módosítsuk a hosts fájlt?") {
- $file = "$env:windir\System32\drivers\etc\hosts"
- "0.0.0.0 french-cooking.com" | Add-Content -PassThru $file
- "0.0.0.0 benkow.cc" | Add-Content -PassThru $file
- "0.0.0.0 185.165.29.78" | Add-Content -PassThru $file
- "0.0.0.0 upd.me-doc.com.ua" | Add-Content -PassThru $file
- "0.0.0.0 95.141.115.108" | Add-Content -PassThru $file
- "0.0.0.0 111.90.139.247" | Add-Content -PassThru $file
- "0.0.0.0 84.200.16.242" | Add-Content -PassThru $file
- "0.0.0.0 yadi.sk" | Add-Content -PassThru $file
- }
- if (fn_kerdez "Kikapcsoljuk az SMBv1 protocolt?") {
- dism /online /Disable-Feature /FeatureName:SMB1Protocol
- Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB1 -Type DWORD -Value 0 -Force
- Set-SmbServerConfiguration -EnableSMB1Protocol $false
- sc.exe config lanmanworkstation depend= bowser/mrxsmb20/nsi
- sc.exe config mrxsmb10 start= disabled
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement