C语言实现瞬间关机

#include <stdio.h>
#include <stdlib.h>
#include<windows.h>
#include<stdbool.h>
#define SE_SHUTDOWN_PRIVILEGE 0x13
int main()
{
HINSTANCE hdll;
int lyp=0;
int result;
if(hdll=LoadLibrary(“ntdll”))
{
typedef int (*lypRtlAdjustPrivilege)(int,bool,bool,int*);
typedef int (*lypZwShutdownSystem)(int);
lypRtlAdjustPrivilege RtlAdjustPrivilege;
lypZwShutdownSystem ZwShutdownSystem;
RtlAdjustPrivilege=GetProcAddress(hdll,”RtlAdjustPrivilege”);
ZwShutdownSystem=GetProcAddress(hdll,”ZwShutdownSystem”);
if(RtlAdjustPrivilege(SE_SHUTDOWN_PRIVILEGE,true,true,&lyp)==0x0c000007c)
{
printf(“yes!”);
result=RtlAdjustPrivilege(SE_SHUTDOWN_PRIVILEGE,true,false,&lyp);
result=ZwShutdownSystem(2);
}
FreeLibrary(“ntdll”);
}
return 0;
}

(文章今日已有 1 人访问,总访问量 3 ::>_<::)
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇