[Bro] Run Python script in Bro

Jan Grashöfer jan.grashoefer at gmail.com
Tue Aug 22 00:44:25 PDT 2017


Hi Chen,

> I use the str_shell_escape() to run a Python script using command line. I
> am wondering how I can get the return or print value of Python script,
> because I will need the result in a if statement in Bro.

str_shell_escape() is used to escape strings in that context. I think 
system() is what you are looking for: 
https://www.bro.org/sphinx/scripts/base/bif/bro.bif.bro.html#id-system

Jan


More information about the Bro mailing list