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 236 by notanpe, Mon Nov 2 09:40:37 2009 UTC revision 237 by notanpe, Mon Feb 8 10:53:23 2010 UTC
# Line 100  int    verbose; Line 100  int    verbose;
100  #define   DEF_GEAR   10  #define   DEF_GEAR   10
101  int     gear;  int     gear;
102    
103    #ifdef KEYLOG
104    #define   KEY_LOG_FILE   "keylog.txt"
105    #endif /* KEYLOG */
106    
107  #ifdef SELF  #ifdef SELF
108  #define   SELF_LIM_CNT   50  #define   SELF_LIM_CNT   50
109  #define   SELF_LIM_SEC   60 * 60 * 1000 /* 1h */  #define   SELF_LIM_SEC   60 * 60 * 1000 /* 1h */
# Line 368  key_reset(uint8_t *key, int n) Line 372  key_reset(uint8_t *key, int n)
372     } else {     } else {
373      key[n] = umeStr[n];      key[n] = umeStr[n];
374     }     }
375    #ifdef KEYLOG
376       /* 検索空間の記録 */
377       if ( n == umeLen - 1 ) {
378        FILE        *fp;
379        int i;
380            struct timeb    tb;
381            struct tm       *plt;
382    
383            ftime( &tb );
384            plt = localtime( &tb.time );
385    
386    #ifdef OLDDEBUG
387        printf( "\nそぉーるとちぇーんじ!\n" );
388    #endif /* DEBUG */
389        if ( (fp = fopen( KEY_LOG_FILE, "at" )) == NULL ) {
390         perror( KEY_LOG_FILE );
391         return errno;
392        }
393        for ( i = 0; i < umeLen; i++ ) {
394         fprintf( fp, "%02x", key[i] );
395        }
396        fprintf( fp, "\t%04d/%02d/%02d %02d:%02d:%02d.%03d\n",
397                 plt->tm_year + 1900, plt->tm_mon + 1, plt->tm_mday,
398                 plt->tm_hour, plt->tm_min, plt->tm_sec, tb.millitm );
399        fclose( fp );
400       }
401    #endif /* KEYLOG */
402    }    }
403    
404  #if DEBUG>=3  #if DEBUG>=3
# Line 1845  main(int argc, char *argv[]) Line 1876  main(int argc, char *argv[])
1876  #define assert(x)  #define assert(x)
1877  #endif /* MINAST */  #endif /* MINAST */
1878    
1879    #ifdef SCTEST
1880    {
1881      int   i;
1882    
1883      for ( i = 1; i < SCTEST; i++ ) {
1884       key_reset( key, 0 );
1885      }
1886      exit( 0 );
1887    }
1888    #endif /* SCTEST */
1889    
1890    /* 探索ループだぞっと */    /* 探索ループだぞっと */
1891    for ( ;; ) {    for ( ;; ) {
1892     struct PACKET_CRYPT64 *pkt_c;     struct PACKET_CRYPT64 *pkt_c;

Legend:
Removed from v.236  
changed lines
  Added in v.237

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