add CCBot user agent

This commit is contained in:
Azareal 2020-03-31 23:10:29 +10:00
parent bc16b724c2
commit 21d09db477
3 changed files with 22 additions and 14 deletions

View File

@ -620,10 +620,11 @@ var agentMapEnum = map[string]int{
"blexbot": 46, "blexbot": 46,
"aspiegel": 47, "aspiegel": 47,
"mail_ru": 48, "mail_ru": 48,
"zgrab": 49, "ccbot": 49,
"curl": 50, "zgrab": 50,
"python": 51, "curl": 51,
"go": 52, "python": 52,
"go": 53,
} }
var reverseAgentMapEnum = map[int]string{ var reverseAgentMapEnum = map[int]string{
0: "unknown", 0: "unknown",
@ -675,10 +676,11 @@ var reverseAgentMapEnum = map[int]string{
46: "blexbot", 46: "blexbot",
47: "aspiegel", 47: "aspiegel",
48: "mail_ru", 48: "mail_ru",
49: "zgrab", 49: "ccbot",
50: "curl", 50: "zgrab",
51: "python", 51: "curl",
52: "go", 52: "python",
53: "go",
} }
var markToAgent = map[string]string{ var markToAgent = map[string]string{
"OPR": "opera", "OPR": "opera",
@ -730,6 +732,7 @@ var markToAgent = map[string]string{
"BLEXBot": "blexbot", "BLEXBot": "blexbot",
"AspiegelBot": "aspiegel", "AspiegelBot": "aspiegel",
"RU_Bot": "mail_ru", "RU_Bot": "mail_ru",
"CCBot": "ccbot",
"zgrab": "zgrab", "zgrab": "zgrab",
"curl": "curl", "curl": "curl",
"python": "python", "python": "python",
@ -785,10 +788,11 @@ var markToID = map[string]int{
"BLEXBot": 46, "BLEXBot": 46,
"AspiegelBot": 47, "AspiegelBot": 47,
"RU_Bot": 48, "RU_Bot": 48,
"zgrab": 49, "CCBot": 49,
"curl": 50, "zgrab": 50,
"python": 51, "curl": 51,
"Go": 52, "python": 52,
"Go": 53,
} }
/*var agentRank = map[string]int{ /*var agentRank = map[string]int{
"opera":9, "opera":9,
@ -1160,7 +1164,7 @@ func (r *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
if strings.Contains(ua,"rv:11") { if strings.Contains(ua,"rv:11") {
agent = 6 agent = 6
} }
case 49: case 50:
r.SuspiciousRequest(req,"Vulnerability Scanner") r.SuspiciousRequest(req,"Vulnerability Scanner")
} }

View File

@ -232,6 +232,7 @@
"blexbot":"BLEXBot", "blexbot":"BLEXBot",
"aspiegel":"Aspiegel", "aspiegel":"Aspiegel",
"mail_ru":"Mail.ru bot", "mail_ru":"Mail.ru bot",
"ccbot":"CCBot",
"zgrab":"Zgrab App Scanner", "zgrab":"Zgrab App Scanner",
"curl":"curl", "curl":"curl",
"python":"Python Bot", "python":"Python Bot",

View File

@ -280,6 +280,7 @@ func main() {
"blexbot", "blexbot",
"aspiegel", "aspiegel",
"mail_ru", "mail_ru",
"ccbot",
"zgrab", "zgrab",
"curl", "curl",
"python", "python",
@ -343,6 +344,7 @@ func main() {
"BLEXBot", "BLEXBot",
"AspiegelBot", "AspiegelBot",
"RU_Bot", // Mail.RU_Bot "RU_Bot", // Mail.RU_Bot
"CCBot",
"zgrab", "zgrab",
"curl", "curl",
"python", "python",
@ -390,7 +392,7 @@ func main() {
"Facebot": "facebook", "Facebot": "facebook",
"Applebot": "apple", "Applebot": "apple",
"Discourse": "discourse", "Discourse": "discourse",
"mattermost":"mattermost", "mattermost": "mattermost",
"ia_archiver": "alexa", "ia_archiver": "alexa",
"SemrushBot": "semrush", "SemrushBot": "semrush",
@ -401,6 +403,7 @@ func main() {
"BLEXBot": "blexbot", "BLEXBot": "blexbot",
"AspiegelBot": "aspiegel", "AspiegelBot": "aspiegel",
"RU_Bot": "mail_ru", // Mail.RU_Bot "RU_Bot": "mail_ru", // Mail.RU_Bot
"CCBot": "ccbot",
"zgrab": "zgrab", "zgrab": "zgrab",
"curl": "curl", "curl": "curl",
"python": "python", "python": "python",