<div dir="ltr">OK, editing is complete. It was quite minimal, as the only change was to that init function syntax.<div><br></div><div>Regards,</div><div><span style="line-height:1.5">Nasir</span></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jan 19, 2016 at 8:11 AM Jason Ish <<a href="mailto:lists@unx.ca">lists@unx.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Nasir,<br>
<br>
I've unlocked the wiki page, please keep your edits minimal so I can<br>
merge them into the new doc.<br>
<br>
At some point, doc updates like this will be a pull request. A bit<br>
more work than a wiki edit, but will keep the docs versioned along<br>
with Suricata.<br>
<br>
Thanks,<br>
Jason<br>
<br>
<br>
On Tue, Jan 19, 2016 at 6:53 AM, Nasir Bilal <<a href="mailto:bilalbox@gmail.com" target="_blank">bilalbox@gmail.com</a>> wrote:<br>
> Hey Peter,<br>
><br>
> I'd love to, but it looks like that page is migrated and no longer editable:<br>
> "Do not edit. This page has been migrated. See<br>
> Converting_Wiki_Documentation_to_Sphinx."<br>
> <a href="https://redmine.openinfosecfoundation.org/projects/suricata/wiki/Lua_Output" rel="noreferrer" target="_blank">https://redmine.openinfosecfoundation.org/projects/suricata/wiki/Lua_Output</a><br>
><br>
> I see how to convert the wiki documents at that link, but how do you edit<br>
> them after that?<br>
><br>
> Thanks,<br>
> Nasir<br>
><br>
> On Tue, Jan 19, 2016 at 5:45 AM Peter Manev <<a href="mailto:petermanev@gmail.com" target="_blank">petermanev@gmail.com</a>> wrote:<br>
>><br>
>> On Sat, Jan 16, 2016 at 6:37 AM, Nasir Bilal <<a href="mailto:bilalbox@gmail.com" target="_blank">bilalbox@gmail.com</a>> wrote:<br>
>> > After perusing the documentation and commit history more carefully, it<br>
>> > looks<br>
>> > like my syntax was just extremely messed up. However, there are two<br>
>> > different sets of verbage used: that in the documentation, and that in<br>
>> > the<br>
>> > actually committed code:<br>
>> ><br>
>> > Documentation states that in order to be able to use TLS keywords in LUA<br>
>> > scripts we need to use the following init statement:<br>
>> > function init (args)<br>
>> > local needs = {}<br>
>> > needs["protocol"] = "tls"<br>
>> > return needs<br>
>> > end<br>
>> ><br>
>> > However, when I attempt to load a rulebase that includes rules<br>
>> > referencing a<br>
>> > LUA script with the 'needs["protocol"]' line in it, I get the follow<br>
>> > error<br>
>> > when running suricata 3.0RC3:<br>
>> > qnadmin@qn1:/etc/suricata/rules$ sudo suricata -c<br>
>> > /etc/suricata/suricata.yaml -q 0 --init-errors-fatal<br>
>> > 16/1/2016 -- 00:14:06 - <Notice> - This is Suricata version 3.0RC3<br>
>> > RELEASE<br>
>> > 16/1/2016 -- 00:14:06 - <Error> - [ERRCODE: SC_ERR_LUA_ERROR(212)] -<br>
>> > unsupported data type protocol<br>
>> > 16/1/2016 -- 00:14:06 - <Error> - [ERRCODE:<br>
>> > SC_ERR_INVALID_SIGNATURE(39)] -<br>
>> > error parsing signature "reject tls $EXTERNAL_NET any -> $HOME_NET any<br>
>> > (msg:"HTTPS $$$ - DROPPED"; flow:established,to_client;<br>
>> > luajit:bl_shopping_https.lua; sid:10001008; rev:1;)" from file<br>
>> > /etc/suricata/rules/drop.rules at line 37<br>
>> > 16/1/2016 -- 00:14:06 - <Error> - [ERRCODE: SC_ERR_NO_RULES_LOADED(43)]<br>
>> > -<br>
>> > Loading signatures failed.<br>
>> ><br>
>> > However, in the commit history I find a different syntax required for<br>
>> > the<br>
>> > init function (which works):<br>
>> ><br>
>> > lua: TLS support<br>
>> ><br>
>> > Support TLS in Lua detection scripts.<br>
>> ><br>
>> > function init (args)<br>
>> > local needs = {}<br>
>> > needs["tls"] = tostring(true)<br>
>> > return needs<br>
>> > end<br>
>> ><br>
>> ><br>
>> > I know that the "procotol" keyword should be active in 3.0RC3 per the<br>
>> > documentation, so is this a temporary issue? Or should I go in and<br>
>> > update<br>
>> > the documentation?<br>
>><br>
>> Yes - i can confirm that. The init function's correct statement is "<br>
>> needs["tls"] = tostring(true) "<br>
>> Do you mind updating that part of the wiki docs?<br>
>><br>
>><br>
>> ><br>
>> > Thanks again all for your support!<br>
>> > Nasir<br>
>><br>
>><br>
>><br>
>> --<br>
>> Regards,<br>
>> Peter Manev<br>
</blockquote></div>