Commit 3ac3c382cde60d35fc48f52d49028f7f1ea91d61
1 parent
e97257d4
olemap: only display the header by default
Showing
1 changed file
with
13 additions
and
5 deletions
oletools/olemap.py
| @@ -49,6 +49,7 @@ http://www.decalage.info/python/oletools | @@ -49,6 +49,7 @@ http://www.decalage.info/python/oletools | ||
| 49 | # 2017-03-21 PL: - added header display | 49 | # 2017-03-21 PL: - added header display |
| 50 | # - added options --header, --fat and --minifat | 50 | # - added options --header, --fat and --minifat |
| 51 | # 2017-03-22 PL: - added extra data detection, completed header display | 51 | # 2017-03-22 PL: - added extra data detection, completed header display |
| 52 | +# 2017-03-23 PL: - only display the header by default | ||
| 52 | 53 | ||
| 53 | 54 | ||
| 54 | __version__ = '0.51dev3' | 55 | __version__ = '0.51dev3' |
| @@ -217,9 +218,9 @@ def main(): | @@ -217,9 +218,9 @@ def main(): | ||
| 217 | parser.add_option("--header", action="store_true", dest="header", | 218 | parser.add_option("--header", action="store_true", dest="header", |
| 218 | help='Display the OLE header (default: yes)') | 219 | help='Display the OLE header (default: yes)') |
| 219 | parser.add_option("--fat", action="store_true", dest="fat", | 220 | parser.add_option("--fat", action="store_true", dest="fat", |
| 220 | - help='Display the FAT (default: yes)') | 221 | + help='Display the FAT (default: no)') |
| 221 | parser.add_option("--minifat", action="store_true", dest="minifat", | 222 | parser.add_option("--minifat", action="store_true", dest="minifat", |
| 222 | - help='Display the MiniFAT (default: yes)') | 223 | + help='Display the MiniFAT (default: no)') |
| 223 | 224 | ||
| 224 | # TODO: add logfile option | 225 | # TODO: add logfile option |
| 225 | 226 | ||
| @@ -232,11 +233,13 @@ def main(): | @@ -232,11 +233,13 @@ def main(): | ||
| 232 | parser.print_help() | 233 | parser.print_help() |
| 233 | sys.exit() | 234 | sys.exit() |
| 234 | 235 | ||
| 235 | - # if no diplay option is provided, set defaults: | 236 | + # if no display option is provided, set defaults: |
| 237 | + default_options = False | ||
| 236 | if not (options.header or options.fat or options.minifat): | 238 | if not (options.header or options.fat or options.minifat): |
| 237 | options.header = True | 239 | options.header = True |
| 238 | - options.fat = True | ||
| 239 | - options.minifat = True | 240 | + # options.fat = True |
| 241 | + # options.minifat = True | ||
| 242 | + default_options = True | ||
| 240 | 243 | ||
| 241 | # print banner with version | 244 | # print banner with version |
| 242 | print(BANNER) | 245 | print(BANNER) |
| @@ -266,5 +269,10 @@ def main(): | @@ -266,5 +269,10 @@ def main(): | ||
| 266 | 269 | ||
| 267 | ole.close() | 270 | ole.close() |
| 268 | 271 | ||
| 272 | + # if no display option is provided, print a tip: | ||
| 273 | + if default_options: | ||
| 274 | + print('To display the FAT or MiniFAT structures, use options --fat or --minifat, and -h for help.') | ||
| 275 | + | ||
| 276 | + | ||
| 269 | if __name__ == '__main__': | 277 | if __name__ == '__main__': |
| 270 | main() | 278 | main() |