<commit_before># packets-at-rest

## Environment and Dependencies
Suggested operating system is FreeBSD.

System dependencies include:
* net/daemonlogger

## Usage
Start daemonlogger. For example:

 daemonlogger -i em0 -l /data/pcap/ -n pcap -t 60

Edit options in config.rb. For example:

 CAPTUREDIR = '/data/pcap'
 FILERDIR = '/data/filed'
 FILEPREFIX = 'pcap'
 PRINTF = '/usr/bin/printf'
 TCPDUMP = '/usr/sbin/tcpdump'

Schedule the filer. For example, in crontab:

 * * * * * /usr/local/bin/ruby /git/packets-at-rest/filer.rb

Start the server. For example:

 rackup -p 9001

Make a request. For example:

 http://localhost:9001/data.pcap?src_addr=1.1.1.1&src_port=111&dst_addr=2.2.2.2&dst_port=222&start_time=2001-01-01 5:01pm&end_time=2001-01-01 5:05pm<commit_msg>fixed readme<commit_after># packets-at-rest

## Environment and Dependencies
Suggested operating system is FreeBSD.

System dependencies include:
* net/daemonlogger

## Usage
Start daemonlogger. For example:

````
daemonlogger -i em0 -l /data/pcap/ -n pcap -t 60
````

Edit options in config.rb. For example:

````
CAPTUREDIR = '/data/pcap'
FILERDIR = '/data/filed'
FILEPREFIX = 'pcap'
PRINTF = '/usr/bin/printf'
TCPDUMP = '/usr/sbin/tcpdump'
````

Schedule the filer. For example, in crontab:

````
* * * * * /usr/local/bin/ruby /git/packets-at-rest/filer.rb
````

Start the server. For example:

````
rackup -p 9001
````

Make a request. For example:

````
http://localhost:9001/data.pcap?src_addr=1.1.1.1&src_port=111&dst_addr=2.2.2.2&dst_port=222&start_time=2001-01-01 5:01pm&end_time=2001-01-01 5:05pm
````
{'fraction_non_alphanumeric': 0.15676359039190899, 'fraction_numerical': 0.05941845764854614, 'mean_word_length': 4.090032154340836, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1387464', 'n_tokens_mistral': 687, 'n_tokens_neox': 610, 'n_words': 138}