https://github.com/six-ddc/recv.sh
Multiple data receiving
https://github.com/six-ddc/recv.sh
command-line logcollector netcat
Last synced: 9 months ago
JSON representation
Multiple data receiving
- Host: GitHub
- URL: https://github.com/six-ddc/recv.sh
- Owner: six-ddc
- License: mit
- Created: 2019-03-29T02:32:49.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-26T09:18:39.000Z (over 6 years ago)
- Last Synced: 2025-04-12T17:58:20.146Z (9 months ago)
- Topics: command-line, logcollector, netcat
- Language: Go
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# recv.sh
Easy data receiving
## Install
```shell
go get github.com/six-ddc/recv.sh
```
## Usage
```shell
recv.sh: error: required argument '[host]:port' not provided
usage: recv.sh [] <[host]:port> []
Flags:
-h, --help Show context-sensitive help (also try --help-long and --help-man).
-z, --gzip Accept gzipped data
-a, --append Append data to the output file when writing
-m, --mutex Read data one by one
-c, --chunk Read data in chunk mode, default (line mode)
-u, --udp Use udp instead of the default option of tcp
--bufsize=64KB Sepcify read buffer size on udp
-v, --verbose Verbose
--version Show application version.
Args:
<[host]:port> Listening address
[] Specify output file name, support Go template, i.e. 'out-{{.Id}}-{{.Ip}}-{{.Port}}'
```
## Example
* Receiver
```shell
recv.sh :8080 outputs.txt
# recv.sh :8080 outputs-{{.Ip}}.txt
```
* Sender
```shell
# machine A
xxx | nc 127.0.0.1 8080
# machine B
xxx | nc 127.0.0.1 8080
```