Skip to content

Instantly share code, notes, and snippets.

@anthonykasza
Created March 30, 2014 20:52
Show Gist options
  • Save anthonykasza/9879554 to your computer and use it in GitHub Desktop.
Save anthonykasza/9879554 to your computer and use it in GitHub Desktop.
Data Types: Bro vs Python
Bro Python
set set
table dict(single type)
vector list(single type)
record dict(multiple types)
enum ? enum.Enum
addr ? string or integer ('192.168.1.1', 3232235777)
port ? context specific integer (if fed to a tcp style method, then its a tcp port)
subnet ? integer (range of addrs)
time integer (representing an epoch)
interval integer (representing a range between two epochs)
pattern re.RegexObject
any ? (Python is dynamically typed)
opaque ? masked structure
file file
function function
module module (similar concept of namespaces)
event ? callback function (no return type, not directyl callable, prioritizable)
hook ? directly callable, prioritizable functions with decoupled bodies which are able to short circuit subsequent hooks of the same handle
bool bool
string string
count integer
int integer
double float
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment