Commit graph

6849 commits

Author SHA1 Message Date
Robin Sommer
de9f03b0bf New script misc/dump-events.bro, along with core support, that dumps events Bro is raising
in an easily readable form.

This is for debugging purposes, obviously.

Example, including only SMTP events:

    > bro -r smtp.trace misc/dump-events.bro DumpEvents::include=/smtp/

    [...]
    1254722768.219663 smtp_reply
                  [0] c: connection   = [id=[orig_h=10.10.1.4, orig_p=1470/tcp, resp_h=74.53.140.153, [...]
                  [1] is_orig: bool   = F
                  [2] code: count     = 220
                  [3] cmd: string     = >
                  [4] msg: string     = xc90.websitewelcome.com ESMTP Exim 4.69 #1 Mon, 05 Oct 2009 01:05:54 -0500
                  [5] cont_resp: bool = T

    1254722768.219663 smtp_reply
                  [0] c: connection   = [id=[orig_h=10.10.1.4, orig_p=1470/tcp, resp_h=74.53.140.153, [...]
                  [1] is_orig: bool   = F
                  [2] code: count     = 220
                  [3] cmd: string     = >
                  [4] msg: string     = We do not authorize the use of this system to transport unsolicited,
                  [5] cont_resp: bool = T
    [...]
2013-11-22 14:20:00 -08:00
Robin Sommer
08c7dd3d71 Prettyfing Describe() for record types.
If a record type has a name and ODesc is set to short, we now print
the name instead of the full field list.
2013-11-22 13:54:40 -08:00
Jon Siwek
27138b893a Add unit tests for Broxygen config file targets. 2013-11-22 14:59:16 -06:00
Daniel Thayer
6f06705c23 Fix typos in BIF documentation
Fixed typos in documentation of hexstr_to_bytestring.
Also added documentation that was missing for function parameters
and return values of other BIFs.
2013-11-22 14:49:16 -06:00
Jon Siwek
e3f74dc319 Change Broxygen config file format.
"<type> <pattern> <output-file>" seems a more natural order for
specifying targets.
2013-11-22 14:37:07 -06:00
Jon Siwek
98dcfc64a8 Broxygen doc-related test updates. Fix two regressions.
- Fix automatic function parameter documentation formatting for
  record fields that are functions.

- Document redefs in a fixed order.
2013-11-22 14:18:24 -06:00
Jon Siwek
7e0864468c A couple documentation fixes.
- Move notice index wrapper doc to doc/script-reference -- doc/scripts
  no longer contains any static documentation because that location
  will be managed by Bro to generate per-script docs.

- :doc: references for generated per-script docs now need the ".bro"
  suffix.  (IMO this is better since it directly mirrors the actual
  script's file name and can't be confused w/ a package).
2013-11-21 15:59:07 -06:00
Jon Siwek
96ba5c82a3 Merge branch 'master' into topic/jsiwek/broxygen 2013-11-21 15:46:55 -06:00
Jon Siwek
9967aea52c Integrate new Broxygen functionality into Sphinx.
Add a "broxygen" domain Sphinx extension w/ directives to allow
on-the-fly documentation to be generated w/ Bro and included in files.

This means all autogenerated reST docs are now done by Bro.  The odd
CMake/Python glue scipts which used to generate some portions are now
gone.  Bro and the Sphinx extension handle checking for outdated docs
themselves.

Parallel builds of `make doc` target should now work (mostly because
I don't think there's any tasks that can be done in parallel anymore).

Overall, this seems to simplify things and make the Broxygen-generated
portions of the documentation visible/traceable from the main Sphinx
source tree.  The one odd thing still is that per-script documentation
is rsync'd in to a shadow copy of the Sphinx source tree within the
build dir.  This is less elegant than using the new broxygen extension
to make per-script docs, but rsync is faster and simpler.  Simpler as in
less code because it seems like, in the best case, I'd need to write a
custom Sphinx Builder to be able to get that to even work.
2013-11-21 14:34:32 -06:00
Rafael Bonilla
a33d25b3bd New Bro Manual Development Edition and basic.css to fix btest output overflow problem (Update 1). 2013-11-21 12:56:00 -06:00
Vlad Grigorescu
e8b5acba4e Merge branch 'master' of ssh://git.bro.org/bro into topic/vladg/bgp 2013-11-19 20:27:31 -05:00
Vlad Grigorescu
9e0b0f9187 Basic RADIUS support - checkpoint 2013-11-19 20:20:36 -05:00
Robin Sommer
dc52846b6f Updating submodule(s).
[nomail]
2013-11-18 14:04:02 -08:00
Robin Sommer
7cccb857fb Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Update local.bro for Bro 2.2

Adding to BIT-1095.
2013-11-18 14:02:09 -08:00
Daniel Thayer
3effe5df08 Update local.bro for Bro 2.2
Removed some commented-out code that no longer works in Bro 2.2 (because
Notice::policy is now a hook).
2013-11-15 11:39:27 -06:00
Robin Sommer
f18f9511ac Updating submodule(s).
[nomail]
2013-11-15 07:06:00 -08:00
Jon Siwek
4f6d01000a Implement majority of Broxygen features delegated to Bro.
Still have to update the Sphinx integration.
2013-11-14 14:00:51 -06:00
Daniel Thayer
7025d511e4 Update the documentation of types and attributes
Documented the new substring extraction functionality.
Clarified the description of "&priority" and "void".
Also fixed various typos.
2013-11-13 16:45:43 -06:00
Robin Sommer
3d1fd6ca5e Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Fix the irc_reply event for certain server message types.
2013-11-11 13:48:50 -08:00
Robin Sommer
1e31538829 Merge remote-tracking branch 'origin/topic/bernhard/ticket1094'
* origin/topic/bernhard/ticket1094:
  Add minimal testcase for sqlite writer crash.
  Fixed Segmentation fault in SQLite Writer.

BIT-1094 #merged
BIT-1095 #comment Add to 2.2.1
2013-11-11 13:42:52 -08:00
Bernhard Amann
81d0def327 Add minimal testcase for sqlite writer crash.
The writer did not work with a non-empty set or vector
as the last element in the logged column.
2013-11-10 22:04:16 -08:00
Jon Crussell
cb6f6467c7 Fixed Segmentation fault in SQLite Writer.
Segmentation fault caused by accessing fields with pos which is
one-based for setting SQLite field values. Fix is to simply subtract one
from pos. Discovered when trying to store HTTP traffic to a SQLite
database with the following Bro script:

event bro_init() {
  local filter: Log::Filter = [
    $name = "sqlite",
    $path = "http",
    $config = table(["tablename"] = "http_logs"),
    $writer = Log::WRITER_SQLITE
  ];

  Log::add_filter(HTTP::LOG, filter);
}
2013-11-10 22:02:24 -08:00
Seth Hall
1e43dfc46a Fix the irc_reply event for certain server message types. 2013-11-08 16:49:03 -05:00
Seth Hall
cc314084a8 Fix the irc_reply event for several server message types. 2013-11-08 16:47:22 -05:00
Robin Sommer
071bd2689d Updating CHANGES and VERSION. 2013-11-07 10:26:35 -08:00
Robin Sommer
48117eda37 Removing one more "beta". 2013-11-07 10:25:50 -08:00
Robin Sommer
91a6fb9af7 Updating submodule(s).
[nomail]
2013-11-07 07:09:29 -08:00
Robin Sommer
1164fdfb46 Removing location information from ssh.log in external tests. 2013-11-07 02:19:23 -08:00
Robin Sommer
18ba9a1626 Updating submodule(s).
[nomail]
2013-11-07 01:22:21 -08:00
Robin Sommer
ba258ab865 Updating CHANGES and VERSION. 2013-11-07 01:21:20 -08:00
Robin Sommer
da9c31db55 Fixing warnings during doc build.
Includes adding a stub file that has been missing for a while already.
2013-11-07 00:46:48 -08:00
Robin Sommer
f46e4a5578 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Fix typos in sumstats doc and update doc test
  Update docs and tests for a recent change to detect-MHR.bro
  Update tests and baselines for sumstats docs
2013-11-06 22:55:01 -08:00
Daniel Thayer
410e4babd0 Fix typos in sumstats doc and update doc test 2013-11-06 18:56:39 -06:00
Daniel Thayer
85d8653bce Update docs and tests for a recent change to detect-MHR.bro 2013-11-06 15:58:24 -06:00
Daniel Thayer
9ed5f8bae8 Update tests and baselines for sumstats docs 2013-11-06 14:56:32 -06:00
Seth Hall
0a1ee9af1b Merge remote-tracking branch 'origin/topic/vladg/ssh-log-fix'
* origin/topic/vladg/ssh-log-fix:
  Remove resp_size from the log. Refactor when we write out to the log a bit. Geodata now works reliably.
  Fix resp_size in ssh.log, require a minimum resp_size for the heuristic. Some work on geodata, but still a WIP.
2013-11-06 14:42:02 -05:00
Seth Hall
ef33696d2e Merge branch 'master' of ssh://git.bro-ids.org/bro 2013-11-06 13:52:38 -05:00
Seth Hall
fab47cc749 Added a document for the SumStats framework. 2013-11-06 13:52:29 -05:00
Robin Sommer
bd4cc712c5 Updating submodule(s).
[nomail]
2013-11-06 07:22:27 -08:00
Robin Sommer
dc6ef20511 Updating submodule(s).
[nomail]
2013-11-06 00:23:51 -08:00
Robin Sommer
2fbc50b4a6 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Change MHR notice sub message URL to a redef.
  Update VirusTotal URL to work with changes to their website.
2013-11-06 00:20:52 -08:00
Jon Siwek
bdd359d58c Broxygen can now read a config file specifying particular targets.
Though nothing currently gets built as most dependency/outdated
checks and doc-generation methods are still skeleton code.
2013-11-05 16:40:24 -06:00
Vlad Grigorescu
8ad2ab44e2 Change MHR notice sub message URL to a redef. 2013-11-05 17:10:19 -05:00
Vlad Grigorescu
09779836cb Update VirusTotal URL to work with changes to their website. 2013-11-05 12:06:33 -05:00
Vlad Grigorescu
d108481e73 Remove resp_size from the log. Refactor when we write out to the log a bit. Geodata now works reliably. 2013-11-05 11:58:00 -05:00
Jon Siwek
1fabbd441c Remove unneeded Broxygen comments in scan.bro.
They just duplicated the text from where the events are originally
declared and also it's not generally useful to Broxygen-style comment
event *handlers* (they're more of an implementation detail of a script,
not a user-facing element).
2013-11-05 10:54:05 -06:00
Vlad Grigorescu
2cf90d986e Fix resp_size in ssh.log, require a minimum resp_size for the heuristic. Some work on geodata, but still a WIP. 2013-11-05 11:34:32 -05:00
Jon Siwek
3046013d69 Replace safe_basename/safe_dirname w/ SafeBasename/SafeDirname.
So errors can be better handled.
2013-11-04 11:42:39 -06:00
Jon Siwek
96ed7aed1a Merge branch 'master' into topic/jsiwek/broxygen 2013-11-04 10:17:24 -06:00
Robin Sommer
886266e8af Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Remove swig-ruby from required packages section of install doc
2013-11-03 22:53:54 -08:00