-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |