- Timestamp:
- 03/05/10 23:40:25 (15 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/common.c
r168 r170 29 29 const char* common_special_chars = ",\"\\"; 30 30 31 #define REGLOOKUP_VERSION "0.1 1.0"31 #define REGLOOKUP_VERSION "0.12.0" 32 32 33 33 #define REGLOOKUP_EXIT_OK 0 -
trunk/src/reglookup.c
r168 r170 2 2 * A utility to read a Windows NT and later registry files. 3 3 * 4 * Copyright (C) 2005-2009 Timothy D. Morgan 4 * Copyright (C) 2005-2010 Timothy D. Morgan 5 * Copyright (C) 2010 Tobias Mueller (portions of '-i' code) 5 6 * Copyright (C) 2002 Richard Sharpe, rsharpe@richardsharpe.com 6 7 * … … 31 32 32 33 /* Globals, influenced by command line parameters */ 34 bool print_value_mtime = false; 33 35 bool print_verbose = false; 34 36 bool print_security = false; … … 57 59 char* conv_error = NULL; 58 60 const char* str_type = NULL; 61 char mtime[20]; 62 time_t tmp_time[1]; 63 struct tm* tmp_time_s = NULL; 59 64 60 65 if(vk->valuename == NULL) … … 97 102 } 98 103 104 if(print_value_mtime) 105 { 106 *tmp_time = regfi_nt2unix_time(&iter->cur_key->mtime); 107 tmp_time_s = gmtime(tmp_time); 108 strftime(mtime, sizeof(mtime), "%Y-%m-%d %H:%M:%S", tmp_time_s); 109 } 110 else 111 mtime[0] = '\0'; 112 99 113 str_type = regfi_type_val2str(vk->type); 100 114 if(print_security) 101 115 { 102 116 if(str_type == NULL) 103 printf("%s/%s,0x%.8X,%s, ,,,,\n", prefix, quoted_name,104 vk->type, quoted_value );105 else 106 printf("%s/%s,%s,%s, ,,,,\n", prefix, quoted_name,107 str_type, quoted_value );117 printf("%s/%s,0x%.8X,%s,%s,,,,\n", prefix, quoted_name, 118 vk->type, quoted_value, mtime); 119 else 120 printf("%s/%s,%s,%s,%s,,,,\n", prefix, quoted_name, 121 str_type, quoted_value, mtime); 108 122 } 109 123 else 110 124 { 111 125 if(str_type == NULL) 112 printf("%s/%s,0x%.8X,%s, \n", prefix, quoted_name,113 vk->type, quoted_value );114 else 115 printf("%s/%s,%s,%s, \n", prefix, quoted_name,116 str_type, quoted_value );126 printf("%s/%s,0x%.8X,%s,%s\n", prefix, quoted_name, 127 vk->type, quoted_value, mtime); 128 else 129 printf("%s/%s,%s,%s,%s\n", prefix, quoted_name, 130 str_type, quoted_value, mtime); 117 131 } 118 132 … … 548 562 fprintf(stderr, "\t-p\t restrict output to elements below this path.\n"); 549 563 fprintf(stderr, "\t-t\t restrict results to this specific data type.\n"); 564 fprintf(stderr, "\t-i\t includes parent key modification times with child values.\n"); 550 565 fprintf(stderr, "\n"); 551 566 } … … 605 620 else if (strcmp("-v", argv[argi]) == 0) 606 621 print_verbose = true; 622 else if (strcmp("-i", argv[argi]) == 0) 623 print_value_mtime = true; 607 624 else 608 625 {
Note: See TracChangeset
for help on using the changeset viewer.