ufp
ufp copied to clipboard
No instructions or helper scripts for building or installing this thing?
I get that it's a basic Python module, but setup.py would be great.
I have an effort at this over in my fork: https://github.com/ageis/ufp there''s a lot of clutter in setup.py (first time for everything), but I can clean it out if you'd like a PR. This tool would be very useful to have on PyPI.
Hi @ageis,
sure, pull requests are always welcome, all of the refactoring for turning this into a Python module came via a pull request. :)
If you can spare the time, I'd be happy to take a look at what you can come up with and merge it afterwards. :)
For sure. I've just been having some issues related to whether ufp.cli should be a package/module or not.... if the ufp.py CLI wrapper should be removed and instead confer a main() method to cli.py... I can't get that working/importing as intended but once I do I'll send a PR.
In usage, I also found a pattern which you're evidently not handling... "UFW AUDIT INVALID"... and there's also some ways that the log file could get corrupted (like via OOM or rsyslog crash) that would crash the parser; but don't think there's much to be done about that.
Hi @rokclimb15, any strong opinions on this either way? Feel free to chip in if you feel like it. :)
In terms of the package being used as a module, I would imagine that ufp.py could be left out. It's a convenience wrapper so someone can start this thing out of the box. If you're installing a module, it seems likely to me that you intend to use it by importing into another program.
As for the unhandled pattern, that sounds like a bug! I wouldn't worry about the corrupted logs since that's not controllable. If possible, you might just catch the exception and present a clear error about the log file possibly being corrupted?