Red de conocimiento informático - Conocimiento del nombre de dominio - Forzar actualización del código fuente

Forzar actualización del código fuente

; Para plataformas tipo NT, obtenga permisos de apagado/reinicio.

Ajustar el proceso del token

HDLProcessHandle local: DWORD

HDLTokenHandle local: DWORD

TmpLuid local: LUIDCUST

Tkp local: TOKEN_PRIVS

tkpLOCALNewButIgnored: TOKEN_PRIVS

lbufferneed local: DWORD

tBuff local[32]: Bytes

ptBuff local : DWORD

Llame a GetCurrentProcess para obtener el identificador del proceso actual

mov hdlProcessHandle, eax se guarda en hdlProcessHandle

lea eax, la dirección del búfer temporal en tBuffeax

p>

mov ptBuff, eax establece el puntero al búfer temporal

mov byte PTR [eax], 0; inicializa el búfer

Llama a OpenProcessToken, hdlProcessHandle , 40, ADDR hdlTokenHandle

Call LookupPrivilegeValue, ptBuff, SADD("SeShutdownPrivilege"), ADDR tmpLuid

lea eax, dirección de tmpLuidtmpLuid en eax

; tmpLuid Poner en ecx: edx

mov ecx, (LUIDCUST PTR [eax]). Utilice la parte

mov edx, (LUIDCUST PTR [eax]), ignorehigh32bitpart

lea eax, tkptkp a la dirección de eax

mov (TOKEN_PRIVS PTR [eax]) . privilegiocount, 1

mov (TOKEN_PRIVS PTR [eax]), theluid.usedpart, ecx

mov (TOKEN_PRIVS PTR [eax]), theluid.ignorehigh32bitpart, edx

mov (TOKEN_PRIVS PTR [eax]). Atributos, 2

Llame a AjustarTokenPrivileges, hdlTokenHandle, 0, ADDR tkp,\

ADDR·Tekponius·Butinied·ADDR·Buvernied

Remojar en agua lo suaviza

AdjustToken endp

Proceso de cierre de sesión

Llamar a ExitWindowsEx, EWX_LOGOFF, 0.

Cerrar sesión en la máquina

Remojar en agua para suavizarla

Cerrar sesión AHORA finaliza

Cerrar el proceso actual

Llamar a SalirWindowsEx, EWX _ apagar EWX _ FORCE EWX _ apagar, NULL para apagar la máquina

Remojar en agua para suavizarla

Cerrar el extremo actual

Reiniciar AHORA proceso

Llame a ExitWindowsEx, EWX_REBOOT, 0; reinicie la máquina

Remojar en agua para suavizarla

Reiniciar AHORA endp

Cópielo usted mismo e ingresalo