Advertisement
Dr_G

Petya_block

Jun 29th, 2017
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Function fn_kerdez {
  2.     param(
  3.         $Message = "ISMERETLEN SZAKASZ"
  4.     )
  5.     [string[]]$Choices = @("&Igen","&Nem")
  6.     $ListChoices = @()
  7.     foreach ($Choice in $Choices) {
  8.         $ListChoices += [System.Management.Automation.Host.ChoiceDescription]$Choice
  9.     }
  10.     $Results = $Host.ui.PromptForChoice("Megerősítés", $Message, $ListChoices, 0)
  11.     return ($Choices[$Results] -match "Igen")
  12. }
  13.  
  14. if (fn_kerdez "Létrehozzuk a fájlokat?") {
  15.     New-Item c:\windows\perfc -type file
  16.     New-Item c:\windows\perfc.dll -type file
  17.     New-Item c:\windows\perfc.dat -type file
  18.     Set-ItemProperty c:\windows\perfc -name IsReadOnly -value $true
  19.     Set-ItemProperty c:\windows\perfc.dll -name IsReadOnly -value $true
  20.     Set-ItemProperty c:\windows\perfc.dat -name IsReadOnly -value $true
  21. }
  22.  
  23. if (fn_kerdez "Módosí­tsuk a hosts fájlt?") {
  24.     $file = "$env:windir\System32\drivers\etc\hosts"
  25.     "0.0.0.0 french-cooking.com" | Add-Content -PassThru $file
  26.     "0.0.0.0 benkow.cc" | Add-Content -PassThru $file
  27.     "0.0.0.0 185.165.29.78" | Add-Content -PassThru $file
  28.     "0.0.0.0 upd.me-doc.com.ua" | Add-Content -PassThru $file
  29.     "0.0.0.0 95.141.115.108" | Add-Content -PassThru $file
  30.     "0.0.0.0 111.90.139.247" | Add-Content -PassThru $file
  31.     "0.0.0.0 84.200.16.242" | Add-Content -PassThru $file
  32.     "0.0.0.0 yadi.sk" | Add-Content -PassThru $file
  33. }
  34.  
  35. if (fn_kerdez "Kikapcsoljuk az SMBv1 protocolt?") {
  36.     dism /online /Disable-Feature /FeatureName:SMB1Protocol
  37.     Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB1 -Type DWORD -Value 0 -Force
  38.     Set-SmbServerConfiguration -EnableSMB1Protocol $false
  39.     sc.exe config lanmanworkstation depend= bowser/mrxsmb20/nsi
  40.     sc.exe config mrxsmb10 start= disabled
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement