1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Removes unused dependencies from all files in scripts folder.

This commit is contained in:
rewanth
2017-08-15 07:26:00 +00:00
parent c2a9a5bbe3
commit d9504537e6
42 changed files with 27 additions and 85 deletions

View File

@@ -1,5 +1,4 @@
local coroutine = require "coroutine"
local datetime = require "datetime"
local formulas = require "formulas"
local math = require "math"
local nmap = require "nmap"

View File

@@ -1,4 +1,3 @@
local bin = require "bin"
local ipOps = require "ipOps"
local math = require "math"
local nmap = require "nmap"
@@ -1061,4 +1060,3 @@ action = function(host)
return report(scanner)
end

View File

@@ -5,7 +5,6 @@ local shortport = require "shortport"
local stdnse = require "stdnse"
local string = require "string"
local table = require "table"
local sslcert = require "sslcert"
description = [[
Checks if an FTP server allows anonymous logins.

View File

@@ -1,8 +1,6 @@
local ftp = require "ftp"
local shortport = require "shortport"
local stdnse = require "stdnse"
local string = require "string"
local table = require "table"
description = [[
Sends FTP SYST and STAT commands and returns the result.

View File

@@ -3,7 +3,6 @@ local nmap = require "nmap"
local shortport = require "shortport"
local slaxml = require "slaxml"
local stdnse = require "stdnse"
local string = require "string"
local table = require "table"
description = [[
@@ -244,4 +243,3 @@ action = function( host, port )
if #state.result then return state.result end
end

View File

@@ -1,9 +1,7 @@
local http = require "http"
local ipOps = require "ipOps"
local stdnse = require "stdnse"
local string = require "string"
local slaxml = require "slaxml"
local table = require "table"
description = [[
Discovers hostnames that resolve to the target's IP address by querying the online Robtex service at http://ip.robtex.com/.

View File

@@ -4,7 +4,6 @@ local http = require "http"
local nmap = require "nmap"
local shortport = require "shortport"
local stdnse = require "stdnse"
local string = require "string"
local table = require "table"
description = [[

View File

@@ -4,7 +4,6 @@ local io = require "io"
local nmap = require "nmap"
local shortport = require "shortport"
local stdnse = require "stdnse"
local string = require "string"
local table = require "table"
description = [[

View File

@@ -1,4 +1,3 @@
local http = require "http"
local nmap = require "nmap"
local shortport = require "shortport"
local stdnse = require "stdnse"

View File

@@ -1,4 +1,3 @@
local bin = require "bin"
local os = require "os"
local datetime = require "datetime"
local http = require "http"

View File

@@ -3,7 +3,6 @@ local shortport = require "shortport"
local slaxml = require "slaxml"
local stdnse = require "stdnse"
local tab = require "tab"
local table = require "table"
description = [[Enumerates users of a Subversion repository by examining logs of most recent commits.
]]
@@ -131,4 +130,3 @@ action = function(host, port)
end
end
end

View File

@@ -2,7 +2,6 @@ local http = require "http"
local shortport = require "shortport"
local slaxml = require "slaxml"
local stdnse = require "stdnse"
local string = require "string"
description = [[Requests information from a Subversion repository.
]]

View File

@@ -37,7 +37,6 @@ categories = {"exploit","vuln"}
local http = require "http"
local nmap = require "nmap"
local shortport = require "shortport"
local string = require "string"
local vulns = require "vulns"
local stdnse = require "stdnse"

View File

@@ -6,7 +6,6 @@ local string = require "string"
local table = require "table"
local url = require "url"
local vulns = require "vulns"
local re = require "re"
local openssl = require "openssl"
description = [[

View File

@@ -4,7 +4,6 @@ local stdnse = require "stdnse"
local string = require "string"
local vulns = require "vulns"
local json = require "json"
local base64 = require "base64"
local nmap = require "nmap"
description = [[
@@ -208,4 +207,3 @@ action = function(host, port)
cleanup()
return report:make_output(vuln_table)
end

View File

@@ -1,23 +1,21 @@
local http = require "http"
local shortport = require "shortport"
local string = require "string"
local stdnse = require "stdnse"
local url = require "url"
local vulns = require "vulns"
local json = require "json"
description = [[
Attempts to detect a privilege escalation vulnerability in Wordpress 4.7.0 and 4.7.1 that
description = [[
Attempts to detect a privilege escalation vulnerability in Wordpress 4.7.0 and 4.7.1 that
allows unauthenticated users to inject content in posts.
The script connects to the Wordpress REST API to obtain the list of published posts and
grabs the user id and date from there. Then it attempts to update the date field in the
post with the same date information we just obtained. If the request doesnt return an
The script connects to the Wordpress REST API to obtain the list of published posts and
grabs the user id and date from there. Then it attempts to update the date field in the
post with the same date information we just obtained. If the request doesnt return an
error, we mark the server as vulnerable.
References:
https://blog.sucuri.net/2017/02/content-injection-vulnerability-wordpress-rest-api.html
https://blog.sucuri.net/2017/02/content-injection-vulnerability-wordpress-rest-api.html
]]
---
@@ -33,13 +31,13 @@ https://blog.sucuri.net/2017/02/content-injection-vulnerability-wordpress-rest-a
-- | Content Injection in Wordpress REST API
-- | State: VULNERABLE (Exploitable)
-- | IDs: CVE:CVE-2017-1001000
-- | Risk factor: Medium CVSSv2: 5.0 (MEDIUM)
-- | Risk factor: Medium CVSSv2: 5.0 (MEDIUM)
-- | The privilege escalation vulnerability in WordPress REST API allows
-- | the visitors to edit any post on the site
-- | the visitors to edit any post on the site
-- | Versions 4.7.0 and 4.7.1 are known to be affected
-- |
-- |
-- | References:
-- |_ https://blog.sucuri.net/2017/02/content-injection-vulnerability-wordpress-rest-api.html
-- |_ https://blog.sucuri.net/2017/02/content-injection-vulnerability-wordpress-rest-api.html
--
-- @xmloutput
-- <table key="CVE-2017-1001000">
@@ -106,7 +104,7 @@ Versions 4.7.0 and 4.7.1 are known to be affected.
return vulnReport:make_output(vuln_table)
end
--Modifying the uri and checking for response.
--Modifying the uri and checking for response.
--Date modification request is being sent.
uri = uri ..id..'/'..'?id=' .. id ..'abc'..'&date='..content

View File

@@ -3,7 +3,6 @@ local ipOps = require "ipOps"
local table = require "table"
local shortport = require "shortport"
local stdnse = require "stdnse"
local string = require "string"
description = [[
A script to detect WebDAV installations. Uses the OPTIONS and PROPFIND methods.
@@ -180,4 +179,3 @@ function action (host, port)
if #output > 0 then return output else return nil end
end

View File

@@ -1,7 +1,6 @@
local comm = require "comm"
local os = require "os"
local datetime = require "datetime"
local bin = require "bin"
local shortport = require "shortport"
local sslcert = require "sslcert"
local stdnse = require "stdnse"

View File

@@ -1,4 +1,3 @@
local http = require "http"
local geoip = require "geoip"
local io = require "io"
local stdnse = require "stdnse"

View File

@@ -4,8 +4,6 @@ local ipmi = require "ipmi"
local nmap = require "nmap"
local shortport = require "shortport"
local stdnse = require "stdnse"
local string = require "string"
local table = require "table"
description = [[
Performs brute force password auditing against IPMI RPC server.

View File

@@ -5,7 +5,6 @@ local stdnse = require "stdnse"
local string = require "string"
local table = require "table"
local multicast = require "multicast"
local math = require "math"
description = [[
Uses Multicast Listener Discovery to list the multicast addresses subscribed to

View File

@@ -1,4 +1,3 @@
local bin = require "bin"
local comm = require "comm"
local ldap = require "ldap"
local shortport = require "shortport"

View File

@@ -1,6 +1,4 @@
local io = require "io"
local string = require "string"
local table = require "table"
local nmap = require "nmap"
local stdnse = require "stdnse"
local shortport = require "shortport"
@@ -9,7 +7,6 @@ local creds = require "creds"
local unpwdb = require "unpwdb"
local drda = require "drda"
local comm = require "comm"
local nsedebug = require "nsedebug"
description = [[
z/OS JES Network Job Entry (NJE) 'I record' password brute forcer.

View File

@@ -2,7 +2,6 @@ local bin = require "bin"
local comm = require "comm"
local datetime = require "datetime"
local os = require "os"
local math = require "math"
local nmap = require "nmap"
local shortport = require "shortport"
local stdnse = require "stdnse"

View File

@@ -2,7 +2,6 @@ local bin = require "bin"
local nmap = require "nmap"
local shortport = require "shortport"
local stdnse = require "stdnse"
local table = require "table"
description = [[
This NSE script is used to send a FINS packet to a remote device. The script

View File

@@ -1,4 +1,3 @@
local bin = require "bin"
local ipOps = require "ipOps"
local math = require "math"
local nmap = require "nmap"
@@ -398,4 +397,3 @@ action = function(host)
return "" .. MTUS[m] .. " <= PMTU < " .. MTUS[m - 1]
end
end

View File

@@ -1,7 +1,6 @@
local comm = require "comm"
local os = require "os"
local datetime = require "datetime"
local bin = require "bin"
local shortport = require "shortport"
local stdnse = require "stdnse"
local base64 = require "base64"

View File

@@ -1,4 +1,3 @@
local bin = require "bin"
local rmi = require "rmi"
local shortport = require "shortport"
local string = require "string"

View File

@@ -1,4 +1,3 @@
local bin = require "bin"
local smb = require "smb"
local vulns = require "vulns"
local stdnse = require "stdnse"

View File

@@ -1,6 +1,5 @@
local smb = require "smb"
local stdnse = require "stdnse"
local string = require "string"
local nmap = require "nmap"
description = [[
@@ -23,8 +22,8 @@ script is the successor to the (removed) smbv2-enabled script.
-- @usage nmap -p139 --script smb-protocols <target>
--
-- @output
-- | smb-protocols:
-- | dialects:
-- | smb-protocols:
-- | dialects:
-- | NT LM 0.12 (SMBv1) [dangerous, but default]
-- | 2.02
-- | 2.10
@@ -52,7 +51,7 @@ hostrule = function(host)
end
action = function(host,port)
local status, supported_dialects, overrides
local status, supported_dialects, overrides
local output = stdnse.output_table()
overrides = {}
status, supported_dialects = smb.list_dialects(host, overrides)
@@ -62,7 +61,7 @@ action = function(host,port)
supported_dialects[i] = v .. " (SMBv1) [dangerous, but default]"
end
end
output.dialects = supported_dialects
output.dialects = supported_dialects
end
if #output.dialects>0 then

View File

@@ -1,7 +1,6 @@
local msrpc = require "msrpc"
local nmap = require "nmap"
local smb = require "smb"
local stdnse = require "stdnse"
local string = require "string"
local table = require "table"
local vulns = require "vulns"

View File

@@ -1,8 +1,6 @@
local msrpc = require "msrpc"
local nmap = require "nmap"
local smb = require "smb"
local stdnse = require "stdnse"
local string = require "string"
local table = require "table"
local vulns = require "vulns"

View File

@@ -2,7 +2,6 @@ local msrpc = require "msrpc"
local nmap = require "nmap"
local smb = require "smb"
local stdnse = require "stdnse"
local string = require "string"
local table = require "table"
local vulns = require "vulns"

View File

@@ -1,7 +1,6 @@
local msrpc = require "msrpc"
local nmap = require "nmap"
local smb = require "smb"
local stdnse = require "stdnse"
local string = require "string"
local table = require "table"
local vulns = require "vulns"

View File

@@ -1,8 +1,6 @@
local msrpc = require "msrpc"
local nmap = require "nmap"
local smb = require "smb"
local stdnse = require "stdnse"
local string = require "string"
local table = require "table"
local vulns = require "vulns"

View File

@@ -1,7 +1,6 @@
local smb = require "smb"
local smb2 = require "smb2"
local stdnse = require "stdnse"
local string = require "string"
local table = require "table"
local nmap = require "nmap"
@@ -26,10 +25,10 @@ References:
-- @usage nmap -p 139 --script smb2-capabilities <target>
--
-- @output
-- | smb2-capabilities:
-- | 2.02:
-- | smb2-capabilities:
-- | 2.02:
-- | Distributed File System
-- | 2.10:
-- | 2.10:
-- | Distributed File System
-- | Leasing
-- | Multi-credit operations
@@ -54,7 +53,7 @@ hostrule = function(host)
end
action = function(host,port)
local status, smbstate, overrides
local status, smbstate, overrides
local output = stdnse.output_table()
overrides = {}

View File

@@ -1,7 +1,6 @@
local smb = require "smb"
local smb2 = require "smb2"
local stdnse = require "stdnse"
local string = require "string"
local table = require "table"
local nmap = require "nmap"
@@ -22,8 +21,8 @@ References:
-- @usage nmap -p 139 --script smb2-security-mode <target>
--
-- @output
-- | smb2-security-mode:
-- | 3.11:
-- | smb2-security-mode:
-- | 3.11:
-- |_ Message signing enabled but not required
--
-- @xmloutput
@@ -41,7 +40,7 @@ hostrule = function(host)
end
action = function(host,port)
local status, smbstate, overrides
local status, smbstate, overrides
local output = stdnse.output_table()
overrides = overrides or {}
@@ -61,7 +60,7 @@ action = function(host,port)
-- Signing configuration. SMBv2 servers support two flags:
-- * Message signing enabled
-- * Message signing required
local signing_enabled, signing_required
local signing_enabled, signing_required
if smbstate['security_mode'] & 0x01 == 0x01 then
signing_enabled = true
end
@@ -77,9 +76,9 @@ action = function(host,port)
table.insert(message_signing, "Message signing is disabled and not required!")
elseif not(signing_enabled) and signing_required then
table.insert(message_signing, "Message signing is disabled!")
end
output[stdnse.tohex(dialect[1], {separator = ".", group = 2})] = message_signing
-- We exit after first accepted dialect,
end
output[stdnse.tohex(dialect[1], {separator = ".", group = 2})] = message_signing
-- We exit after first accepted dialect,
-- SMB signing configuration appears to be global so
-- there is no point of trying other dialects.
break

View File

@@ -1,7 +1,6 @@
local datetime = require "datetime"
local os = require "os"
local smtp = require "smtp"
local bin = require "bin"
local shortport = require "shortport"
local stdnse = require "stdnse"
local base64 = require "base64"

View File

@@ -6,7 +6,6 @@ local packet = require "packet"
local shortport = require "shortport"
local snmp = require "snmp"
local stdnse = require "stdnse"
local string = require "string"
local unpwdb = require "unpwdb"
description = [[
@@ -269,4 +268,3 @@ action = function(host, port)
stdnse.debug1("An error occurred: "..result.msg)
end
end

View File

@@ -2,7 +2,6 @@ local io = require "io"
local nmap = require "nmap"
local shortport = require "shortport"
local stdnse = require "stdnse"
local string = require "string"
local sslcert = require "sslcert"
local tls = require "tls"

View File

@@ -2,7 +2,6 @@ local coroutine = require "coroutine"
local ipOps = require "ipOps"
local math = require "math"
local nmap = require "nmap"
local os = require "os"
local packet = require "packet"
local stdnse = require "stdnse"
local string = require "string"

View File

@@ -1,5 +1,3 @@
local bin = require "bin"
local bit = require "bit"
local nmap = require "nmap"
local rpc = require "rpc"
local shortport = require "shortport"