# testing performances of binpac's parser

**URL:** <https://community.zeek.org/t/testing-performances-of-binpacs-parser/5025>\
**Category:** Zeek\
**Created:** [September 21, 2017, 2:12pm UTC](https://community.zeek.org/t/testing-performances-of-binpacs-parser/5025 "2017-09-21T14:12:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bortoli\_Tomas](https://avatars.discourse-cdn.com/v4/letter/b/7ab992/32.png) [@Bortoli\_Tomas](https://community.zeek.org/u/Bortoli_Tomas)\
**Post date:** [September 21, 2017, 2:12pm UTC](https://community.zeek.org/t/testing-performances-of-binpacs-parser/5025/1 "2017-09-21T14:12:27Z")

</div>

Hello everybody,

I would like to test a binpac’s generated parser that I wrote. Is there a handy way to get the C++ code running on some payload of my choice? I guess there is but it would be helpful if somebody gives a hint on where to start!

thanks in advance  
Cheers, Tomas

---

<div class="post-metadata">

**Author:** ![johanna](https://avatars.discourse-cdn.com/v4/letter/j/50afbb/32.png) [@johanna](https://community.zeek.org/u/johanna)\
**Post date:** [September 21, 2017, 4:02pm UTC](https://community.zeek.org/t/testing-performances-of-binpacs-parser/5025/2 "2017-09-21T16:02:43Z")

</div>

Hi,

> I would like to test a binpac's generated parser that I wrote. Is there  
> a handy way to get the C++ code running on some payload of my choice? I  
> guess there is but it would be helpful if somebody gives a hint on where  
> to start!

I actually recently did this for a research project where I used binpac to  
parse a X.509 data structure in a standalone project. The source code is  
up here: [GitHub - 0xxon/sct-utils: Utilities for X.509 certificates containing embedded Signed Certificate Timestamps (SCTs) for Certificate Transparency](https://github.com/0xxon/sct-utils)

The interesting utility is extractSCT. Note that to be able to use binpac  
completely without Bro you need to patch binpac.h a little bit; if I  
remember it correctly it does include Bro header files by default (that  
are not really necessary in a standalone utility).

I hope this helps,  
Johanna

---

<div class="post-metadata">

**Author:** ![Bortoli\_Tomas](https://avatars.discourse-cdn.com/v4/letter/b/7ab992/32.png) [@Bortoli\_Tomas](https://community.zeek.org/u/Bortoli_Tomas)\
**Post date:** [September 22, 2017, 9:30am UTC](https://community.zeek.org/t/testing-performances-of-binpacs-parser/5025/3 "2017-09-22T09:30:57Z")

</div>

Thanks, I'll check that out!

Tomas

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/zeek/original/1X/f09d732bc2cc7c7cc7e35db67cf4e1d5233ce7a7.png) [@system](https://community.zeek.org/u/system)\
**Post date:** [May 6, 2022, 3:45pm UTC](https://community.zeek.org/t/testing-performances-of-binpacs-parser/5025/4 "2022-05-06T15:45:17Z")

</div>

Closed on May 6, 2022, 3:45pm UTC


