├── NSE ├── README.SpiderLabs └── http-screenshot.nse └── README.md /NSE/README.SpiderLabs: -------------------------------------------------------------------------------- 1 | NSE Scripts 2 | ========== 3 | 4 | This subdirectory contains Nmap Scripting Engine (NSE) scripts. These files should be placed 5 | in the Nmap NSE script directory, usuaully kept in: 6 | /usr/local/share/nmap/scripts 7 | /usr/share/nmap/scripts 8 | 9 | To place the files there, you can simply copy the contents of this directory to the target 10 | directory. EG: 11 | 12 | cp *.nse /usr/local/share/nmap/scripts 13 | 14 | Then to pull in the additional scripts to the database, run: 15 | nmap --script-updatedb 16 | 17 | 18 | Copyright 19 | ========= 20 | Copyright (C) 2012 Trustwave Holdings, Inc. 21 | 22 | This program is free software: you can redistribute it and/or modify 23 | it under the terms of the GNU General Public License as published by 24 | the Free Software Foundation, either version 3 of the License, or 25 | (at your option) any later version. 26 | 27 | This program is distributed in the hope that it will be useful, 28 | but WITHOUT ANY WARRANTY; without even the implied warranty of 29 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 30 | GNU General Public License for more details. 31 | 32 | You should have received a copy of the GNU General Public License 33 | along with this program. If not, see 34 | 35 | -------------------------------------------------------------------------------- /NSE/http-screenshot.nse: -------------------------------------------------------------------------------- 1 | -- Copyright (C) 2012 Trustwave 2 | -- http://www.trustwave.com 3 | -- 4 | -- This program is free software; you can redistribute it and/or modify 5 | -- it under the terms of the GNU General Public License as published by 6 | -- the Free Software Foundation; version 2 dated June, 1991 or at your option 7 | -- any later version. 8 | -- 9 | -- This program is distributed in the hope that it will be useful, 10 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | -- GNU General Public License for more details. 13 | -- 14 | -- A copy of the GNU General Public License is available in the source tree; 15 | -- if not, write to the Free Software Foundation, Inc., 16 | -- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | description = [[ 19 | Gets a screenshot from the host 20 | ]] 21 | 22 | author = "Ryan Linn " 23 | 24 | license = "GPLv2" 25 | 26 | categories = {"discovery", "safe"} 27 | 28 | -- Updated the NSE Script imports and variable declarations 29 | local shortport = require "shortport" 30 | 31 | local stdnse = require "stdnse" 32 | 33 | portrule = shortport.http 34 | 35 | action = function(host, port) 36 | -- Check to see if ssl is enabled, if it is, this will be set to "ssl" 37 | local ssl = port.version.service_tunnel 38 | 39 | -- The default URLs will start with http:// 40 | local prefix = "http" 41 | 42 | -- Screenshots will be called screenshot-namp-:.png 43 | local filename = "screenshot-nmap-" .. host.ip .. ":" .. port.number .. ".png" 44 | 45 | -- If SSL is set on the port, switch the prefix to https 46 | if ssl == "ssl" then 47 | prefix = "https" 48 | end 49 | 50 | -- Execute the shell command wkhtmltoimage-i386 51 | local cmd = "wkhtmltoimage-i386 -n " .. prefix .. "://" .. host.ip .. ":" .. port.number .. " " .. filename .. " 2> /dev/null >/dev/null" 52 | 53 | local ret = os.execute(cmd) 54 | 55 | -- If the command was successful, print the saved message, otherwise print the fail message 56 | local result = "failed (verify wkhtmltoimage-i386 is in your path)" 57 | 58 | if ret then 59 | result = "Saved to " .. filename 60 | end 61 | 62 | -- Return the output message 63 | return stdnse.format_output(true, result) 64 | 65 | end 66 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | :warning: *NOTE: This tool is no longer under active maintenance.* 2 | 3 | Nmap-Tools 4 | ========== 5 | 6 | This repository is to host Nmap scripts and tools that may be helpful to penetration testers 7 | or security researchers. 8 | 9 | Contents: 10 | /NSE - Nmap Scripting Engine (NSE) plugins 11 | --- http-screenshot.nse - Takes a screenshot using wkhtmltoimage-i386 of found web pages 12 | 13 | 14 | 15 | 16 | 17 | Copyright 18 | ========= 19 | Copyright (C) 2012 Trustwave Holdings, Inc. 20 | 21 | This program is free software: you can redistribute it and/or modify 22 | it under the terms of the GNU General Public License as published by 23 | the Free Software Foundation, either version 3 of the License, or 24 | (at your option) any later version. 25 | 26 | This program is distributed in the hope that it will be useful, 27 | but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | GNU General Public License for more details. 30 | 31 | You should have received a copy of the GNU General Public License 32 | along with this program. If not, see 33 | 34 | --------------------------------------------------------------------------------