Closed ttufts closed 9 years ago
Also fixing a minor coding issue in whitelist.py. Using 'with' instead of open automatically closes. Previously this wasn't closing whitelist files.
Armin, do you not like the data output handler?
No need to add this to the core, the feature of specifying a custom output handler was exactly meant for what you're trying to do, but it only makes sense when used as a library. Now when someone uses IOC parser as a library they can specify their own handler in the source.
Allows data to be stored in a dict and retrieved with get_iocs().
iocp = IOC_Parser(args.patterns_file, output_format='data')
iocs = iocp.handler.get_iocs()