I hereby claim:
- I am aeppert on github.
- I am aeppert (https://keybase.io/aeppert) on keybase.
- I have a public key whose fingerprint is 7D23 1BB4 89F1 19A6 59CB 6706 A16D BEB5 10E3 D194
To claim this, I am signing this object:
| export { | |
| type timeSpan: record { | |
| hours: int; | |
| minutes: int; | |
| seconds: int; | |
| }; | |
| } | |
| function calc_elapsed_time(t1: time, t2: time) : timeSpan | |
| { |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/python | |
| import argparse | |
| from influxdb import InfluxDBClient | |
| import math | |
| import datetime | |
| import time | |
| USER = 'root' |
| #!/usr/bin/python | |
| import sys | |
| from optparse import OptionParser | |
| import ConfigParser | |
| from influxdb import InfluxDBClient | |
| G_VALID_STATUS = ['start', 'stop'] | |
| event protocol_confirmation (c: connection, atype: Analyzer::Tag, aid: count) | |
| { | |
| if ( atype == Analyzer::ANALYZER_SMTP ) | |
| { | |
| local both_file = generate_extraction_filename(Conn::extraction_prefix, c, "both.dat"); | |
| local both_f = open(both_file); | |
| set_contents_file(c$id, CONTENTS_BOTH, both_f); | |
| } | |
| } |
| #!/usr/bin/python | |
| import ssl | |
| import socket | |
| def get_outbound_ip(): | |
| ret = None | |
| s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
| s.connect(("gmail.com", 80)) |
| #!/usr/bin/env python | |
| import os | |
| import sys | |
| import time | |
| DEFAULT_LOG = "/bro/logs/current/conn.log" | |
| def config(): | |
| print """ | |
| graph_category network |
| ps -eo size,pid,user,command --sort -size | awk '{ hr=$1/1024 ; printf("%13.2f Mb ",hr) } { for ( x=4 ; x<=NF ; x++ ) { printf("%s ",$x) } print "" }' |
| def launch_memory_usage_server(host="127.0.0.1", port=8080): | |
| import cherrypy | |
| import dowser | |
| cherrypy.tree.mount(dowser.Root()) | |
| cherrypy.config.update({ | |
| 'environment': 'embedded', | |
| 'server.socket_host': host, | |
| 'server.socket_port': port | |
| }) |
| # Install epel | |
| sudo yum -y install epel-release | |
| # Install kernel headers for current kernel | |
| sudo yum install -y kernel-devel-$(uname -r) kernel-headers-$(uname -r) | |
| # Install ntop repos | |
| cat << EOF | sudo tee /etc/yum.repos.d/ntop.repo | |
| [ntop] | |
| name=ntop packages |