Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. if len(sys.argv) == 1:
  2. args_dict['input_type'] = 'stdin'
  3. args_dict['output_type'] = 'stdout'
  4.  
  5. if args.input_file_name:
  6. args_dict['input_type'] = 'file'
  7. elif args.host or args.port or args.syslog_facility or args.daemonize:
  8. args_dict['input_type'] = 'syslog'
  9.  
  10. if args.output_file_name:
  11. args_dict['output_type'] = 'file'
  12. elif not args.output_mozdef or args.output_syslog or args.output_stderr or args.output_file:
  13. args_dict['output_type'] = 'stdout'
  14.  
  15. if args.config:
  16. if verbose:
  17. print("ignoring command line options and using config")
  18. with open(args.config) as fd:
  19. args_dict = json.load(fd)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement