| 228 | |
| 229 | |
| 230 | def Output(args): |
| 231 | output_file = args.output_path |
| 232 | file_status = args.output_file_status |
| 233 | screen_status = args.output_screen_status |
| 234 | browser = args.open_browser |
| 235 | |
| 236 | if not file_status and output_file: |
| 237 | msg = 'Cannot use [-oF] and [-o] together, please read the usage with [-h].' |
| 238 | sys.exit(logger.error(msg)) |
| 239 | |
| 240 | if not file_status and browser: |
| 241 | msg = '[--browser] is based on file output, please remove [-oF] in your command and try again.' |
| 242 | sys.exit(logger.error(msg)) |
| 243 | |
| 244 | conf.SCREEN_OUTPUT = screen_status |
| 245 | conf.FILE_OUTPUT = file_status |
| 246 | conf.OUTPUT_FILE_PATH = os.path.abspath(output_file) if output_file else \ |
| 247 | os.path.abspath( |
| 248 | os.path.join( |
| 249 | paths.OUTPUT_PATH, time.strftime( |
| 250 | '[%Y%m%d-%H%M%S]', time.localtime( |
| 251 | time.time())) + conf.MODULE_NAME + '.txt')) |
| 252 | |
| 253 | |
| 254 | def Misc(args): |