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()