| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2966 人关注过本帖
标题:[原创]一个考验你IQ的密码破译游戏,挑战你的逻辑能力
只看楼主 加入收藏
chengstone
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
帖 子:562
专家分:226
注 册:2004-4-3
收藏
得分:0 
void Select(int i) { switch(i) { case 0:Stage("1",0,"{ipgsqi","22-4-11-2-14-12-4",NULL,0);break; /* 四个参数 stageID(关数),helpID(帮助代号),code(密码),condition(条件或暗示)*/ case 1:Stage("2",-1,"57=85;78954","RJFI:QRRTSMKGNDCG",NULL,0);break; /* -1 数字 0 字母 1 数字+字母 */ case 2:Stage("3",0,"he$zmrgm","WZ ERMXR",NULL,0);break; case 3:Stage("4",0,"]yrQmrk","3111556","http://shada.w11.51web.cn/bbs/dispbbs.asp?boardID=18&ID=5646",0);break; case 4:Stage("5",0,"HMJSLXYTSJ","112,110,100,99 100 116,120 22 115,111,118",NULL,1);break; case 5:Stage("6",0,"glirkwxsri","DIFOHTUPOF",NULL,0);break; case 6:Stage("7",-1,"87778;4<","69-68-68-68-69-72-65-73",NULL,0);break; case 7:Stage("8",0,"gsrkvexypexmsrw","ann,a tutor's logic",NULL,0);break; case 8:Congratulation();break; /*这里用樱花大战的音乐 开头是麻利医生的音乐 */ } } void Escape() { int key,n=0; KillTimer(); settextstyle(0,0,3); if(codeshow)CodeCut(); setfillstyle(1,BLUE); bar(150,280,500,380); setcolor(RED); rectangle(150,280,500,380); setcolor(YELLOW); outtextxy(170,300,"GO> Save Game"); outtextxy(170,350," Exit Game"); while((key=bioskey(0))!=ENTER) { switch(key) { case UP:if(n) { n=0; bar(170,350,240,370); outtextxy(170,300,"GO>"); SoundKey(); } else SoundErr(); break; case DOWN:if(!n) { n=1; bar(170,300,240,320); outtextxy(170,350,"GO>"); SoundKey(); } else SoundErr(); break; case ESC:CodeCut(); settextstyle(0,0,1); setfillstyle(0,0);goto jump;break; default:SoundErr();break; } } settextstyle(0,0,1); setfillstyle(0,0); if(n)sign=0; else { n=Save(); bar(150,280,500,380); setcolor(RED); rectangle(240,280,320,330); setcolor(YELLOW); if(n)outtextxy(250,300,"SAVE OK"); else outtextxy(250,300,"SAVE FAIL"); delay(60000); bar(150,280,500,380); } jump: SetTimer(NewTimer); } void Display() { float str[47][2]={{0,0},{HA,60000},{HA,60000},{HA,60000}, {HB,60000},{C,30000},{D,30000},{D,30000},{D,30000}, {D,30000},{D,30000},{C,15000},{C,15000},{C,60000}, {D,15000},{E,15000},{D,60000},{E,30000},{HA,30000}, {HG,30000},{HE,30000},{HD,30000},{HE,30000},{HE,15000}, {HE,30000},{HE,60000},{HE,60000},{HG,30000},{HF,30000}, {HG,60000},{C,30000},{HA,30000},{HA,15000},{HA,30000}, {HA,60000},{HA,60000},{HE,30000},{HG,30000},{HA,15000}, {HB,15000},{C,30000},{C,60000},{C,60000},{HB,30000}, {C,30000},{HE,15000},{HE,30000}}; int i,m=46; cleardevice(); setcolor(RED); settextstyle(0,0,8); outtextxy(80,60,"CRACK"); outtextxy(350,180,"GAME"); setcolor(WHITE); settextstyle(0,0,1); outtextxy(70,340,"Tel:13941734510"); outtextxy(220,340,"E-mail:chengstone@21cn.com"); outtextxy(460,340,"QQ:43334708"); randomize(); while(!bioskey(1)) { setcolor(rand()%15+1); outtextxy(280,280,"Enter"); sound(str[m][0]);delay(str[m--][1]);nosound(); if(!m)m=46; setcolor(0); for(i=0;i<10;i++)line(300,240+i,340,240+i); sound(str[m][0]);delay(str[m--][1]);nosound(); if(!m)m=46; } getch(); } void Start() { int key=-1,n; cleardevice(); setcolor(6); settextstyle(0,0,2); outtextxy(170,130,"GO> New Game"); outtextxy(170,175," Load Game"); outtextxy(170,225," Exit Game"); setfillstyle(0,0); while((n=bioskey(0))!=ENTER) { switch(n) { case UP:if(key>-1) { if(key) { bar(170,225,170+50,250+20); outtextxy(170,175,"GO>"); } else { bar(170,175,170+50,175+20); outtextxy(170,130,"GO>"); } key--; SoundKey(); } else SoundErr(); break; case DOWN:if(key<1) { if(key) { bar(170,130,170+50,130+20); outtextxy(170,175,"GO>"); } else { bar(170,175,170+50,175+20); outtextxy(170,225,"GO>"); } key++; SoundKey(); } else SoundErr(); break; case ESC:if(key<1) { if(key)bar(170,130,170+50,130+20); else bar(170,175,170+50,175+20); outtextxy(170,225,"GO>"); key=1; SoundKey(); } else SoundErr(); break; default:SoundErr();break; } } settextstyle(0,0,1); if(key==1)sign=-1; else if(key==0)Load(); } Stage(char *stageID,int helpID,char *code,char *condition,char *other,int end) { int time=60,x=110,y=220,i=0,ON=0; char buff[16]={0},word[2]; word[1]='\0'; TimerCounter=0; cleardevice(); PutStage(stageID); setcolor(YELLOW); settextstyle(0,0,1); if(!end)outtextxy(230,150,condition); else outtextxy(150,150,condition); setcolor(RED); outtextxy(250,210,"Password:"); rectangle(195,200,390,250); translate(code); TimeGraph(); SetTimer(NewTimer); while(time&&!ON&&sign) { if(TimerCounter>18) { time-=1; TimerCounter=0; CutTime(x); x+=7; _SoundTime(); } if(kbhit()) { accept.x=bioskey(0); if(!tab)Enqueue(accept.x); if(accept.x==F1||accept.x==UP||accept.x==DOWN||accept.x==TAB||accept.x==ESC||accept.x==ENTER||accept.x==LEFT||accept.x==RIGHT) { switch(accept.x) { case F1:Help(helpID);break; case DOWN:if(!tab)Compare();break; case TAB:if(tab&&!codeshow)CodeGraph(); else if(codeshow)CodeCut(); break; case ESC:Escape();break; case ENTER:buff[i]='\0'; if(strcmp(code,buff)==0)ON=1; else { i=0; buff[i]='\0'; y=220; DelCode(); } break; } } else { if(accept.h==BS) { if(i>0) /*if(y>130)*/ { y-=10; Eraser(y); buff[--i]='\0'; } } else if(i<15) { setcolor(RED); word[0]=accept.h; buff[i++]=accept.h; outtextxy(y,230,word); y+=10; } } } if(time<11) if(TimerCounter%18==0)SoundTime(); } KillTimer(); if(ON)NextStage(other); else sign=0; } int randto(int m,int n) { return rand()%n+m; } void GameOver() { register i,j; int osize,size,x,y; void *buffer,*buff; setcolor(15); randomize(); for(x=1;x<6-2;x++) { line(0,240,x,240); delay(2000); if(x==5-2)for(y=1;y<6-2;y++) { line(0,239,y,239); line(0,241,y,241); line(0,240,x+y,240); delay(2000); if(y==5-2)for(i=1;i<=640;i++) { line(0,238,i,238); line(0,242,i,242); line(0,239,y+i,239); line(0,241,y+i,241); line(0,240,x+y+i,240); delay(2000); } } } setcolor(BLACK); line(0,240,640,240); delay(2000); x=240; for(y=0;y<50-30;y++) { putpixel(rand()%640,240,randto(1,15)); } for(i=1,j=3;i<=110;i++,j++) { setcolor(7); line(0,x-i,640,x-i); line(0,x+i,640,x+i); delay(2000); setcolor(WHITE); line(0,x-j,640,x-j); line(0,x+j,640,x+j); delay(2000); setcolor(BLACK); line(0,x-i,640,x-i); line(0,x+i,640,x+i); for(y=0;y<50-30;y++) { putpixel(rand()%640,x-i,randto(1,15)); putpixel(rand()%640,x+i,randto(1,15)); } delay(2000); } setcolor(11); settextstyle(0,0,8); size=imagesize(32,150,383,205); buffer=malloc(size); osize=imagesize(250,270,598,325); buff=malloc(osize); getimage(32,150,383,205,buffer); getimage(250,270,598,325,buff); outtextxy(35,150,"GAME"); outtextxy(350,270,"OVER"); putimage(32,150,buffer,COPY_PUT); putimage(250,270,buff,COPY_PUT); for(i=1;i<=140;i+=5) { putimage(32,150,buffer,COPY_PUT); if(i<=120)putimage(250,270,buff,COPY_PUT); outtextxy(35+i,150,"GAME"); if(i<=120)outtextxy(350-i,270,"OVER"); } getch(); } void ExitGame() { cleardevice(); setbkcolor(BLACK); setcolor(WHITE); outtextxy(180,200,"Thank you for your playing"); sleep(1); outtextxy(240,250,"Good luck!"); sleep(1); closegraph(); } void main() { Init(); begin: InitType(); Display(); Start(); while(sign==1)Select(j); if(sign)ExitGame(); else { GameOver(); goto begin; } }

qq:69558139
2005-04-12 18:58
kaikai
Rank: 1
等 级:新手上路
帖 子:236
专家分:0
注 册:2005-1-7
收藏
得分:0 
既然楼主已经把源码公开了,那么我觉得把我如何知道你很喜欢董洁告诉你了。
其实很简单,你的程序把密码,题目以及最后给出的地址都直接写在了程序里。那么这些数据作为字符串会完整地保存在程序文件末尾附近的代码段,直接用文本编辑器打开你的程序找到可以阅读的部分就猜出是过关密码了:)

Have you visit acm.tongji. lately?
2005-04-12 23:45
tjl2006tjl
Rank: 1
等 级:新手上路
帖 子:37
专家分:0
注 册:2004-12-16
收藏
得分:0 
怎么用不了,双击出现一个窗口一闪就没了什么也没有

2005-04-13 10:03
simpley
Rank: 1
等 级:新手上路
帖 子:262
专家分:0
注 册:2005-2-23
收藏
得分:0 
我的情况也是这样,不是木马吧

myQQ::445750010
2005-04-14 10:45
chengstone
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
帖 子:562
专家分:226
注 册:2004-4-3
收藏
得分:0 
汗~~  这个在我看到你第一个回复的时候已经猜到了 所以我在原代码中改了一下子 不过仔细看过代码之后还是会知道密码是什么地

qq:69558139
2005-04-14 16:52
kaifeng05
Rank: 1
等 级:新手上路
帖 子:26
专家分:0
注 册:2005-5-11
收藏
得分:0 
w什么来的呀,一点都看不懂呀

学.....佛......有恒
2005-05-24 00:32
沉路
Rank: 1
等 级:新手上路
帖 子:36
专家分:0
注 册:2005-5-15
收藏
得分:0 
我也是这样,一闪而过,什么都没有。

我的博客:http://tongshengyuan. 我的博客:http://sanweishuwu2005.
2005-05-24 09:50
钢燃
Rank: 1
等 级:新手上路
帖 子:80
专家分:0
注 册:2005-5-19
收藏
得分:0 
好象your源码有点点问题

寻找同济的朋友的网络连接
2005-05-24 11:55
wjl2002hunter
Rank: 1
等 级:新手上路
帖 子:21
专家分:0
注 册:2005-5-19
收藏
得分:0 
真是牛人呀!喜欢收藏了!
2005-05-24 13:56
wjl2002hunter
Rank: 1
等 级:新手上路
帖 子:21
专家分:0
注 册:2005-5-19
收藏
得分:0 
为什么读取输入速度很慢

[此贴子已经被作者于2005-5-25 11:25:03编辑过]


2005-05-24 14:18
快速回复:[原创]一个考验你IQ的密码破译游戏,挑战你的逻辑能力
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.031244 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved