# Requesting help for adding dns-request on Bro signature langage please

**URL:** <https://community.zeek.org/t/requesting-help-for-adding-dns-request-on-bro-signature-langage-please/2413>\
**Category:** Zeek\
**Created:** [August 20, 2012, 10:22pm UTC](https://community.zeek.org/t/requesting-help-for-adding-dns-request-on-bro-signature-langage-please/2413 "2012-08-20T22:22:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rmkml2](https://avatars.discourse-cdn.com/v4/letter/r/b487fb/32.png) [@rmkml2](https://community.zeek.org/u/rmkml2)\
**Post date:** [August 20, 2012, 10:22pm UTC](https://community.zeek.org/t/requesting-help-for-adding-dns-request-on-bro-signature-langage-please/2413/1 "2012-08-20T22:22:10Z")

</div>

Hi,

Im try to add new "dns-request" keyword on Bro Signature langage, but it's not fire.  
Anyone help please? (Im not a C++/developper)

ok Im test on bro v2.0 on linux plateform.

Modified two files, first is src/Rule.h :

@@ -37,7 +37,7 @@

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enum PatternType {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PAYLOAD, HTTP\_REQUEST, HTTP\_REQUEST\_BODY, HTTP\_REQUEST\_HEADER,  
- HTTP\_REPLY\_BODY, HTTP\_REPLY\_HEADER, FTP, FINGER, TYPES,  
+ HTTP\_REPLY\_BODY, HTTP\_REPLY\_HEADER, DNS\_REQUEST, FTP, FINGER, TYPES,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bool Active() { return active; }

Second change are src/DNS.cc :

@@ -1093,6 +1093,8 @@  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ( buf\_n \< msg\_size )  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Haven't filled up the message buffer yet, no more to do.  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;  
+ Conn()-\>Match(Rule::DNS\_REQUEST, (const u\_char\*) msg\_buf,  
+ msg\_size, true, true, 1, true);

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ForwardPacket(msg\_size, msg\_buf, orig, -1, 0, 0);

With this new signature:  
&nbsp;&nbsp;dns-request /.\*g.\*/

Regards  
Rmkml

[http://twitter.com/rmkml](http://twitter.com/rmkml)

---

<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:40pm UTC](https://community.zeek.org/t/requesting-help-for-adding-dns-request-on-bro-signature-langage-please/2413/2 "2022-05-06T15:40:31Z")

</div>


