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

16 Commits

Author SHA1 Message Date
dmiller
0500811f5a Move string utility functions to stringaux.lua 2018-10-18 01:08:19 +00:00
dmiller
c7892e365f Let http.lua functions optionally connect via any address family
Sometimes (e.g. when using an external API), a script wants to connect
by name to a server and doesn't care whether IPv4 or IPv6 is used. By
passing the "any_af" option, the first resolved address of any address
family will be used, allowing external-category scripts which used to
fail with -6 to succeed.
2016-03-16 05:07:59 +00:00
dmiller
f4619edece Update http urls for nmap.org to https 2015-11-05 20:41:05 +00:00
dmiller
7852fa3c18 Remove many ERROR outputs from non-debug NSE output 2015-08-27 20:43:55 +00:00
dmiller
339f0ffd7d Fix NSEdoc: wrap lines, fix bulleted lists 2015-07-11 04:01:05 +00:00
batrick
810f7d4803 more stdnse.print_debug -> stdnse.debug
This is a catchall pattern with a few exclusions.

$ sed -i 's/stdnse.print_debug( *\([0-9]*\) *, *\(.*\))/stdnse.debug\1(\2)/' *.nse
$ sed -i 's/stdnse.print_debug(\(.*\))/stdnse.debug1(\1)/' *.nse

Excluded:
$ svn revert db2-das-info.nse
$ svn revert flume-master-info.nse
$ svn revert http-headers.nse
$ svn revert http-methods.nse
$ svn revert http-unsafe-output-escaping.nse
$ svn revert http-userdir-enum.nse
$ svn revert http-vuln-cve2011-3192.nse
$ svn revert http-vuln-wnr1000-creds.nse
$ svn revert http-wordpress-plugins.nse
$ svn revert telnet-brute.nse
2014-08-02 02:46:16 +00:00
batrick
5161b8642a stdnse.print_debug -> stdnse.debug1
$ sed -i 's/stdnse.print_debug(1, "%s: \([^"]*\)", SCRIPT_NAME/stdnse.debug1("\1"/' *.nse
2014-08-01 21:29:42 +00:00
dmiller
d36c08dcf5 Re-indent some scripts. Whitespace-only commit
https://secwiki.org/w/Nmap/Code_Standards
2014-01-31 13:02:29 +00:00
dmiller
620f9fdb34 Remove trailing whitespace in lua files
Whitespace is not significant, so this should not be a problem.
https://secwiki.org/w/Nmap/Code_Standards
2014-01-23 21:51:58 +00:00
dmiller
31bc2847bd Normalize script author fields
Clean up some typos and differences. Most have been normalized to
whatever form of the name occurred in the largest number of scripts.
Paulino was contacted directly and requested his email be added to all
of his credits.
2013-09-20 18:56:22 +00:00
patrik
be858f4a7d further improoved http-google-malware.nse malware detection by adding response
code checks.
2012-07-24 10:33:39 +00:00
patrik
b0c8a758a0 fixed bug where script would return "Host is safe to browse.", when an invalid
API key was being used.
2012-07-24 10:11:09 +00:00
batrick
000f6dc4d9 Lua 5.2 upgrade [1] for NSE.
[1] http://seclists.org/nmap-dev/2012/q2/34
2012-05-27 08:53:32 +00:00
fyodor
2ff08a24a1 Update some script nsedoc descriptions for consistency. The description should almost always start with an active verb and never with the script name or 'this script'. Admittedly that makes the first sentence a fragment. The first sentence should be capitalized 2011-09-11 20:50:56 +00:00
paulino
1d150dd875 Fix to use stdnse.get_script_args() instead of getting the arguments from the registry. 2011-07-09 19:59:13 +00:00
paulino
458504c1ab Adds http-google-malware:
description = [[
http-google-malware checks if hosts are on Google's blacklist of suspected malware and phishing servers. These lists are constantly updated and are part of Google's Safe Browsing service.

To do this the script queries the Google's Safe Browsing service and you need to have your own API key to access Google's Safe Browsing Lookup services. Sign up for yours at http://code.google.com/apis/safebrowsing/key_signup.html

* To learn more about Google's Safe Browsing:
http://code.google.com/apis/safebrowsing/

* To register and get your personal API key: 
http://code.google.com/apis/safebrowsing/key_signup.html
]]

---
-- @usage
-- nmap -p80 --script http-google-malware <host>
--
-- @output
-- PORT   STATE SERVICE
-- 80/tcp open  http
-- |_http-google-malware.nse: Host is known for distributing malware.
--
-- @args http-google-malware.url URL to check. Default: <code>http/https</code>://<code>host</code> 
-- @args http-google-malware.api API key for Google's Safe Browsing Lookup service
---
2011-07-08 18:45:49 +00:00