Skip to content

Commit

Permalink
Add README.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjkw31 committed Jan 23, 2024
1 parent b1a1b0a commit 2d39240
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Go SoftPack Analytics

This package provides a simple server that listens on a port for simple analytical information, to which it adds simple metadata and prints.

## Usage

The server takes the following arguments:

| Argument | Default | Description |
|--------------|-------------|----------------------------|
| -p | 1234 | The TCP port to listen on. |
| -o | - (stdout) | The file to print to. |

## Output

The generated file will be a TSV with the following fields:

| Field | Description |
|-----------|---------------------------------------------------------------------|
| Time | Human readable timestamp of the format: YYYY-MM-DD HH:mm:ss |
| Path | The path of the executable that was passed to the analytics server. |
| Username | The user the ran the executable. |
| IP Address| The IP Address on which the executable was ran. |

## Sending Data

This server can recieve information in a very simple format which consists of a username and an executable path, seperated by a null byte.

An example usage is below:

```bash
{
(echo -e "$USER\0$0" > /dev/tcp/server-domain/1234 2> /dev/null) &
} 2> /dev/null
```

…where server-domain is the domain name that the analytics server is running on and 1234 is the port it is listening on.

0 comments on commit 2d39240

Please sign in to comment.