Commit graph

11634 commits

Author SHA1 Message Date
Seth Hall
c7e52db7ee Initial DNS analysis scripts. 2011-04-12 16:55:53 -04:00
Seth Hall
31c7e56a14 New var and func: local_zones: set[string] and is_local_name(string): bool
It can be used to discover if a DNS zone can be considered local
with the is_local_name function.
2011-04-12 13:11:06 -04:00
Jon Siwek
7d2938dac6 Adding files to CMake build targets so they show up in generated IDE projects.
This includes flex/bison/binpac/bifcl input files as well as C/C++ header
files.  Header files for the bro target are determined dynamically at
configure time from a given list of source files.

This addresses #413.
2011-04-12 12:01:04 -05:00
Jon Siwek
c732cef69b Fix unnecessary config.h preprocessor (re)definitions.
The CMake-generated config.h would redundantly define some types to
themselves, causing lots of warning in some cases (e.g. Xcode build).

This addresses #414
2011-04-11 16:59:07 -05:00
Seth Hall
d5d9475ae8 New smtp.bro to load sub-scripts. 2011-04-11 16:00:39 -04:00
Seth Hall
ed654acd5d Tweak to hide passwords in FTP logs. 2011-04-11 15:57:28 -04:00
Seth Hall
6f3398f796 Initial work on new smtp.bro
* Logging activity is currently focused on messages.
* Does command oriented logging still make sense for SMTP?
* Remaining (known) weak points:
	* Poor handling of wrapped message headers.
	* Poor separation into various scripts by functionality.
		* base.bro will likely include nothing after 'DATA'.
	* Out of order command/response pairs are not supported yet.
2011-04-11 15:56:32 -04:00
Seth Hall
f5c7400f0b Small tweak to provide customization point in http/file-extract.bro
The customization point is provided between the time a file
to be extracted has it's file handled opened and when the first
chunk of data is written to disk.
2011-04-11 15:52:28 -04:00
Jon Siwek
515b96685a Fix generated docs displaying "func" for events in identifier summary table. 2011-04-11 10:32:07 -05:00
Jon Siwek
0a14cd11f6 Move generated script doc for "private interface" to bottom of page. 2011-04-11 10:29:41 -05:00
Seth Hall
e1724bf286 HTTP cleanups.
* Multiple pipelined requests before any replies is now supported.
* HTTP::build_url function that takes a connection and builds a
  url current request/response pair.
* I left in an example to show a likely bug with the record
  extension mechanism.
2011-04-08 22:38:39 -04:00
Seth Hall
34de0958e5 DPD cleanup 2011-04-08 22:34:54 -04:00
Jon Siwek
552a70c563 Make doc build target depend on doc-clean to prevent accumulation of junk
Sphinx was adding a new .bro script in the HTML output directory regardless
of whether the source script differed.
2011-04-08 14:26:51 -05:00
Jon Siwek
057ad684d8 Add brief descriptions for classes involved in generation of script docs. 2011-04-08 12:30:06 -05:00
Jon Siwek
af54714839 Add tests for auto-generating reST from bro scripts. 2011-04-08 12:02:03 -05:00
Jon Siwek
3ad5f0559d Remove empty private interface sections from generated script docs. 2011-04-08 10:16:44 -05:00
Seth Hall
62bae54393 Updates for logging framework and development style. 2011-04-07 22:21:56 -04:00
Jon Siwek
7d261dcb55 Merge branch 'master' into topic/jsiwek/doc-framework
Conflicts:
	src/main.cc
2011-04-07 16:44:29 -05:00
Jon Siwek
c81b83475a Fix table/set type naming in summary table of generated script docs 2011-04-07 16:19:09 -05:00
Jon Siwek
cb68371006 Generated bro docs now track non-enum redefs.
But currently only as cross-referencing links.  Tracking exactly how redefs
modify values would require more work.
2011-04-07 16:11:35 -05:00
Seth Hall
1883a169e4 Cleanup to the ftp.bro script 2011-04-07 16:48:01 -04:00
Jon Siwek
a7d8d9e1d6 Modifying bifcl to pass "##" comments into the .bro file being generated.
This will allow .bif files to be documented in the same manner as regular
bro scripts.
2011-04-07 13:02:09 -05:00
Jon Siwek
35fdba23ea Fix wrong delete syntax in CommentedEnumType 2011-04-07 12:34:57 -05:00
Jon Siwek
b8f6c5bc7d Improving documention for the Bro script document-generation process
Some minor organizational revisions to the python scripting.
2011-04-06 16:39:50 -05:00
Seth Hall
ed1ff0b0e9 Merge branch 'master' into topic/policy-scripts-new 2011-04-06 16:53:49 -04:00
Jon Siwek
f3b1a6bb9e Implementing capability to logically group generated policy script docs 2011-04-06 14:38:35 -05:00
Jon Siwek
e4e7a26ba1 Add :download: role to reST docs for linking to original script source files.
This role allows Sphinx to copy non-reST files in the source tree into
the output tree.
2011-04-06 12:12:21 -05:00
Jon Siwek
7593d4d368 Don't warn about generating reST script documentation for stdin 2011-04-06 12:08:23 -05:00
Jon Siwek
5183ab409b Initial implementation of a make doc target to generate script docs. 2011-04-06 12:06:39 -05:00
Robin Sommer
5629359a87 Test commit. 2011-04-05 16:28:55 -07:00
Robin Sommer
0257bd304e Adding language directory to btest.cfg. 2011-04-05 16:23:49 -07:00
Robin Sommer
9a12443f76 Merge branch 'master' into topic/robin/record-table-default 2011-04-05 16:23:07 -07:00
Robin Sommer
050680aa63 Adding new environment variable BRO_SEED_FILE to set the seed file for
the random number generator.

This works like the corresponding command line option but is more
convinient when writing tests as it can be set in btest.cfg.
2011-04-05 16:21:43 -07:00
Robin Sommer
0a97a9e82a Fixing attributes to allow &default in tables/sets to be associated
with the field.

This works now:

    type X: record {
        a: table[string] of bool &default=table( ["foo"] = T );
        b: table[string] of bool &default=table();
        c: set[string] &default=set("A", "B", "C");
        d: set[string] &default=set();
    };

I think previously the intend was to associate &default with the
table/set (i.e., define the default value for non-existing indices).
However, that was already not working: the error checking was
reporting type mismatches. So, this shouldn't break anything and make
things more consistent.
2011-04-05 16:20:27 -07:00
Seth Hall
d56848ce84 Merge branch 'topic/policy-scripts-new' of ssh://git.bro-ids.org/bro into topic/policy-scripts-new 2011-04-04 14:44:26 -04:00
Jon Siwek
bd523f2905 Automatic reST doc markup for event/function params/return comments
For a bro script that is documented like:

  ## ...
  ## bar: ...
  ## Returns: ...
  global foo(bar: string): string;

the generated reST documentation will automatically substitute meaningful
markup (reST field lists) for the parameter and return type comments
2011-04-04 12:29:48 -05:00
Seth Hall
85b8515928 Small rework to FTP.bro 2011-04-04 12:01:12 -04:00
Seth Hall
10247abbbc More HTTP rework.
* New script: http/file-extract.bro
* New script: http/file-ident.bro
* New script: http/file-hash.bro
* Lot of cleanup.  The output logs are better than before.
2011-04-04 12:00:07 -04:00
Seth Hall
7cffd0b1e6 Beginning of signature.bro rewrite. 2011-04-04 11:54:57 -04:00
Seth Hall
60dae5bba9 More FTP rework. 2011-04-04 11:54:25 -04:00
Robin Sommer
68a30a0b5a Updating submodule(s). 2011-04-01 16:29:15 -07:00
Robin Sommer
03c0d587a4 Removing code for unused hash functions. 2011-04-01 16:09:28 -07:00
Robin Sommer
4677174aa4 Merge remote branch 'origin/topic/robin/comm-ssl'
The merge does not include the hack to switch back to 32-bit for
Broccoli. It does contain a version of the SSL tests converted to
btest, which however doesn't pass yet (as some of the others as well)

* origin/topic/robin/comm-ssl:
  Fixing crashes when SSL is not configured correctly.
  Adding a test for SSL-based communciation to the istate testsuite.
2011-04-01 15:57:07 -07:00
Robin Sommer
a3a075174b Merging in 'topic/robin/cleanup-rewriter'.
Removing everything related to trace rewriting.

(I wasn't too careful in ensuring that I catch everything in the
scripts; Seth is working on those anyway.)

(Merging by cherry-picking the corresponding commit, as the branch was
accidentally made off of the logging stuff).
2011-04-01 15:23:50 -07:00
Robin Sommer
ec1b2b4d2a Merge branch 'topic/robin/cleanup-dfa-cache'
* topic/robin/cleanup-dfa-cache:
  Removing the EXPIRE_DFA_STATES code.
2011-04-01 14:52:27 -07:00
Robin Sommer
3a5384907f Merge branch 'topic/robin/cleanup-active-mapping'
* topic/robin/cleanup-active-mapping:
  Removing active mapping.
2011-04-01 14:42:22 -07:00
Jon Siwek
758172120b Revising format of initialization values in generated script docs.
Fixed the obvious things: reduced the space taken up by empty tables
and allowed record values to span multiple lines (one for each record field).
2011-04-01 15:21:15 -05:00
Don Appleman
d2968c7f59 Added #include <algorithm> to fix a build problem 2011-04-01 13:01:41 -05:00
Jon Siwek
2d17ca0942 Generated script docs now have a new summary section.
It's a table listing all the identifiers in the script's public interface
and an optional, brief (one-sentence) description of each.
2011-04-01 12:30:22 -05:00
Jon Siwek
cf45ae19e1 Generated script docs can now link to the original source.
The original bro source file needs to be copied to the same directory
that Sphinx outputs the rendered html.
2011-03-30 10:24:44 -05:00