Develop and Download Open Source Software

Browse Subversion Repository

Diff of /branches/mty-makai/mty.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 150 by notanpe, Tue Apr 24 06:58:46 2007 UTC revision 163 by notanpe, Fri Jun 1 13:48:31 2007 UTC
# Line 1306  main(int argc, char *argv[]) Line 1306  main(int argc, char *argv[])
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];
# Line 1473  main(int argc, char *argv[]) Line 1478  main(int argc, char *argv[])
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;
# Line 1780  if ( ok + ng >= KCCNT ) { Line 1788  if ( ok + ng >= KCCNT ) {
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    
# Line 1800  if ( ok + ng >= KCCNT ) { Line 1814  if ( ok + ng >= KCCNT ) {
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

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26