Commit graph

3113 commits

Author SHA1 Message Date
Seth Hall
c564f545c0 Updates and tests for netbios name BiF.
* New BiF named: decode_netbios_name_type
* \x01 and \x02 are now decoded because I saw those
  bytes being actively used in names.
2011-04-20 15:59:11 -04:00
Seth Hall
5c47f1b155 Many more script updates. 2011-04-20 08:53:22 -04:00
Seth Hall
58f3b3921d Merge remote branch 'origin/topic/robin/logging-internals' into topic/policy-scripts-new 2011-04-19 22:54:32 -04:00
Seth Hall
cba5766bc8 Fixed the do_split bug and added a test.
* do_split was having a problem if there was another match
  after the end of the number of separators.  It would only
  return the match up to the point of the next match instead
  of the rest of the string.
2011-04-19 22:24:46 -04:00
Seth Hall
7a1fd6498c Merge remote branch 'origin/topic/robin/logging-internals' into topic/policy-scripts-new 2011-04-19 20:35:00 -04:00
Robin Sommer
5a6311d360 Implementing a VectorCoerceExpr.
Turns out we didn't have that yet.

I don't remember who implemented vectors originally, but he does owe
us all round at Jupiter ...
2011-04-19 16:58:18 -07:00
Robin Sommer
b3b5a73113 Fixing problem with optional fields. 2011-04-19 16:22:40 -07:00
Robin Sommer
a4a47c3df1 Merge remote branch 'origin/topic/seth/count_to_addr'
* origin/topic/seth/count_to_addr:
  Adjusting BiF name to indicate v4 addresses only.
  count_to_addr function
2011-04-19 15:52:16 -07:00
Seth Hall
61be2f5bd3 Adjusting BiF name to indicate v4 addresses only.
* Function is now named count_to_v4_addr
2011-04-19 00:30:56 -04:00
Robin Sommer
e7bde27f2d Merge remote branch 'origin/topic/jsiwek/doc-framework' 2011-04-18 14:54:23 -07:00
Seth Hall
dfd9b40466 count_to_addr function
* Updates to_count to cope with 64bit ints.
* Adds count_to_addr which will turn a count into an IPv4 address.
* Includes tests.
2011-04-18 15:22:48 -04:00
Seth Hall
3b4e452e66 Readding the software parse testing script. 2011-04-18 14:22:21 -04:00
Seth Hall
2464cc6e37 Merge remote branch 'origin/topic/robin/logging-internals' into topic/policy-scripts-new
Conflicts:
	policy.old/dns-anonymizer.bro
	policy.old/ftp-anonymizer.bro
	policy.old/http-anonymizer.bro
	policy.old/http-rewriter.bro
	policy.old/ident-rewriter.bro
	policy.old/smb-anonymizer.bro
	policy.old/smtp-rewriter.bro
	policy/all.bro
	policy/ftp.bro
	policy/smtp.bro
2011-04-18 11:56:34 -04:00
Robin Sommer
29b0d0d1d9 Files can now be logged; their filename will be written out. 2011-04-17 20:52:18 -07:00
Robin Sommer
65016dc5e8 Updating istate tests.
Some still don't pass:

    - events-ssl doesn't work; not clear yet why, there may be some
      problem with SSL connections.

    - broccoli needs the changes topic/jsiwek/64bit-val-fix, plus
    adaption of the protocol version.

    - pybroccoli crashes even with the 64bit-val-fix changes. Reason
      unclear.
2011-04-17 19:53:56 -07:00
Robin Sommer
c132506203 Merge branch 'topic/robin/record-table-default' into topic/robin/logging-internals
Includes additional fixes for the &default attribute's type checking.
2011-04-17 12:03:58 -07:00
Robin Sommer
09d37b2026 Fixing logging filter "include" and "exclude" options. 2011-04-17 11:14:07 -07:00
Robin Sommer
58f86ae55d Fixing bug with records sometimes unnecessarily coerced on assignment. 2011-04-17 10:42:51 -07:00
Don Appleman
4ca7ff095a Initial drop of testing/btest/README with description of the contents of the testing/btest directory, how to run BTest, and how to add a new test. 2011-04-14 13:57:10 -05: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
Jon Siwek
af54714839 Add tests for auto-generating reST from bro scripts. 2011-04-08 12:02:03 -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
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
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
bc39f9f048 Porting the istate tests to btest.
Note that currently most of them don't pass because (i) the code
adding the environment variable for seeding the RNG has not been
merged into master yet; and (2) Broccoli to Bro communication is
currently broken because of the int64 problem. Once these are fixed,
then baselines need to be recreated and checked.

Therefore, the istate tests aren't activated in btest.cfg yet.
2011-03-29 21:46:06 -07:00
Robin Sommer
3562682ac9 Merge remote branch 'origin/topic/appleman/unittests'
Note that I've shifted things around a little bit. The traces are now
in Traces/* (capital T), and the known-hosts-test in policy/*.
Scripts/ was meant just for helper shell scripts for the testing
framework. Also, I've not yet included "policy" in btest.cfg as a
TestDir because the corresponding script is not yet in master.

* origin/topic/appleman/unittests:
  Test, trace file, and baseline for testing the known-services policy script
  Baseline for KNOWN-HOSTS tesT
  Initial drop of known-hosts unit test, with tracefile and directory structure, as well as c ouple of files pulled from Robin's logging branch.
2011-03-29 21:43:34 -07:00
Seth Hall
4943a87205 Merge remote branch 'origin/topic/robin/logging-internals' into topic/policy-scripts-new 2011-03-29 10:21:01 -04:00
Robin Sommer
1cbde793d8 Merge branch 'topic/robin/extend-records' into topic/robin/logging-internals
Includes some fixes for using &log with record-extension.
2011-03-28 18:56:19 -07:00
Robin Sommer
38a1aa5a34 &log keyword, and vector logging.
The &log keyword now operates as discussed:

    - When associated with individual record fields, it defines them
      as being logged.

    - When associated with a complete record type, it defines all fields
      to be logged.

    - When associated with a record extension, it defines all added
      fields to be logged.

    Note that for nested record types, the inner fields must likewise
    be declared with &log. Consequently, conn_id is now declared with
    &log in bro.init.

Vectors are now allowed to be logged and will be recorded as an
ordered set of items.
2011-03-28 18:14:05 -07:00
Don Appleman
ebb4eb552a Test, trace file, and baseline for testing the known-services policy script 2011-03-25 16:17:27 -05:00
Don Appleman
c81f1889a5 Baseline for KNOWN-HOSTS tesT 2011-03-24 13:28:48 -05:00
Don Appleman
638eb2f8eb Initial drop of known-hosts unit test, with tracefile and directory structure, as well as c ouple of files pulled from Robin's logging branch. 2011-03-24 11:27:21 -05:00
Seth Hall
fdd8ce4e57 Another software test and fixes to version parsing. 2011-03-17 14:55:58 -04:00
Seth Hall
8faca52add Software parsing test updates. 2011-03-17 14:29:25 -04:00
Seth Hall
f4b27016cf Merge commit '878d263f11' into topic/policy-scripts-new
* commit '878d263f11':
  More tests for default software parsing function.
2011-03-16 17:04:26 -04:00
Seth Hall
86a127de44 Merge commit 'febfd4cf04' into topic/policy-scripts-new
* commit 'febfd4cf04':
  Better software version parsing.
2011-03-16 17:04:16 -04:00
Seth Hall
9384fbd968 Merge commit '50acf152bd' into topic/policy-scripts-new
* commit '50acf152bd':
  More software fixes (and successful tests!).
2011-03-16 17:03:45 -04:00
Seth Hall
25318de82d Merge commit '65c3cb6faf' into topic/policy-scripts-new
* commit '65c3cb6faf':
  Updates for detecting and logging software.
2011-03-16 17:03:40 -04:00
Seth Hall
878d263f11 More tests for default software parsing function. 2011-03-14 17:01:45 -04:00
Seth Hall
febfd4cf04 Better software version parsing.
* $addl field now parsed out in many cases.
* A few new tests for web browser versions.
  * Browers user-agents need preprocessed though.
* All tests pass.
2011-03-14 15:41:45 -04:00
Seth Hall
50acf152bd More software fixes (and successful tests!).
* SSH now removes the protocol information for detecting the actual software and not protocol used.
* Updates for the default version parsing.
* No longer testing default version parsing for the $addl field.  It doesn't seem to be generically extractable.
2011-03-11 15:07:07 -05:00
Seth Hall
65c3cb6faf Updates for detecting and logging software.
* Tests for the default software version parsing (showing how broken it is!)
* Software::cmp_versions(v1: Version, v2: Version) is now exported
* Many small naming tweaks to adjust to namespaces.
2011-03-11 13:51:31 -05:00
Robin Sommer
0f854315e9 New test. 2011-03-10 18:18:58 -08:00
Robin Sommer
871561939b Updating baselines. 2011-03-09 19:42:24 -08:00
Robin Sommer
170a8bd403 Setting random number generator seed in btest.cfg. 2011-03-09 19:42:24 -08:00
Robin Sommer
89e8ea7353 Enums are now logged with their ID names, not anymore with their
numerical values.
2011-03-09 18:06:50 -08:00
Robin Sommer
c6e3174bc8 The logging systems now supports fields of type set[<atomic_type>]. 2011-03-09 18:01:41 -08:00
Robin Sommer
52c54859b6 Bugfix: the header line was ending with a separator.
Test baselines needed adaption as well.
2011-03-09 16:55:29 -08:00