From ebdc2a32e3bbaa98c497a1ad6adfa93c2e95b889 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 13 Nov 2020 10:56:31 +0800 Subject: [PATCH] 1 --- server/analyseapi/riskmgr.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/server/analyseapi/riskmgr.go b/server/analyseapi/riskmgr.go index 371fc76..17f878c 100644 --- a/server/analyseapi/riskmgr.go +++ b/server/analyseapi/riskmgr.go @@ -65,6 +65,8 @@ func (this* RiskMgr) UnInit() { func (this* RiskMgr) OutputLog() { //f5.SysLog().Info("passobj %s", this.GetPassObj().ToJsonStr()) //f5.SysLog().Info("blockobj %s", this.GetBlockObj().ToJsonStr()) + f5.SysLog().Info("global passobj %s", this.GetGlobalPassObj().ToJsonStr()) + f5.SysLog().Info("global blockobj %s", this.GetGlobalBlockObj().ToJsonStr()) atomic.StoreInt64(&this.passTimes, 0) atomic.StoreInt64(&this.blockTimes, 0) atomic.StoreInt64(&this.passTimes, 0) @@ -72,6 +74,17 @@ func (this* RiskMgr) OutputLog() { atomic.StoreInt64(&this.sessionErrBlockTimes, 0) } +func (this* RiskMgr) GetGlobalPassObj() *q5.XObject { + passObj := q5.NewMxoObject() + passObj.SetXValue("curr_white_ip_times", q5.NewXInt64(this.ipWhiteListPassTimes)) + return passObj.AsXObject() +} + +func (this* RiskMgr) GetGlobalBlockObj() *q5.XObject { + blockObj := q5.NewMxoObject() + return blockObj.AsXObject() +} + func (this* RiskMgr) GetSdkInfo(accessKeyId* string, accessSecret* string) { this.sdkInfoMutex.Lock() defer this.sdkInfoMutex.Unlock()