diff options
Diffstat (limited to 'rules')
| -rw-r--r-- | rules/rules.go | 2 | ||||
| -rw-r--r-- | rules/rules_test.go | 4 | ||||
| -rw-r--r-- | rules/rulestype_test.go | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/rules/rules.go b/rules/rules.go index 8c3ec65..4929551 100644 --- a/rules/rules.go +++ b/rules/rules.go @@ -1,7 +1,7 @@ /* * @Author: EnderByEndera * @Date: 2020-12-04 15:03:00 - * @LastEditTime: 2021-01-04 16:44:06 + * @LastEditTime: 2021-01-05 17:58:28 * @LastEditors: Please set LastEditors * @Description: rules provide all the rules to check the commands' availability and set score of every command * @FilePath: /commdetection/rules/commcheck.go diff --git a/rules/rules_test.go b/rules/rules_test.go index f29785f..41eb131 100644 --- a/rules/rules_test.go +++ b/rules/rules_test.go @@ -1,7 +1,7 @@ /* * @Author: EnderByEndera * @Date: 2020-12-04 15:03:09 - * @LastEditTime: 2021-01-04 16:43:21 + * @LastEditTime: 2021-01-05 17:19:26 * @LastEditors: Please set LastEditors * @Description: Test commrules.go * @FilePath: /commdetection/rules/commrules_test.go @@ -127,7 +127,7 @@ func TestRule(t *testing.T) { } func TestInitCommScores(t *testing.T) { - comms := comm.GetCommands("/root/.bash_history", "") + comms := comm.GetCommands() comms = comm.FlushCommands(comms, []comm.Filter{comm.WhichCommandFilter}) css := InitCommScores(comms) fmt.Println(css) diff --git a/rules/rulestype_test.go b/rules/rulestype_test.go index 9436e9d..d92d0c3 100644 --- a/rules/rulestype_test.go +++ b/rules/rulestype_test.go @@ -1,7 +1,7 @@ /* * @Author: EnderByEndera * @Date: 2020-12-08 11:28:49 - * @LastEditTime: 2021-01-04 19:06:53 + * @LastEditTime: 2021-01-05 17:19:57 * @LastEditors: Please set LastEditors * @Description: Test UnmarshalSetting and MarshalSetting * @FilePath: /commdetection/rules/rulestype_test.go @@ -69,7 +69,7 @@ func TestEvaluateWebsiteRule(t *testing.T) { } func BenchmarkEvaluateCommandRule(b *testing.B) { - comms := comm.GetCommands("/root/.bash_history", "") + comms := comm.GetCommands() comms = comm.FlushCommands(comms, []comm.Filter{comm.WhichCommandFilter}) css := InitCommScores(comms) b.ResetTimer() @@ -79,7 +79,7 @@ func BenchmarkEvaluateCommandRule(b *testing.B) { } func BenchmarkEvaluatePathRule(b *testing.B) { - comms := comm.GetCommands("/root/.bash_history", "") + comms := comm.GetCommands() comms = comm.FlushCommands(comms, []comm.Filter{comm.WhichCommandFilter}) css := InitCommScores(comms) b.ResetTimer() @@ -89,7 +89,7 @@ func BenchmarkEvaluatePathRule(b *testing.B) { } func BenchmarkEvaluateWebsiteRule(b *testing.B) { - comms := comm.GetCommands("/root/.bash_history", "") + comms := comm.GetCommands() comms = comm.FlushCommands(comms, []comm.Filter{comm.WhichCommandFilter}) css := InitCommScores(comms) b.ResetTimer() |
