
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
CEF python class
I work pretty frequently with CEF events that I generate and manipulate with python scripts.
This usually gives pretty ugly and difficult to modify code when CEF parameters need to be manipulated. This is why I wrote my own set of functions (python 2.7) to make this work easier and thought it could be useful for some other people.
There is some documentation and examples included in the attached documents. It looks good to me but hasn't been tested extensively. Should you find a bug, please be kind enough to let me know. Thx
Gaetan


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Awesome stuff, thanks!


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Thank you!


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Damn good job! Congrats!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Merci!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
many thanks ... love your effort to share ..

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
This is wonderful, many thanks for your contribution! Very handy indeed. I can absolutely understand why you wrote this Python code.
Great work!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Great job Gaetan! Very usefull library
I can't see the stingest function in the code, maybe is for a new version?
Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Jorge,
Very very old indeed, it has been drastically changed since then to make it easier to use. I replaced the script with the latest one. Thank you for noticing 😉

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Thanks Gaetan,
I've tried the stringest method and it doesn't work well with some events I have.
I had to handle CEF event in Python some weeks ago and I'm using a regular expression to split the fields. It works with field values containing "|" and additional field names with characters like "_" of ",".
This is the regex I use, maybe it is helpful to improve your script:
header_fields = strcef.split('| ')[0].split('|')
fields_regex = r"(?:_+)?(?P<_KEY_1>[\w.,_\-:\[\]]+)=(?P<_VAL_1>.*?(?=(?:\s[\w.,_\-:\[\]]+=|$)))"
fields_str = ''.join(strcef.split('| ')[1:])
fields_list = re.findall(fields_regex, fields_str)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Jorge,
Indeed the code was not dealing correctly with events containing a | character in the extension and has been updated.
Special characters in the field names shouldn't be an issue.
If you are still experiencing issues, feel free to send me cef events you have problem with via PM
Gaetan

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Gaetan,
It works perfect now.
Thanks!