mirror of
https://github.com/nmap/nmap.git
synced 2025-12-08 21:51:28 +00:00
Use stdnse.silent_require where needed.
This is required for scripts that require "openssl", but also transitively for script that require a library that requires "openssl".
This commit is contained in:
@@ -22,9 +22,10 @@ license = "Same as Nmap--See http://nmap.org/book/man-legal.html"
|
|||||||
categories = {"discovery", "safe"}
|
categories = {"discovery", "safe"}
|
||||||
|
|
||||||
require 'shortport'
|
require 'shortport'
|
||||||
require 'bitcoin'
|
|
||||||
require 'tab'
|
require 'tab'
|
||||||
require 'target'
|
require 'target'
|
||||||
|
require 'stdnse'
|
||||||
|
stdnse.silent_require('bitcoin')
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Version 0.1
|
-- Version 0.1
|
||||||
|
|||||||
@@ -39,9 +39,9 @@ author = "Gorjan Petrovski"
|
|||||||
license = "Same as Nmap--See http://nmap.org/book/man-legal.html"
|
license = "Same as Nmap--See http://nmap.org/book/man-legal.html"
|
||||||
categories = {"discovery","safe"}
|
categories = {"discovery","safe"}
|
||||||
|
|
||||||
require "bittorrent"
|
|
||||||
require "stdnse"
|
|
||||||
require "target"
|
require "target"
|
||||||
|
require 'stdnse'
|
||||||
|
stdnse.silent_require('bittorrent')
|
||||||
|
|
||||||
prerule = function()
|
prerule = function()
|
||||||
if not stdnse.get_script_args(SCRIPT_NAME..".torrent") and
|
if not stdnse.get_script_args(SCRIPT_NAME..".torrent") and
|
||||||
|
|||||||
@@ -49,10 +49,10 @@ categories = {"discovery","safe","broadcast"}
|
|||||||
require "nmap"
|
require "nmap"
|
||||||
require "stdnse"
|
require "stdnse"
|
||||||
require "packet"
|
require "packet"
|
||||||
require "openssl"
|
|
||||||
require "bin"
|
require "bin"
|
||||||
require "tab"
|
require "tab"
|
||||||
require "target"
|
require "target"
|
||||||
|
stdnse.silent_require("openssl")
|
||||||
|
|
||||||
prerule = function()
|
prerule = function()
|
||||||
if not nmap.is_privileged() then
|
if not nmap.is_privileged() then
|
||||||
|
|||||||
@@ -49,7 +49,8 @@ require("http")
|
|||||||
require("shortport")
|
require("shortport")
|
||||||
require("tab")
|
require("tab")
|
||||||
require("vulns")
|
require("vulns")
|
||||||
require("openssl")
|
require("stdnse")
|
||||||
|
stdnse.silent_require("openssl")
|
||||||
|
|
||||||
portrule = shortport.http
|
portrule = shortport.http
|
||||||
|
|
||||||
@@ -132,4 +133,4 @@ locale parameter]],
|
|||||||
end
|
end
|
||||||
vuln.extra_info=stdnse.format_output(true, results)
|
vuln.extra_info=stdnse.format_output(true, results)
|
||||||
return vuln_report:make_output(vuln)
|
return vuln_report:make_output(vuln)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -29,8 +29,9 @@ author = "David Fifield"
|
|||||||
require("bin")
|
require("bin")
|
||||||
require("bit")
|
require("bit")
|
||||||
require("dns")
|
require("dns")
|
||||||
require("openssl")
|
require("stdnse")
|
||||||
require("packet")
|
require("packet")
|
||||||
|
stdnse.silent_require("openssl")
|
||||||
|
|
||||||
local ICMPv6_NODEINFOQUERY = 139
|
local ICMPv6_NODEINFOQUERY = 139
|
||||||
local ICMPv6_NODEINFOQUERY_IPv6ADDR = 0
|
local ICMPv6_NODEINFOQUERY_IPv6ADDR = 0
|
||||||
|
|||||||
@@ -26,7 +26,8 @@ require "bin"
|
|||||||
require "stdnse"
|
require "stdnse"
|
||||||
require "target"
|
require "target"
|
||||||
require "nmap"
|
require "nmap"
|
||||||
require "openssl"
|
require "stdnse"
|
||||||
|
stdnse.silent_require("openssl")
|
||||||
|
|
||||||
prerule = function()
|
prerule = function()
|
||||||
if not nmap.is_privileged() then
|
if not nmap.is_privileged() then
|
||||||
|
|||||||
@@ -17,8 +17,9 @@ Performs brute force password auditing against the MongoDB database.
|
|||||||
--
|
--
|
||||||
|
|
||||||
require 'brute'
|
require 'brute'
|
||||||
require 'mongodb'
|
|
||||||
require 'shortport'
|
require 'shortport'
|
||||||
|
require 'stdnse'
|
||||||
|
stdnse.silent_require('mongodb')
|
||||||
|
|
||||||
author = "Patrik Karlsson"
|
author = "Patrik Karlsson"
|
||||||
license = "Same as Nmap--See http://nmap.org/book/man-legal.html"
|
license = "Same as Nmap--See http://nmap.org/book/man-legal.html"
|
||||||
|
|||||||
@@ -40,8 +40,9 @@ categories = {"default", "discovery", "safe"}
|
|||||||
dependencies = {"mongodb-brute"}
|
dependencies = {"mongodb-brute"}
|
||||||
|
|
||||||
require "creds"
|
require "creds"
|
||||||
require "mongodb"
|
|
||||||
require "shortport"
|
require "shortport"
|
||||||
|
require 'stdnse'
|
||||||
|
stdnse.silent_require('mongodb')
|
||||||
|
|
||||||
portrule = shortport.port_or_service({27017}, {"mongodb"})
|
portrule = shortport.port_or_service({27017}, {"mongodb"})
|
||||||
|
|
||||||
|
|||||||
@@ -53,8 +53,9 @@ categories = {"default", "discovery", "safe"}
|
|||||||
dependencies = {"mongodb-brute"}
|
dependencies = {"mongodb-brute"}
|
||||||
|
|
||||||
require "creds"
|
require "creds"
|
||||||
require "mongodb"
|
|
||||||
require "shortport"
|
require "shortport"
|
||||||
|
require 'stdnse'
|
||||||
|
stdnse.silent_require('mongodb')
|
||||||
|
|
||||||
local arg_db = stdnse.get_script_args(SCRIPT_NAME .. ".db") or "admin"
|
local arg_db = stdnse.get_script_args(SCRIPT_NAME .. ".db") or "admin"
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ Performs brute force password auditing against the rsync remote file syncing pro
|
|||||||
|
|
||||||
require 'shortport'
|
require 'shortport'
|
||||||
require 'brute'
|
require 'brute'
|
||||||
require 'rsync'
|
require 'stdnse'
|
||||||
|
stdnse.silent_require('rsync')
|
||||||
|
|
||||||
author = "Patrik Karlsson"
|
author = "Patrik Karlsson"
|
||||||
license = "Same as Nmap--See http://nmap.org/book/man-legal.html"
|
license = "Same as Nmap--See http://nmap.org/book/man-legal.html"
|
||||||
|
|||||||
@@ -34,7 +34,8 @@ categories = {"discovery", "safe"}
|
|||||||
|
|
||||||
require 'shortport'
|
require 'shortport'
|
||||||
require 'ipOps'
|
require 'ipOps'
|
||||||
require 'vuzedht'
|
require 'stdnse'
|
||||||
|
stdnse.silent_require('vuzedht')
|
||||||
|
|
||||||
portrule = function(host, port)
|
portrule = function(host, port)
|
||||||
local allports = stdnse.get_script_args('vuze-dht-info.allports')
|
local allports = stdnse.get_script_args('vuze-dht-info.allports')
|
||||||
@@ -79,4 +80,4 @@ action = function(host, port)
|
|||||||
nmap.set_port_state(host, port, "open")
|
nmap.set_port_state(host, port, "open")
|
||||||
return tostring(response)
|
return tostring(response)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user