Skip to content

Commit

Permalink
Merge branch 'topic/jazoff/reorg-integration'
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinAzoff committed Oct 26, 2016
2 parents 8e82d98 + d3b5640 commit 158a852
Show file tree
Hide file tree
Showing 103 changed files with 220 additions and 196 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
title: Bro Datatypes
pcaps:
pred: redefinitions
succ: script-exercise-2

Bro Datatypes
===================
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
title: Composite Datatypes
pcaps:
pred: hook
succ: set

Composite Datatypes
===================
Expand Down
4 changes: 4 additions & 0 deletions manager/static/examples/basics/composite-types/index
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set
table
vector
record
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
title: record
pcaps:
pred: vector
succ: redefinitions

Record
=======
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
title: Set
pcaps:
pred: composite-types
succ: table

Set
===================
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
title: Table
pcaps:
pred: set
succ: vector

Table
===================
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
title: Vector
pcaps:
pred: table
succ: record

Vector
=======
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions manager/static/examples/basics/control-flow/index
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
if
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
title: Event
pcaps:
pred: solution-switch-exercise
succ: hook

Event
===================
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
title: Exercise
pcaps:
pred: if
succ: solution-script-exercise-1

Exercise
==========================
Expand Down
2 changes: 2 additions & 0 deletions manager/static/examples/basics/exercise1/index
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
exercise
solution
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
title: Exercise 1: Solution
pcaps:
pred: script-exercise-1
succ: switch

Exercise: Solution
Exercise 1 Solution
=====================================

Here is the solution for the first exercise.
Expand Down
3 changes: 3 additions & 0 deletions manager/static/examples/basics/exercise2/index
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
script-exercise-2
solution-script-exercise-2

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
title: Exercise 2
title: Exercise
pcaps: exercise\_traffic.pcap
pred: bro-types
succ: solution-script-exercise-2
order:

Exercise
==========================
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
title: Exercise 2
pcaps: exercise_traffic.pcap
pred: script-exercise-2
succ: module

Exercise: Solution
==========================
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
title: Functions
pcaps:
pred: loading
succ: variables

Functions
==========
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
title: hook
pcaps:
pred: event
succ: composite-types

Hook
=======
Expand Down
15 changes: 15 additions & 0 deletions manager/static/examples/basics/index
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
loading
functions
variables
primitive-datatypes
operators
control-flow
loops
exercise1
switches
event
hook
composite-types
redefinitions
bro-types
exercise2
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
title: Loading
title: Loading Scripts
pcaps:
pred: hello
succ: functions

Loading Scripts
===============
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
title: Loops
title: For Loops
pcaps:
pred: operators
succ: while

Loops: For
For Loops
================

Bro uses a "foreach" style loop.
Bro provides a "foreach" style loop.
In the given example we simply iterate through the string "abc"
and print the current character.

Expand Down
2 changes: 2 additions & 0 deletions manager/static/examples/basics/loops/index
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
for
while
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
title: Loops: While
pcaps:
pred: loops
succ: if

Loops: While
================
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
title: Operators
pcaps:
pred: primitive_datatypes
succ: loops

Operators
==========
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
title: Primitive Datatypes
pcaps:
pred: variables
succ: operators

Primitive Datatypes
===================
Expand Down
1 change: 1 addition & 0 deletions manager/static/examples/basics/redefinitions/index
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
redef-records
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
title: Redefinitions
pcaps:
pred: redefinitions
succ: bro-types

Redefinitions for records
============================
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
title: Redefinitions
pcaps:
pred: record
succ: redef-records

Redefinitions
============================
Expand Down
3 changes: 3 additions & 0 deletions manager/static/examples/basics/switches/index
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
switch
switch-exercise
solution-switch-exercise
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
title: Switch Exercise: Solution
pcaps:
pred: switch-exercise
succ: event

Switch Exercise: Solution
==========================================
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
title: Switch Exercise
pcaps:
pred: switch
succ: solution-switch-exercise

Switch Exercise
================================
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
title: The switch statement
pcaps:
pred: solution-script-exercise-1
succ: switch-exercise

Switch Statement
The Switch Statement
=====================

Sometimes a switch statement is a more convenient way to organize code.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
title: Variables
pcaps:
pred: functions
succ: primitive_datatypes

Variables
===========
Expand Down
2 changes: 0 additions & 2 deletions manager/static/examples/congrats/readme.markdown
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
title: Congrats
pcaps:
pred: intel
succ:

Congratulations
==========================
Expand Down
1 change: 0 additions & 1 deletion manager/static/examples/dump-events.json

This file was deleted.

1 change: 0 additions & 1 deletion manager/static/examples/examples.json

This file was deleted.

1 change: 0 additions & 1 deletion manager/static/examples/hello.json

This file was deleted.

15 changes: 10 additions & 5 deletions manager/static/examples/hello/readme.markdown
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
title: Hello World
pcaps:
pred:
succ: loading

Hello
=======
Hello World
============

Welcome to our interactive Bro tutorial.

Now click run and see the Bro magic happen. You may need to scroll
Click run and see the Bro magic happen. You may need to scroll
down a bit to get to the output.

In this simple example you can see already a specialty of Bro, the "event". Bro is event-driven.
Expand All @@ -25,4 +23,11 @@ In this tutorial we will come back to events in the lesson about [complex data t

Other than that, all this script does is sending warm greetings to new Bro users by printing to STDOUT.

Try.bro allows you to hide the text if you want to script console to be full width. Find the button "hide" and give it a try.

Every example can be run with a pcap file, you can select one below the script area. You can also
upload your own pcap-examples. Select a pcap and click run again. Below the print-output you will find tabs
with the familar log-file names. You can click on each row inside a log file and get more details. If Bro logs are not yet
familiar to you please go to the documentation on [log files](https://www.bro.org/sphinx/script-reference/log-files.html).

When you are ready you can just click on next below and start the next example.
8 changes: 8 additions & 0 deletions manager/static/examples/index
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
hello
basics
modules
logs
new-notice
sumstats
intel
congrats
1 change: 0 additions & 1 deletion manager/static/examples/intel.json

This file was deleted.

1 change: 1 addition & 0 deletions manager/static/examples/intel/index
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
intel-1
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
title: Intel
pcaps: http.pcap
pred: sumstats3
succ: congrats

The Intel Framework
====================
Expand All @@ -28,9 +26,3 @@ all seen matches. As always the uid allows you to investigate further which conn
It is also possible to raise notices based on intel data. To see how this works have a look at the
documentation mentioned above.





This is about intel. and stuff.

1 change: 0 additions & 1 deletion manager/static/examples/loading/main.bro

This file was deleted.

1 change: 0 additions & 1 deletion manager/static/examples/log.json

This file was deleted.

19 changes: 0 additions & 19 deletions manager/static/examples/log/main.bro

This file was deleted.

2 changes: 2 additions & 0 deletions manager/static/examples/logs/index
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
filter-logs
rename-logs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
title: Rename Logs
pcaps: exercise_traffic.pcap
pred: log-factorial
succ: filter-logs

Rename Logs
=============
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
title: The Export Statement
title: Writing a Module: Export
pcaps:
pred: module
succ: log-factorial

Writing a Module: Export
=========================
Expand Down
3 changes: 3 additions & 0 deletions manager/static/examples/modules/index
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module
export
log-factorial
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
title: Logging the Factorial
title: Writing a Module: Logging
pcaps:
pred: export
succ: rename-logs

Writing a Module: Logging
=========================
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
title: Module
title: Writing a Module
pcaps:
pred: solution-script-exercise-2
succ: export

Writing a Module
=====================

In the next lessons of this tutorial you will learn how to write your own module step by step.
A module in Bro is a semantic entity that defines a new name space.
The work flow usually is that solving a problem results in a new module.
A module can be a file or a bundle of files, a package. See below on this page.
Expand Down
Loading

0 comments on commit 158a852

Please sign in to comment.