Skip to content

Commit

Permalink
Add usage
Browse files Browse the repository at this point in the history
I'm still confused about how scripts are supposed to be loaded in a
spicy plugin, a la zeek/cmake#97

It's just weird and unintuitive.
  • Loading branch information
evantypanski committed Nov 1, 2024
1 parent abd7033 commit fc532ee
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,39 @@

Parses the [Redis serialization protocol](https://redis.io/docs/latest/develop/reference/protocol-spec/) (RESP). Then parses this as Redis commands

## Usage
## Installation

Install using the [Zeek package manager](https://docs.zeek.org/projects/package-manager/en/stable/), `zkg`:

Common usage within Zeek.
```
zkg install https://github.com/evantypanski/spicy-redis
```

First, build the analyzer:
Check to ensure it installed properly:

```
$ zeek -NN | grep spicy_Redis
[Analyzer] spicy_Redis (ANALYZER_SPICY_REDIS, enabled)
```

### From source

You can also build from source directly from this directory, then install the local version:

```
$ mkdir build && cd build
$ cmake .. -G Ninja
$ ninja install
```

You should now see the spicy analyzer via `zeek`:
## Usage

I'm not entirely clear how the script is expected to get loaded. For now, the easiest way to use this via Zeek is by directly loading the `main.zeek` script in a `zeek` invocation, like:

```
$ zeek -NN | grep Redis
[Analyzer] spicy_redis (ANALYZER_SPICY_REDIS, enabled)
$ zeek -Cr testing/Traces/set.trace scripts/main.zeek
$ cat redis.log
# ... the log output should appear
```

### Creating Redis traffic
Expand Down

0 comments on commit fc532ee

Please sign in to comment.