[Bro-Dev] #869: Mechanism for discovering current script name
Bro Tracker
bro at tracker.bro-ids.org
Thu Aug 23 12:32:02 PDT 2012
#869: Mechanism for discovering current script name
-----------------------------+------------------------
Reporter: seth | Owner:
Type: Feature Request | Status: new
Priority: Normal | Milestone: Bro2.2
Component: Bro | Version: git/master
Keywords: language |
-----------------------------+------------------------
It would help to make scripts more modular if we could discover the
current directory for the script on disk. This came from when I was
trying to package a script into a module directory and I wanted to have a
shell script along with it but I couldn't find the shell script reliably
because I didn't know where the script was sitting on disk.
The only major problem I can see with it is if it's possible to make the
data available within events or if it should only be something for code
outside of events. Either way would work fine and in my opinion the
simpler option should win.
The current hack around this is to use the bro_script_loaded event to find
some "unique" file name and discover the path from there.
--
Ticket URL: <http://tracker.bro-ids.org/bro/ticket/869>
Bro Tracker <http://tracker.bro-ids.org/bro>
Bro Issue Tracker
More information about the bro-dev
mailing list