diff --git a/.gitignore b/.gitignore index 501a2c3..5fc3fc1 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ config.yml ncp bin coverage.txt +dist /log/* !/log/.keep diff --git a/CHANGELOG.md b/CHANGELOG.md index da2073e..e130107 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [2.4.0] - 2023-04-06 + +### Add + +* releaser deb +* add exec + +exec system command. **NOTE: This is very dangerous!** + +```yaml + - type: exec + params: "echo" + i_rules: + - regexp: '.*"method": ?"exec".*' + o_rules: + - regexp: '.*' +``` + +This `params` is command, example: `params: "/bin/sh"` + +This Recvice JSONRPC, ignore `jsonrpc.method`. **jsonrpc.method is use of only match** + +For example: + +`params: "echo"`. jsonrpc2 `{"jsonrpc":"2.0","method":"exec","params":["-n", "xxx"],"id":"x"}` + +Finally exec: `echo -n xxx` + ## [2.3.0] - 2022-12-29 ### Add diff --git a/README.md b/README.md index 77702b8..9c7b69d 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,7 @@ Type | Description [API](#api) | build-in interface [tcpc](#tcpc) | TCP socket client [tcps](#tcps) | TCP socket server +[exec](#exec) | Execute system command [jsonrpc2](#jsonrpc2)| JSONRPC 2.0 simulation [logger](#logger) | Record message log [mqtt](#mqtt) | Connect Mqtt Broker diff --git a/README_zh.md b/README_zh.md index d1a909f..ed644d0 100644 --- a/README_zh.md +++ b/README_zh.md @@ -143,6 +143,7 @@ Type | Description [API](#api) | build-in interface [tcpc](#tcpc) | TCP socket client [tcps](#tcps) | TCP socket server +[exec](#exec) | Execute system command [jsonrpc2](#jsonrpc2)| JSONRPC 2.0 simulation [logger](#logger) | Record message log [mqtt](#mqtt) | Connect Mqtt Broker