【crackme】初次尝试
第一次使用vc编写crackme,有什么不对的地方还请指出来,发错区请管理移一下,麻烦了。软件是vc6.0编写的,窗口就是cmd窗口,如图
错误输出N
正确输出Y
没什么技术含量,初次尝试,请多多包涵。
本帖最后由 zbnysjwsnd8 于 2017-7-13 17:43 编辑
任选一组即可。
100840101840102840103840104840105840106840107840108840109840110840111840112840113840114840
115840116840117840118840119840120840121840122840123840124840125840126840127840128840129840
130840131840132840133840134840135840136840137840138840139840140840141840142840143840144840
145840146840147840148840149840150840151840152840153840154840155840156840157840158840159840
160840161840162840163840164840165840166840167840168840169840170840171840172840173840174840
175840176840177840178840179840180840181840182840183840184840185840186840187840188840189840
190840191840192840193840194840195840196840197840198840199840200840201840202840203840204840
205840206840207840208840209840210840211840212840213840214840215840216840217840218840219840
220840221840222840223840224840225840226840227840228840229840230840231840232840233840234840
235840236840237840238840239840240840241840242840243840244840245840246840247840248840249840
250840251840252840253840254840255840256840257840258840259840260840261840262840263840264840
265840266840267840268840269840270840271840272840273840274840275840276840277840278840279840
280840281840282840283840284840285840286840287840288840289840290840291840292840293840294840
295840296840297840298840299840300840301840302840303840304840305840306840307840308840309840
310840311840312840313840314840315840316840317840318840319840320840321840322840323840324840
325840326840327840328840329840330840331840332840333840334840335840336840337840338840339840
340840341840342840343840344840345840346840347840348840349840350840351840352840353840354840
355840356840357840358840359840360840361840362840363840364840365840366840367840368840369840
370840371840372840373840374840375840376840377840378840379840380840381840382840383840384840
385840386840387840388840389840390840391840392840393840394840395840396840397840398840399840
400840401840402840403840404840405840406840407840408840409840410840411840412840413840414840
415840416840417840418840419840420840421840422840423840424840425840426840427840428840429840
430840431840432840433840434840435840436840437840438840439840440840441840442840443840444840
445840446840447840448840449840450840451840452840453840454840455840456840457840458840459840
460840461840462840463840464840465840466840467840468840469840470840471840472840473840474840
475840476840477840478840479840480840481840482840483840484840485840486840487840488840489840
490840491840492840493840494840495840496840497840498840499840500840501840502840503840504840
505840506840507840508840509840510840511840512840513840514840515840516840517840518840519840
520840521840522840523840524840525840526840527840528840529840530840531840532840533840534840
535840536840537840538840539840540840541840542840543840544840545840546840547840548840549840
550840551840552840553840554840555840556840557840558840559840560840561840562840563840564840
565840566840567840568840569840570840571840572840573840574840575840576840577840578840579840
580840581840582840583840584840585840586840587840588840589840590840591840592840593840594840
595840596840597840598840599840600840601840602840603840604840605840606840607840608840609840
610840611840612840613840614840615840616840617840618840619840620840621840622840623840624840
625840626840627840628840629840630840631840632840633840634840635840636840637840638840639840
640840641840642840643840644840645840646840647840648840649840650840651840652840653840654840
655840656840657840658840659840660840661840662840663840664840665840666840667840668840669840
670840671840672840673840674840675840676840677840678840679840680840681840682840683840684840
685840686840687840688840689840690840691840692840693840694840695840696840697840698840699840
700840701840702840703840704840705840706840707840708840709840710840711840712840713840714840
715840716840717840718840719840720840721840722840723840724840725840726840727840728840729840
730840731840732840733840734840735840736840737840738840739840740840741840742840743840744840
745840746840747840748840749840750840751840752840753840754840755840756840757840758840759840
760840761840762840763840
#include <stdio.h>
int func(int a)
{
unsigned int i;
unsigned int result;
i = 0;
while(true)
{
if((int)i > 8)
break;
result = a % 10;
if(result != i)
break;
a /= 10;
i += 4;
}
if(i != 12)
return 0;
return 1;
}
int main(void)
{
int a = 100000;
start:
while(!func(a))
a++;
if(a >= 764000)
{
while(true);
return 0;
}
printf("%d\t",a);
a++;
goto start;
return 0;
} 00401213 > \837D F8 00 cmp dword ptr ss:,0x0
00401217 .74 06 je short crackme.0040121F
00401219 .837D F8 08 cmp dword ptr ss:,0x8
0040121D .75 05 jnz short crackme.00401224
0040121F >E8 EBFDFFFF call crackme.0040100F
00401224 >837D F8 04 cmp dword ptr ss:,0x4
00401228 .75 05 jnz short crackme.0040122F
0040122A .E8 DBFDFFFF call crackme.0040100A
0040122F >837D F8 0C cmp dword ptr ss:,0xC
00401233 .75 15 jnz short crackme.0040124A
00401235 .0FBE15 148342>movsx edx,byte ptr ds: ;Y
0040123C .52 push edx ;crackme.00427A68
0040123D .68 24504200 push crackme.00425024 ;%c
00401242 .E8 59000000 call crackme.004012A0 ;输出Y
随便改下跳转就行了,,
本帖最后由 jixun66 于 2017-7-13 01:16 编辑
序列号:666840
直接扔的 IDA F5... 算法比较简单。 jixun66 发表于 2017-7-13 05:14
序列号:666840
直接扔的 IDA F5... 算法比较简单。
太打击像我们这样的新手了 本帖最后由 ugvnui 于 2017-7-13 09:22 编辑
输入的值转换为整数
判断转换后的值是不是小于764000
然后重新写了下你的代码。呵呵
int v3 = int.Parse(注册码);//将输入的值复制给变量V3
for (int i = 0; i <= 8;)//循环8次
{
if (v3 % 10 == i)//循环中判断V3取余数是不是等于I
{
i += 4; //如果等于则 I+4
}
v3 /= 10;//
if (i==12)//如果I=12了。则直接将byte转为字符Y
{
MessageBox.Show("Y");
}
}
只要符合上面算法即为成功,,小菜不知分析对不对,望大牛点评!
特附上几组成功码:
103840
104840
105840
106840
107840
108840
109840
110840
111840
112840 学习中,一起努力 学习了!!!! 膜拜大妞们 感谢楼主!~ 自己试了一下代码大概是这样吧。
#include "stdio.h"
int main()
{
int n ;
scanf ("%d", &n );
if ( n >= 100000 && n <= 764000 ) {
for ( int i = 0 ; i < 3 ; i ++ )
{
if ( n % ( ( i + 1 ) * 10 ) == i * 4 ) {
printf ( " Y \n" );
}
}
} else {
printf( " N \n" );
}
return 0;
}
页:
[1]
2