[Zeek] Proper way to reference potentially missing key

Woot4moo tscheponik at gmail.com
Thu Apr 4 08:50:44 PDT 2019


How can one reference a potentially missing key such that the script will
not terminate? For example in a file_new event, if I reference the
mime_type attribute and it is uninitialized I receive “no such field in
record”

Example code below:

  if( f?$mime_type) #error here
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ICSI.Berkeley.EDU/pipermail/zeek/attachments/20190404/3d978a4f/attachment.html 


More information about the Zeek mailing list