Skip to content

Commit

Permalink
fix: 修复攻击ip不正确问题
Browse files Browse the repository at this point in the history
  • Loading branch information
GaoFengAkita committed Jul 9, 2021
1 parent 23db5b3 commit db79899
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/policyCenter/policySQL.go
Original file line number Diff line number Diff line change
Expand Up @@ -1251,7 +1251,7 @@ func SelectAttackLogDetail(id int, honeytypeid string, srchost string, attackip
DbCon := sqlCon
defer sqlCon.Close()
sqltotal := "select count(1) from `attacklog` T0 left join `honeypotservers` T1 on T1.`serverid` = T0.`serverid` left join `honeypotstype` T2 on T2.`typeid` = T0.`honeytypeid` where 1=1"
sqlstr := "select T0.`srchost`,T0.`srcport`,T0.`attackip`,T0.`attacktime`,T0.`honeypotport`,T0.`logdata`,T0.`eventdetail`,T1.`serverip`,T2.`honeypottype`, T3.honeyip from `attacklog` T0 left join `honeypotservers` T1 on T1.`serverid` = T0.`serverid` left join `honeypotstype` T2 on T2.`typeid` = T0.`honeytypeid` LEFT JOIN honeypots T3 ON T0.honeypotid = T3.honeypotid where 1=1"
sqlstr := "select T0.`srchost`,T0.`srcport`,T.`attackip`,T0.`attacktime`,T0.`honeypotport`,T0.`logdata`,T0.`eventdetail`,T1.`serverip`,T2.`honeypottype`, T3.honeyip from `attacklog` T0 left JOIN `attacklog` T ON T0.attackip = T.srchost left join `honeypotservers` T1 on T1.`serverid` = T0.`serverid` left join `honeypotstype` T2 on T2.`typeid` = T0.`honeytypeid` LEFT JOIN honeypots T3 ON T0.honeypotid = T3.honeypotid where 1=1 AND T0.attackport = T.exportport"

var condition string
var argsList []interface{}
Expand Down

0 comments on commit db79899

Please sign in to comment.