[Snort-users] Help: Piglet Test Harness

Siti Farhana Binti Lokman sitifarhana.lokman at ...17225...
Wed Sep 2 20:03:56 EDT 2015


I'm going to test performance of my own plugin (pattern_matching.cc and pattern_matching.h) into Snort detection engine.
But I need to perform individual testing first before implement them (obviously) and to be honest I am totally new in this.

I read some info about piglet test harness that provide this kind of thing and tried to find some more development examples in /piglet_script source tree in https://github.com/snortadmin/snort3/tree/master/piglet_scripts as stated in blog.snort.org/2015/07/snort-introducing-piglet.html, however the page gave me 404 error.

I found other piglet folders such as:

1)      https://github.com/snortadmin/snort3/tree/master/src/piglet 2<https://github.com/snortadmin/snort3/tree/master/src/piglet%202>)

2)      https://github.com/snortadmin/snort3/tree/master/src/piglet_plugins 3<https://github.com/snortadmin/snort3/tree/master/src/piglet_plugins%203>)

3)      https://github.com/snortadmin/snort3/tree/master/piglet/tests

I'm not really sure if these 3 folders are the one mentioned in the blog.snort.org. If it is not the right one, can you help pointing me in the right direction?

>From /piglet/tests/instance/ folder in github, I noticed that it contains some of plugin files in Lua format. Do I have to create Lua file and write test script for my plugin exactly like that?
Where do I need to place that test script? Do I have to modify my .cc or .h plugin files? To run the piglet test, I need to add -enable-piglet in configure file in main folder right?

I would greatly appreciate it if you could give me some feedback on this matter.

Many thanks!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.snort.org/pipermail/snort-users/attachments/20150903/636b31f8/attachment.html>

More information about the Snort-users mailing list