mirror of
https://github.com/nmap/nmap.git
synced 2025-12-10 09:49:05 +00:00
Adds Jenkins Server detection. Closes #969
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
local http = require "http"
|
||||
local io = require "io"
|
||||
local string = require "string"
|
||||
local table = require "table"
|
||||
|
||||
---
|
||||
-- http-devframework-fingerprints.lua
|
||||
@@ -399,4 +401,41 @@ tools = { Django = { rapidDetect = function(host, port)
|
||||
end
|
||||
},
|
||||
|
||||
Jenkins = { rapidDetect = function(host, port)
|
||||
|
||||
local response = http.get(host, port, "/")
|
||||
local jenkins = {}
|
||||
|
||||
if response and ( response.status == 200 or response.status == 403 ) then
|
||||
local header_x_jenkins = response.header['x-jenkins']
|
||||
-- Check for 'X-Jenkins' Header
|
||||
if header_x_jenkins ~= nil then
|
||||
table.insert(jenkins, "Jenkins detected. Found Jenkins version " .. header_x_jenkins)
|
||||
if response.header['x-hudson'] ~= nil then
|
||||
table.insert(jenkins, "X-Hudson : " .. response.header['x-hudson'])
|
||||
end
|
||||
if response.header['x-hudson-cli-port'] ~= nil then
|
||||
table.insert(jenkins, "X-Hudson-CLI-Port : " .. response.header['x-hudson-cli-port'])
|
||||
end
|
||||
if response.header['x-jenkins-cli-port'] ~= nil then
|
||||
table.insert(jenkins, "X-Jenkins-CLI-Port : " .. response.header['x-jenkins-cli-port'])
|
||||
end
|
||||
if response.header['x-jenkins-cli2-port'] ~= nil then
|
||||
table.insert(jenkins, "X-Jenkins-CLI2-Port : " .. response.header['x-jenkins-cli2-port'])
|
||||
end
|
||||
if response.header['x-jenkins-session'] ~= nil then
|
||||
table.insert(jenkins, "X-Jenkins-Session : " .. response.header['x-jenkins-session'])
|
||||
end
|
||||
return jenkins
|
||||
end
|
||||
end
|
||||
end,
|
||||
|
||||
consumingDetect = function(page, path)
|
||||
return
|
||||
end
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user