Closed JesseBowling closed 9 years ago
A couple of questions.
How about we reject this pull request, and I can start over with some smaller commits; thus I could submit the namespace changes in one, moving the patterns.ini in one, and rework the stdin format to really be one for "handle plain text files" that makes more use of the existing function.
Worth it to make a develop branch?
A nice trick exists in Python if you want to avoid situations like the one you describe in 1. I use it really frequently.
ini_file = os.path.join(os.path.dirname(os.path.abspath(file)), 'patterns.ini')
(file is not correctly visualized here so please read it as underscore-underscore file underscore-underscore)
and the path problem magically disappears.
Agree with your approach of rejecting the pull request and work on more granular ones. Armin?
I was going to reject because the default pattern location in home is not for everybody and would've complicated the installation process for all users. The trick using file sounds like a good idea.
Thanks for your code. I have a need to extract IOC from plain text, so hacked up something to read stdin and parse it. I moved the default patterns.ini to ~/.patterns.ini. I also moved the argument parsing into main and removed the use of globals.
Feel free to use or reject as you see fit!