# Determine potential events with a specific set of \*.bro scripts

**URL:** https://community.zeek.org/t/determine-potential-events-with-a-specific-set-of-bro-scripts/1464
**Category:** Zeek
**Created:** [December 5, 2008, 6:31pm UTC](https://community.zeek.org/t/determine-potential-events-with-a-specific-set-of-bro-scripts/1464 "2008-12-05T18:31:42Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Matthias\_Vallentin2](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@Matthias\_Vallentin2](https://community.zeek.org/u/Matthias_Vallentin2)
#### Post date: [December 5, 2008, 6:31pm UTC](https://community.zeek.org/t/determine-potential-events-with-a-specific-set-of-bro-scripts/1464/1 "2008-12-05T18:31:42Z")

</div>

Hi,

I would like to determine which events could potentially be generated  
after loading a specific set of scripts. Has anyone tried this before?

In this context, I remember seeing a script some time ago, that created  
a dependency/include graph of \*.bro policy files. Unfortunately, I lost  
track of it.

&nbsp;&nbsp;&nbsp;Matthias

---

<div class="post-metadata">

### Author: ![Vern](https://yyz1.discourse-cdn.com/flex011/user_avatar/community.zeek.org/vern/32/630_2.png) [@Vern](https://community.zeek.org/u/Vern)
#### Post date: [December 5, 2008, 10:09pm UTC](https://community.zeek.org/t/determine-potential-events-with-a-specific-set-of-bro-scripts/1464/2 "2008-12-05T22:09:22Z")

</div>

> I would like to determine which events could potentially be generated  
> after loading a specific set of scripts. Has anyone tried this before?

Internal to Bro there's an analysis of which declared events do not  
have any means of being generated (this is the reporting enabled by  
redef check\_for\_unused\_event\_handlers = T). It should be straightforward  
to tweak that to report on which events \*can\* be generated.

> In this context, I remember seeing a script some time ago, that created  
> a dependency/include graph of \*.bro policy files. Unfortunately, I lost  
> track of it.

(I don't recall this either.)

&nbsp;&nbsp;&nbsp;&nbsp;Vern

---

<div class="post-metadata">

### Author: ![Christian\_Kreibich3](https://avatars.discourse-cdn.com/v4/letter/c/4af34b/32.png) [@Christian\_Kreibich3](https://community.zeek.org/u/Christian_Kreibich3)
#### Post date: [December 6, 2008, 1:47am UTC](https://community.zeek.org/t/determine-potential-events-with-a-specific-set-of-bro-scripts/1464/3 "2008-12-06T01:47:26Z")

</div>

I think you're referring to the plot I made a long time ago of the @load  
structure of the policy files:

&nbsp;&nbsp;[http://www.icir.org/christian/bro/brodep.pdf](http://www.icir.org/christian/bro/brodep.pdf)

Alas, I can't seem to find any of the scripts I used. It only took a few  
minutes to create though, using GraphViz.

---

<div class="post-metadata">

### Author: ![Matthias\_Vallentin2](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@Matthias\_Vallentin2](https://community.zeek.org/u/Matthias_Vallentin2)
#### Post date: [December 7, 2008, 6:48pm UTC](https://community.zeek.org/t/determine-potential-events-with-a-specific-set-of-bro-scripts/1464/4 "2008-12-07T18:48:18Z")

</div>

Thanks for the pointer, I attached a little patch that does exactly  
that.

&nbsp;&nbsp;&nbsp;Matthias

[dump\_used\_event\_handlers.patch](https://community.zeek.org/uploads/short-url/d2wGytpBeoZPRXcm7YJpMl5Wp0N.patch) (3 KB)

---

<div class="post-metadata">

### Author: ![Matthias\_Vallentin2](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@Matthias\_Vallentin2](https://community.zeek.org/u/Matthias_Vallentin2)
#### Post date: [December 7, 2008, 6:53pm UTC](https://community.zeek.org/t/determine-potential-events-with-a-specific-set-of-bro-scripts/1464/5 "2008-12-07T18:53:49Z")

</div>

Yes, that's the labyrinthine picture I had in my mind. Crazy...

&nbsp;&nbsp;&nbsp;Matthias

---

<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:38pm UTC](https://community.zeek.org/t/determine-potential-events-with-a-specific-set-of-bro-scripts/1464/6 "2022-05-06T15:38:48Z")

</div>


