Efficient search of string in a list of strings in Python

Introduction I’m currently working on a script that parses Suricata EVE log files and try to detect if some fields in the log are present in a list of bad patterns. So the script has two parts which are reading the log file and searching for the string in a list of strings. This list can be big with a target of around 20000 strings. Note: This post may seem trivial for real Python developers but as I did not manage to find any documentation on this here is this blog post. ...

9 novembre 2014 · 2 min · Regit