~shabbyrobe/asnine

79b3eab77963a6cbeb929918e4e33e181b7e3b56 — Blake Williams 10 months ago ca285b5
Clarify the README a bit
1 files changed, 19 insertions(+), 7 deletions(-)

M README.md
M README.md => README.md +19 -7
@@ 24,25 24,37 @@ asnine lookup 8.8.8.8
But it's really slow to do it this way because the data is slow to parse and I
don't have a good intermediate format yet.

There's also a scan mode that works with stdin, and is best used like so:
There's also a scan mode that works with stdin, and is most useful with
a streaming pipe input:

```
rlwrap asnine scan -
$ </some/log jq -r .ipAddress | asnine scan -
```

(You can get `rlwrap` from homebrew, apt, or where all good action toys are sold)
`scan` can also be used with `rlwrap` to create a cheap interactive shell. You
can get `rlwrap` from homebrew, apt, or where all good action toys are sold.
(NOTE: There may be a delay before the first input produces an output):

If you're really adventurous, there's a crap linewise TCP server you can use like
so:
```
$ rlwrap -S 'ip> ' asnine scan -
ip> 8.8.8.8
{"success":true,"ip":"8.8.8.8", ...}
ip> 1.1.1.1
{"success":true,"ip":"8.8.8.8", ...}
```

If you're really adventurous, there's a crap linewise TCP server you can use
like so:

```
go run asnine serve 127.0.0.1:9876
```

Then from another terminal:
Then you can use `rlwrap`, just as with `scan`, from another terminal, and
it'll behave pretty much the same way:

```
rlwrap nc 127.0.0.1 9876
$ rlwrap -S 'ip> ' nc 127.0.0.1 9876
```