Browse Subversion Repository
Diff of /branches/mty-makai/mty.c
Parent Directory
| Revision Log
| Patch
| 1306 |
#define KCCNT 1000000 |
#define KCCNT 1000000 |
| 1307 |
unsigned int ok, ng; |
unsigned int ok, ng; |
| 1308 |
#endif /* KEYCHECK */ |
#endif /* KEYCHECK */ |
| 1309 |
|
#ifdef SELFS |
| 1310 |
|
#define TIME_LIMIT 1 * 60 * 60 * 100 /* 一時間 */ |
| 1311 |
|
#define HIT_LIMIT 10 |
| 1312 |
|
int hitcnt; |
| 1313 |
|
#endif /* SELFS */ |
| 1314 |
|
|
| 1315 |
/* 鍵文字列 */ |
/* 鍵文字列 */ |
| 1316 |
uint8_t key[8 + 8]; |
uint8_t key[8 + 8]; |
| 1478 |
ok = ng = 0; |
ok = ng = 0; |
| 1479 |
#endif /* KEYCHECK */ |
#endif /* KEYCHECK */ |
| 1480 |
/* 探索ループだぞっと */ |
/* 探索ループだぞっと */ |
| 1481 |
|
#ifdef SELFS |
| 1482 |
|
hitcnt = 0; |
| 1483 |
|
#endif /* SELFS */ |
| 1484 |
for (;;) |
for (;;) |
| 1485 |
{ |
{ |
| 1486 |
struct PACKET_CRYPT64 *pkt_c; |
struct PACKET_CRYPT64 *pkt_c; |
| 1788 |
buf[4], buf[5], buf[6], buf[7], ctime(&tloc) ); |
buf[4], buf[5], buf[6], buf[7], ctime(&tloc) ); |
| 1789 |
#endif /* not KEYCHECK */ |
#endif /* not KEYCHECK */ |
| 1790 |
} |
} |
| 1791 |
|
#ifdef SELFS |
| 1792 |
|
hitcnt++; |
| 1793 |
|
if ( hitcnt >= HIT_LIMIT ) { |
| 1794 |
|
exit( 0 ); |
| 1795 |
|
} |
| 1796 |
|
#endif /* SELFS */ |
| 1797 |
} |
} |
| 1798 |
} |
} |
| 1799 |
|
|
| 1814 |
printf( "mloop = %d, loop = %d\n", status.mloop, status.loop ); |
printf( "mloop = %d, loop = %d\n", status.mloop, status.loop ); |
| 1815 |
#endif |
#endif |
| 1816 |
curTime = usec(); |
curTime = usec(); |
| 1817 |
|
#ifdef SELFS |
| 1818 |
|
if ( curTime > TIME_LIMIT ) { |
| 1819 |
|
exit( 0 ); |
| 1820 |
|
} |
| 1821 |
|
#endif /* SELFS */ |
| 1822 |
diffTime = curTime - status.lastTime; |
diffTime = curTime - status.lastTime; |
| 1823 |
b = (status.loop - status.lastloop) * 100 / diffTime; |
b = (status.loop - status.lastloop) * 100 / diffTime; |
| 1824 |
status.mloop += ( status.loop / LOOP_FACTOR ); |
status.mloop += ( status.loop / LOOP_FACTOR ); |
|
|
Legend:
| Removed from v.150 |
|
| changed lines |
| |
Added in v.163 |
|
|
| |