├── .github
├── CODE_OF_CONDUCT.md
└── CONTRIBUTING.md
├── .gitignore
├── .gitmodules
├── .travis.yml
├── LICENSE.md
├── README.md
├── bin
└── sandmap
├── data
├── modules
│ ├── awesome.mod
│ ├── host_discovery.mod
│ ├── nse_broadcast.mod
│ ├── nse_citrix.mod
│ ├── nse_databases.mod
│ ├── nse_dns-dhcp.mod
│ ├── nse_external.mod
│ ├── nse_ftp.mod
│ ├── nse_hadoop.mod
│ ├── nse_http-cve.mod
│ ├── nse_http-protocol.mod
│ ├── nse_http-services.mod
│ ├── nse_mail.mod
│ ├── nse_oracle.mod
│ ├── nse_other-auth.mod
│ ├── nse_other-discovery.mod
│ ├── nse_other-network.mod
│ ├── nse_other-services.mod
│ ├── nse_other-version.mod
│ ├── nse_remote-access.mod
│ ├── nse_smb-vuln.mod
│ ├── nse_smb.mod
│ ├── nse_snmp.mod
│ ├── nse_socks.mod
│ ├── nse_ssl.mod
│ ├── nse_vuln-scanners.mod
│ ├── nse_whois.mod
│ ├── os_detection.mod
│ ├── port_scan.mod
│ ├── service_detection.mod
│ └── zenmap.mod
└── output
│ └── .gitkeep
├── etc
├── main.cfg
└── sandmap-completion
├── lib
├── cli_distributor
├── cli_help
├── cli_show
├── init_cli
├── init_config
├── init_module
├── init_search
├── init_session
├── load_modules
├── module_help
├── module_info
├── module_show
├── set_config
└── show_config
├── log
└── .gitkeep
├── setup.sh
├── src
├── __init__
├── helpers
├── import
└── settings
├── static
├── img
│ └── sandmap_blackarch.png
└── man8
│ └── sandmap.8
├── templates
├── sample.cfg
└── sample.mod
└── tmp
└── .gitkeep
/.github/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6 |
7 | ## Our Standards
8 |
9 | Examples of behavior that contributes to creating a positive environment include:
10 |
11 | * Using welcoming and inclusive language
12 | * Being respectful of differing viewpoints and experiences
13 | * Gracefully accepting constructive criticism
14 | * Focusing on what is best for the community
15 | * Showing empathy towards other community members
16 |
17 | Examples of unacceptable behavior by participants include:
18 |
19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances
20 | * Trolling, insulting/derogatory comments, and personal or political attacks
21 | * Public or private harassment
22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission
23 | * Other conduct which could reasonably be considered inappropriate in a professional setting
24 |
25 | ## Our Responsibilities
26 |
27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28 |
29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30 |
31 | ## Scope
32 |
33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34 |
35 | ## Enforcement
36 |
37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at trimstray@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38 |
39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40 |
41 | ## Attribution
42 |
43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44 |
45 | [homepage]: http://contributor-covenant.org
46 | [version]: http://contributor-covenant.org/version/1/4/
47 |
--------------------------------------------------------------------------------
/.github/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 |
3 | > _A real community, however, exists only when its members interact in a meaningful way that deepens their understanding of each other and leads to learning._
4 |
5 | If you would like to support this project, have an interesting idea how to improve the operation of this tool, or if you found some errors - fork this, add your fixes, and add a pull request of your branch to the **master branch**.
6 |
7 | ## Using the issue tracker
8 |
9 | The [issue tracker](https://github.com/trimstray/sandmap/issues) is
10 | the preferred channel for bug reports, features requests and submitting pull requests, but please respect the following restrictions:
11 |
12 | * Please **do not** use the issue tracker for personal support requests (use
13 | [Stack Overflow](https://stackoverflow.com) or IRC)
14 |
15 | * Please **do not** derail or troll issues. Keep the discussion on topic and
16 | respect the opinions of others
17 |
18 | ## Bash style
19 |
20 | I would like you to stick to certain standards of writing in bash. I realize that it is not easy and time-consuming if you have certain habits. I do not expect 100% compliance and adherence to good practices, however, I would like you to try to use certain principles.
21 |
22 | The following should help:
23 |
24 | - [http://wiki.bash-hackers.org/](http://wiki.bash-hackers.org/)
25 | - [https://google.github.io/styleguide/shell.xml](https://google.github.io/styleguide/shell.xml)
26 | - [https://github.com/progrium/bashstyle](https://github.com/progrium/bashstyl)
27 | - [http://kvz.io/blog/2013/11/21/bash-best-practices/](http://kvz.io/blog/2013/11/21/bash-best-practices/)
28 |
29 | ## Shellcheck
30 |
31 | One of the requirements before approving your changes is to check them with the **shellcheck** utility. If the returned errors are not critical (eg. [SC2154](https://github.com/koalaman/shellcheck/wiki/SC2154)) you can use the `shellcheck disable=SC2154` design.
32 |
33 | ## Signature of commit
34 |
35 | Moving forward all commits to this project must include a "signed-off-by" line indicating the name and email address of the contributor signing off on the change. To enable signatures add the following lines to `.git/hooks/prepare-commit-msg` :
36 |
37 | ```
38 | SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/- signed-off-by: \1/p')
39 | grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
40 | ```
41 |
42 | ## Pull requests
43 |
44 | When creating a pull request, please heed the following:
45 |
46 | - Base your code on the latest master branch to avoid manual merges
47 | - Code review may ensue in order to help shape your proposal
48 | - Explain the problem and your proposed solution
49 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # This is where the result of the script output.
2 | log/*
3 | !/log/.gitkeep
4 |
5 | # Temporary files.
6 | tmp/*
7 | !/tmp/.gitkeep
8 |
9 | # Not tracking module config files.
10 | data/modules/*.cfg
11 |
12 | # Nmap output scans.
13 | data/output/*
14 | !/data/output/.gitkeep
15 |
16 | # Temporary files.
17 | tmp/.static*
18 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "data/nse_external/vulscan"]
2 | path = data/nse_external/vulscan
3 | url = https://github.com/scipag/vulscan.git
4 | [submodule "data/nse_external/vulners"]
5 | path = data/nse_external/vulners
6 | url = https://github.com/vulnersCom/nmap-vulners.git
7 | [submodule "data/nse_external/s4n7h0"]
8 | path = data/nse_external/s4n7h0
9 | url = https://github.com/s4n7h0/NSE
10 | [submodule "data/nse_external/michenriksen"]
11 | path = data/nse_external/michenriksen
12 | url = https://github.com/michenriksen/nmap-scripts.git
13 | [submodule "data/nse_external/httprecon-nse"]
14 | path = data/nse_external/httprecon-nse
15 | url = https://github.com/scipag/httprecon-nse.git
16 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | branches:
2 | only:
3 | - master
4 | - testing
5 |
6 | language: bash
7 |
8 | sudo: required
9 | dist: trusty
10 |
11 | before_install:
12 | - sudo apt-add-repository "deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse"
13 | - sudo apt-get -qq update
14 | - sudo apt-get -t trusty-backports install shellcheck
15 |
16 | ### --> https://github.com/travis-ci/travis-ci/issues/9484
17 | # - curl -sSL "https://ftp-master.debian.org/keys/archive-key-7.0.asc" | sudo -E apt-key add -
18 | # - echo "deb http://ftp.us.debian.org/debian unstable main contrib non-free" | sudo tee -a /etc/apt/sources.list > /dev/null
19 | # - sudo apt-get update
20 | # - sudo apt-get install shellcheck
21 | ### -->
22 |
23 | # after_success:
24 | # - test $TRAVIS_PULL_REQUEST = false && git push
25 |
26 | script:
27 | - shellcheck --version
28 | - shellcheck -s bash -e 1072,1094 -x src/* -x lib/* bin/sandmap
29 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
sandmap
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | ## Description
42 |
43 | `sandmap` is a tool supporting network and system reconnaissance using the massive **Nmap engine**. It provides a user-friendly interface, automates and speeds up scanning and allows you to easily use many advanced scanning techniques.
44 |
45 | ### Key Features
46 |
47 | - simple **CLI** with the ability to run pure **Nmap engine**
48 | - predefined scans included in the **modules**
49 | - support **Nmap Scripting Engine** (NSE) with scripts arguments
50 | - **TOR** support (with proxychains)
51 | - multiple scans at one time
52 | - at this point: **31** modules with **459** scan profiles
53 |
54 | ## How To Use
55 |
56 | It's simple:
57 |
58 | ```bash
59 | # Clone this repository
60 | git clone --recursive https://github.com/trimstray/sandmap
61 |
62 | # Go into the repository
63 | cd sandmap
64 |
65 | # Install
66 | ./setup.sh install
67 |
68 | # Run the app
69 | sandmap
70 | ```
71 |
72 | > * symlink to `bin/sandmap` is placed in `/usr/local/bin`
73 | > * man page is placed in `/usr/local/man/man8`
74 |
75 | ## Command Line
76 |
77 | Before using the `sandmap` read the **Command Line** introduction.
78 |
79 | ## Configuration
80 |
81 | The `etc/main.cfg` configuration file has the following structure:
82 |
83 | ```bash
84 | # shellcheck shell=bash
85 |
86 | # Specifies the default destination.
87 | # Examples:
88 | # - dest="127.0.0.1,8.8.8.8"
89 | dest="127.0.0.1"
90 |
91 | # Specifies the extended Nmap parameters.
92 | # Examples:
93 | # - params="--script ssl-ccs-injection -p 443"
94 | params=""
95 |
96 | # Specifies the default output type and path.
97 | # Examples:
98 | # - report="xml"
99 | report=""
100 |
101 | # Specifies the TOR connection.
102 | # Examples:
103 | # - tor="true"
104 | tor=""
105 |
106 | # Specifies the terminal type.
107 | # Examples:
108 | # - terminal="internal"
109 | terminal="internal"
110 | ```
111 |
112 | ## Requirements
113 |
114 | `sandmap` uses external utilities to be installed before running:
115 |
116 | - [nmap](https://nmap.org/)
117 | - [xterm](https://invisible-island.net/xterm/)
118 | - [proxychains](http://proxychains.sourceforge.net/)
119 |
120 | This tool working with:
121 |
122 | - **GNU/Linux** (testing on Debian and CentOS)
123 | - **Bash** (testing on 4.4.19)
124 | - **Nmap** (testing on 7.70)
125 |
126 | Also you will need **root access**.
127 |
128 | ## Other
129 |
130 | ### Modules
131 |
132 | Available modules: **31**
133 | Available scan profiles: **459**
134 |
135 | > If you want to create your own modules, take a look **[this](https://github.com/trimstray/sandmap/wiki/Modules)**.
136 |
137 | ### Project architecture
138 |
139 | See **[this](https://github.com/trimstray/sandmap/wiki/Project-architecture)**.
140 |
141 | ## Contributing
142 |
143 | See **[this](.github/CONTRIBUTING.md)**.
144 |
145 | ## License
146 |
147 | GPLv3 :
148 |
149 | **Free software, Yeah!**
150 |
--------------------------------------------------------------------------------
/bin/sandmap:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ### BEG SCRIPT INFO
4 | #
5 | # Header:
6 | #
7 | # fname : "sandmap"
8 | # cdate : "14.03.2018"
9 | # author : "Michał Żurawski "
10 | # tab_size : "2"
11 | # soft_tabs : "yes"
12 | #
13 | # Description:
14 | #
15 | # See README.md file for more information.
16 | #
17 | # License:
18 | #
19 | # sandmap, Copyright (C) 2018 Michał Żurawski
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 | ### END SCRIPT INFO
35 |
36 |
37 | # The array that store call parameters.
38 | # shellcheck disable=SC2034
39 | __init_params=()
40 | __script_params=("$@")
41 |
42 | # Store the name of the script and directory call.
43 | readonly _init_name="$(basename "$0")"
44 | readonly _init_directory="$(dirname "$(readlink -f "$0")")"
45 |
46 | # Set root directory.
47 | readonly _rel="${_init_directory}/.."
48 |
49 | # Directory structure.
50 | # shellcheck disable=SC2154
51 | readonly _src="${_rel}/src"
52 | readonly _lib="${_rel}/lib"
53 | readonly _cfg="${_rel}/etc"
54 | readonly _tmp="${_rel}/tmp"
55 | readonly _dat="${_rel}/data"
56 | readonly _out="${_dat}/output"
57 | readonly _nse="${_dat}/nse_external"
58 |
59 | # shellcheck disable=SC1090,SC1091
60 | source "${_src}/settings"
61 | # shellcheck disable=SC1090
62 | source "${_src}/helpers"
63 | # shellcheck disable=SC1090
64 | source "${_src}/__init__"
65 |
66 |
67 | # We pass arguments to the __main__ function.
68 | # It is required if you want to run on arguments type $1, $2, ...
69 | __main__ "${__script_params[@]}"
70 |
71 | _exit_ "0"
72 |
--------------------------------------------------------------------------------
/data/modules/awesome.mod:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # shellcheck shell=bash
4 |
5 | # ``````````````````````````````````````````````````````````````````````````````
6 | # Function name: awesome()
7 | #
8 | # Description:
9 | # Awesome Nmap predefined commands module.
10 | #
11 | # Usage:
12 | # awesome
13 | #
14 | # Examples:
15 | # awesome
16 | #
17 |
18 | function awesome() {
19 |
20 | # shellcheck disable=SC2034
21 | local _FUNCTION_ID="awesome"
22 | local _STATE=0
23 |
24 | # User variables:
25 | # - module_name: store module name
26 | # - module_args: store module arguments
27 |
28 | export _module_show=
29 | export _module_help=
30 | export _module_opts=
31 | export _module_commands=
32 |
33 | # shellcheck disable=SC2034
34 | _module_variables=()
35 |
36 | # shellcheck disable=SC2034
37 | author="trimstray"
38 | contact="trimstray@gmail.com"
39 | description="Awesome Nmap predefined commands module"
40 |
41 | # shellcheck disable=SC2034,SC2154
42 | _module_cfg="${_modules}/${module_name}.cfg"
43 |
44 | touch "$_module_cfg"
45 |
46 | # shellcheck disable=SC2034,SC2154
47 | _module_help=$(printf "%s: \\e[1;32m%s\\e[m" "
48 | Module" "${module_name}")
49 |
50 | _module_help+=$(printf "%s" "
51 |
52 | Description
53 | -----------
54 |
55 | Awesome Nmap predefined commands module.
56 |
57 | Commands
58 | --------
59 |
60 | help display module or NSE help
61 | show display module or profile info
62 | config show module configuration
63 | set set module variable value
64 | use reuse module (changed env)
65 | pushd |init|show|flush command line commands stack
66 | search search key in all commands
67 | init [--args] run profile
68 |
69 | Options:
70 |
71 | key value
72 | profile alias or id
73 |
74 | ")
75 |
76 | # shellcheck disable=SC2154
77 | if [[ "$_mstate" -eq 0 ]] ; then
78 |
79 | if [[ -e "$_module_cfg" ]] && [[ -s "$_module_cfg" ]] ; then
80 |
81 | # shellcheck disable=SC1090
82 | source "$_module_cfg"
83 |
84 | else
85 |
86 | # shellcheck disable=SC2034
87 | _module_variables=()
88 |
89 | if [[ "${#_module_variables[@]}" -ne 0 ]] ; then
90 |
91 | printf "_module_variables=(\"%s\")\\n" "${_module_variables[@]}" > "$_module_cfg"
92 |
93 | fi
94 |
95 | _mstate=1
96 |
97 | fi
98 |
99 | else
100 |
101 | # shellcheck disable=SC1090
102 | source "$_module_cfg"
103 |
104 | fi
105 |
106 | # In the given commands you can use variables from the CLI config
107 | # command or the etc/main.cfg file.
108 |
109 | # shellcheck disable=SC2034
110 | _module_commands=(\
111 | #
112 | "Show only open ports;\
113 | ;open_ports;-F --open" \
114 | #
115 | "Base scan;\
116 | ;base_scan;-sU -sT -p U:53,T:22,25,80,110,443" \
117 | #
118 | "Top 25 ports;\
119 | ;top_25;--top-ports 20" \
120 | )
121 |
122 | # shellcheck disable=SC2034,SC2154
123 | _module_show=(\
124 | "${module_name}" \
125 | "${#_module_commands[@]}" \
126 | "${author}" \
127 | "${contact}" \
128 | "${description}" \
129 | )
130 |
131 | # shellcheck disable=SC2034
132 | export _module_opts=(\
133 | "$_module_help")
134 |
135 | return $_STATE
136 |
137 | }
138 |
--------------------------------------------------------------------------------
/data/modules/host_discovery.mod:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # shellcheck shell=bash
4 |
5 | # ``````````````````````````````````````````````````````````````````````````````
6 | # Function name: host_discovery()
7 | #
8 | # Description:
9 | # Nmap Host Discovery module.
10 | #
11 | # Usage:
12 | # host_discovery
13 | #
14 | # Examples:
15 | # host_discovery
16 | #
17 |
18 | function host_discovery() {
19 |
20 | # shellcheck disable=SC2034
21 | local _FUNCTION_ID="host_discovery"
22 | local _STATE=0
23 |
24 | # User variables:
25 | # - module_name: store module name
26 | # - module_args: store module arguments
27 |
28 | export _module_show=
29 | export _module_help=
30 | export _module_opts=
31 | export _module_commands=
32 |
33 | # shellcheck disable=SC2034
34 | _module_variables=()
35 |
36 | # shellcheck disable=SC2034
37 | author="trimstray"
38 | contact="trimstray@gmail.com"
39 | version="1.0"
40 | description="Nmap Host Discovery module"
41 |
42 | # shellcheck disable=SC2034,SC2154
43 | _module_cfg="${_modules}/${module_name}.cfg"
44 |
45 | touch "$_module_cfg"
46 |
47 | # shellcheck disable=SC2034,SC2154
48 | _module_help=$(printf "%s: \\e[1;32m%s\\e[m" "
49 | Module" "${module_name}")
50 |
51 | _module_help+=$(printf "%s" "
52 |
53 | Description
54 | -----------
55 |
56 | Nmap does host discovery and then performs a port
57 | scan against each host it determines is online.
58 |
59 | Commands
60 | --------
61 |
62 | help display module or NSE help
63 | show display module or profile info
64 | config show module configuration
65 | set set module variable value
66 | use reuse module (changed env)
67 | pushd |init|show|flush command line commands stack
68 | search search key in all commands
69 | init [--args] run profile
70 |
71 | Options:
72 |
73 | key value
74 | profile alias or id
75 |
76 | ")
77 |
78 | # shellcheck disable=SC2154
79 | if [[ "$_mstate" -eq 0 ]] ; then
80 |
81 | if [[ -e "$_module_cfg" ]] && [[ -s "$_module_cfg" ]] ; then
82 |
83 | # shellcheck disable=SC1090
84 | source "$_module_cfg"
85 |
86 | else
87 |
88 | # shellcheck disable=SC2034
89 | _module_variables=()
90 |
91 | if [[ "${#_module_variables[@]}" -ne 0 ]] ; then
92 |
93 | printf "_module_variables=(\"%s\")\\n" "${_module_variables[@]}" > "$_module_cfg"
94 |
95 | fi
96 |
97 | _mstate=1
98 |
99 | fi
100 |
101 | else
102 |
103 | # shellcheck disable=SC1090
104 | source "$_module_cfg"
105 |
106 | fi
107 |
108 | # In the given commands you can use variables from the CLI config
109 | # command or the etc/main.cfg file.
110 |
111 | # ---------------------------------------------------------------------------------------\n
112 |
113 | # shellcheck disable=SC2034
114 | _module_commands=(\
115 | #
116 | "https://nmap.org/book/man-host-discovery.html;\
117 | ;list_scan;-sL" \
118 | #
119 | "https://nmap.org/book/man-host-discovery.html;\
120 | ;ping_scan;-sP" \
121 | #
122 | "https://nmap.org/book/man-host-discovery.html;\
123 | ;no_port_scan;-sn" \
124 | #
125 | "https://nmap.org/book/man-host-discovery.html;\
126 | ;no_ping;-Pn" \
127 | #
128 | "https://nmap.org/book/man-host-discovery.html;\
129 | ;tcp_syn_ping;-PS" \
130 | #
131 | "https://nmap.org/book/man-host-discovery.html;\
132 | ;tcp_ack_ping;-PA" \
133 | #
134 | "https://nmap.org/book/man-host-discovery.html;\
135 | ;udp_ping;-PU" \
136 | #
137 | "https://nmap.org/book/man-host-discovery.html;\
138 | ;sctp_init_ping;-PY" \
139 | #
140 | "https://nmap.org/book/man-host-discovery.html;\
141 | ;arp_ping;-PR" \
142 | #
143 | "https://nmap.org/book/man-host-discovery.html;\
144 | ;icmp_ping-1;-PE" \
145 | #
146 | "https://nmap.org/book/man-host-discovery.html;\
147 | ;icmp_ping-2;-PP" \
148 | #
149 | "https://nmap.org/book/man-host-discovery.html;\
150 | ;icmp_ping-3;-PM" \
151 | )
152 |
153 | # shellcheck disable=SC2034,SC2154
154 | _module_show=(\
155 | "${module_name}" \
156 | "${#_module_commands[@]}" \
157 | "${author}" \
158 | "${contact}" \
159 | "${description}" \
160 | )
161 |
162 | # shellcheck disable=SC2034
163 | export _module_opts=(\
164 | "$_module_help")
165 |
166 | return $_STATE
167 |
168 | }
169 |
--------------------------------------------------------------------------------
/data/modules/nse_broadcast.mod:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # shellcheck shell=bash
4 |
5 | # ``````````````````````````````````````````````````````````````````````````````
6 | # Function name: nse_broadcast()
7 | #
8 | # Description:
9 | # NSE Broadcast Module.
10 | #
11 | # Usage:
12 | # nse_broadcast
13 | #
14 | # Examples:
15 | # nse_broadcast
16 | #
17 |
18 | function nse_broadcast() {
19 |
20 | # shellcheck disable=SC2034
21 | local _FUNCTION_ID="nse_broadcast"
22 | local _STATE=0
23 |
24 | # User variables:
25 | # - module_name: store module name
26 | # - module_args: store module arguments
27 |
28 | export _module_show=
29 | export _module_help=
30 | export _module_opts=
31 | export _module_commands=
32 |
33 | # shellcheck disable=SC2034
34 | _module_variables=()
35 |
36 | # shellcheck disable=SC2034
37 | author="trimstray"
38 | contact="trimstray@gmail.com"
39 | description="NSE Broadcast Module"
40 |
41 | # shellcheck disable=SC2034,SC2154
42 | _module_cfg="${_modules}/${module_name}.cfg"
43 |
44 | touch "$_module_cfg"
45 |
46 | # shellcheck disable=SC2034,SC2154
47 | _module_help=$(printf "%s: \\e[1;32m%s\\e[m" "
48 | Module" "${module_name}")
49 |
50 | _module_help+=$(printf "%s" "
51 |
52 | Description
53 | -----------
54 |
55 | NSE Broadcast Module.
56 |
57 | Commands
58 | --------
59 |
60 | help display module or NSE help
61 | show display module or profile info
62 | config show module configuration
63 | set set module variable value
64 | use reuse module (changed env)
65 | pushd |init|show|flush command line commands stack
66 | search search key in all commands
67 | init [--args] run profile
68 |
69 | Options:
70 |
71 | key value
72 | profile alias or id
73 |
74 | ")
75 |
76 | # shellcheck disable=SC2154
77 | if [[ "$_mstate" -eq 0 ]] ; then
78 |
79 | if [[ -e "$_module_cfg" ]] && [[ -s "$_module_cfg" ]] ; then
80 |
81 | # shellcheck disable=SC1090
82 | source "$_module_cfg"
83 |
84 | else
85 |
86 | # shellcheck disable=SC2034
87 | _module_variables=()
88 |
89 | if [[ "${#_module_variables[@]}" -ne 0 ]] ; then
90 |
91 | printf "_module_variables=(\"%s\")\\n" "${_module_variables[@]}" > "$_module_cfg"
92 |
93 | fi
94 |
95 | _mstate=1
96 |
97 | fi
98 |
99 | else
100 |
101 | # shellcheck disable=SC1090
102 | source "$_module_cfg"
103 |
104 | fi
105 |
106 | # In the given commands you can use variables from the CLI config
107 | # command or the etc/main.cfg file.
108 |
109 | # shellcheck disable=SC2034
110 | _module_commands=(\
111 | #
112 | "https://nmap.org/nsedoc/scripts/broadcast-avahi-dos.html;\
113 | ;broadcast-avahi-dos;--script=broadcast-avahi-dos;\
114 | \"broadcast-avahi-dos.wait=20s\"" \
115 | #
116 | "https://nmap.org/nsedoc/scripts/broadcast-db2-discover.html;\
117 | ;broadcast-db2-discover;--script=db2-discover" \
118 | #
119 | "https://nmap.org/nsedoc/scripts/broadcast-dhcp-discover.html;\
120 | ;broadcast-dhcp-discover;--script=broadcast-dhcp-discover;\
121 | \"broadcast-dhcp-discover.timeout=10s\"" \
122 | #
123 | "https://nmap.org/nsedoc/scripts/broadcast-dhcp6-discover.html;\
124 | ;broadcast-dhcp6-discover;--script=broadcast-dhcp6-discover -6" \
125 | #
126 | "https://nmap.org/nsedoc/scripts/broadcast-dns-service-discovery.html;\
127 | ;broadcast-dns-service-discovery;--script=broadcast-dns-service-discovery" \
128 | #
129 | "https://nmap.org/nsedoc/scripts/broadcast-dropbox-listener.html;\
130 | ;broadcast-dropbox-listener;--script=broadcast-dropbox-listener" \
131 | #
132 | "https://nmap.org/nsedoc/scripts/broadcast-eigrp-discovery.html;\
133 | ;broadcast-eigrp-discovery;--script=broadcast-eigrp-discovery;\
134 | \"broadcast-eigrp-discovery.kparams=101000\",\"broadcast-eigrp-discovery.as=224.0.0.10\",\
135 | \"broadcast-eigrp-discovery.interface\",\"broadcast-eigrp-discovery.timeout=10s\"" \
136 | #
137 | "https://nmap.org/nsedoc/scripts/broadcast-igmp-discovery.html;\
138 | ;broadcast-igmp-discovery;--script=broadcast-igmp-discovery;\
139 | \"broadcast-igmp-discovery.mgroupnamesdb\",\"broadcast-igmp-discovery.version=2\",\
140 | \"broadcast-igmp-discovery.timeout=5s\",\"broadcast-igmp-discovery.interface\"" \
141 | #
142 | "https://nmap.org/nsedoc/scripts/broadcast-listener.html;\
143 | ;broadcast-listener;--script=broadcast-listener;\
144 | \"broadcast-listener.timeout=30s\"" \
145 | #
146 | "https://nmap.org/nsedoc/scripts/broadcast-ms-sql-discover.html;\
147 | ;broadcast-ms-sql-discover;--script=broadcast-ms-sql-discover" \
148 | #
149 | "https://nmap.org/nsedoc/scripts/broadcast-netbios-master-browser.html;\
150 | ;broadcast-netbios-master-browser;--script=broadcast-netbios-master-browser" \
151 | #
152 | "https://nmap.org/nsedoc/scripts/broadcast-novell-locate.html;\
153 | ;broadcast-novell-locate;--script=broadcast-novell-locate" \
154 | #
155 | "https://nmap.org/nsedoc/scripts/broadcast-ospf2-discover.html;\
156 | ;broadcast-ospf2-discover;--script=broadcast-ospf2-discover;\
157 | \"broadcast-ospf2-discover.md5_key\",\"broadcast-ospf2-discover.router_id=0.0.0.1\",\
158 | \"broadcast-ospf2-discover.timeout=10s\",\"broadcast-ospf2-discover.interface\"" \
159 | #
160 | "https://nmap.org/nsedoc/scripts/broadcast-ping.html;\
161 | ;broadcast-ping;--script=broadcast-ping;\
162 | \"broadcast-ping.timeout=3s\",\"broadcast-ping.num_probes=1\",\
163 | \"broadcast-ping.interface\"" \
164 | #
165 | "https://nmap.org/nsedoc/scripts/broadcast-pppoe-discover.html;\
166 | ;broadcast-pppoe-discover;--script=broadcast-pppoe-discover" \
167 | #
168 | "https://nmap.org/nsedoc/scripts/broadcast-rip-discover.html;\
169 | ;broadcast-rip-discover;--script=broadcast-rip-discover;\
170 | \"broadcast-rip-discover.timeout=5s\"" \
171 | #
172 | "https://nmap.org/nsedoc/scripts/broadcast-ripng-discover.html;\
173 | ;broadcast-ripng-discover;--script=broadcast-ripng-discover;\
174 | \"broadcast-ripng-discover.timeout=5s\"" \
175 | #
176 | "https://nmap.org/nsedoc/scripts/broadcast-upnp-info.html;\
177 | ;broadcast-upnp-info;--script=broadcast-upnp-info" \
178 | #
179 | "https://nmap.org/nsedoc/scripts/broadcast-db2-discover.html;\
180 | ;broadcast-wake-on-lan;--script=broadcast-wake-on-lan;\
181 | \"broadcast-wake-on-lan.address\",\"broadcast-wake-on-lan.MAC\"" \
182 | )
183 |
184 | # shellcheck disable=SC2034,SC2154
185 | _module_show=(\
186 | "${module_name}" \
187 | "${#_module_commands[@]}" \
188 | "${author}" \
189 | "${contact}" \
190 | "${description}" \
191 | )
192 |
193 | # shellcheck disable=SC2034
194 | export _module_opts=(\
195 | "$_module_help")
196 |
197 | return $_STATE
198 |
199 | }
200 |
--------------------------------------------------------------------------------
/data/modules/nse_citrix.mod:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # shellcheck shell=bash
4 |
5 | # ``````````````````````````````````````````````````````````````````````````````
6 | # Function name: nse_citrix()
7 | #
8 | # Description:
9 | # NSE Citrix Service Module.
10 | #
11 | # Usage:
12 | # nse_citrix
13 | #
14 | # Examples:
15 | # nse_citrix
16 | #
17 |
18 | function nse_citrix() {
19 |
20 | # shellcheck disable=SC2034
21 | local _FUNCTION_ID="nse_citrix"
22 | local _STATE=0
23 |
24 | # User variables:
25 | # - module_name: store module name
26 | # - module_args: store module arguments
27 |
28 | export _module_show=
29 | export _module_help=
30 | export _module_opts=
31 | export _module_commands=
32 |
33 | # shellcheck disable=SC2034
34 | _module_variables=()
35 |
36 | # shellcheck disable=SC2034
37 | author="trimstray"
38 | contact="trimstray@gmail.com"
39 | description="NSE Citrix Service Module"
40 |
41 | # shellcheck disable=SC2034,SC2154
42 | _module_cfg="${_modules}/${module_name}.cfg"
43 |
44 | touch "$_module_cfg"
45 |
46 | # shellcheck disable=SC2034,SC2154
47 | _module_help=$(printf "%s: \\e[1;32m%s\\e[m" "
48 | Module" "${module_name}")
49 |
50 | _module_help+=$(printf "%s" "
51 |
52 | Description
53 | -----------
54 |
55 | NSE Citrix Service Module.
56 |
57 | Commands
58 | --------
59 |
60 | help display module or NSE help
61 | show display module or profile info
62 | config show module configuration
63 | set set module variable value
64 | use reuse module (changed env)
65 | pushd |init|show|flush command line commands stack
66 | search search key in all commands
67 | init [--args] run profile
68 |
69 | Options:
70 |
71 | key value
72 | profile alias or id
73 |
74 | ")
75 |
76 | # shellcheck disable=SC2154
77 | if [[ "$_mstate" -eq 0 ]] ; then
78 |
79 | if [[ -e "$_module_cfg" ]] && [[ -s "$_module_cfg" ]] ; then
80 |
81 | # shellcheck disable=SC1090
82 | source "$_module_cfg"
83 |
84 | else
85 |
86 | # shellcheck disable=SC2034
87 | _module_variables=()
88 |
89 | if [[ "${#_module_variables[@]}" -ne 0 ]] ; then
90 |
91 | printf "_module_variables=(\"%s\")\\n" "${_module_variables[@]}" > "$_module_cfg"
92 |
93 | fi
94 |
95 | _mstate=1
96 |
97 | fi
98 |
99 | else
100 |
101 | # shellcheck disable=SC1090
102 | source "$_module_cfg"
103 |
104 | fi
105 |
106 | # In the given commands you can use variables from the CLI config
107 | # command or the etc/main.cfg file.
108 |
109 | # shellcheck disable=SC2034
110 | _module_commands=(\
111 | #
112 | "https://nmap.org/nsedoc/scripts/citrix-brute-xml.html;\
113 | ;citrix-brute-xml;--script=citrix-brute-xml;\
114 | \"userdb\",\"passdb\",\"ntdomain\"" \
115 | #
116 | "https://nmap.org/nsedoc/scripts/citrix-enum-apps-xml.html;\
117 | ;citrix-enum-apps-xml;--script=citrix-enum-apps-xml" \
118 | #
119 | "https://nmap.org/nsedoc/scripts/citrix-enum-apps.html;\
120 | ;citrix-enum-apps;--script=citrix-enum-apps" \
121 | #
122 | "https://nmap.org/nsedoc/scripts/citrix-enum-servers-xml.html;\
123 | ;citrix-enum-servers-xml;--script=citrix-enum-servers-xml" \
124 | #
125 | "https://nmap.org/nsedoc/scripts/citrix-enum-servers.html;\
126 | ;citrix-enum-servers;--script=citrix-enum-servers" \
127 | )
128 |
129 | # shellcheck disable=SC2034,SC2154
130 | _module_show=(\
131 | "${module_name}" \
132 | "${#_module_commands[@]}" \
133 | "${author}" \
134 | "${contact}" \
135 | "${description}" \
136 | )
137 |
138 | # shellcheck disable=SC2034
139 | export _module_opts=(\
140 | "$_module_help")
141 |
142 | return $_STATE
143 |
144 | }
145 |
--------------------------------------------------------------------------------
/data/modules/nse_databases.mod:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # shellcheck shell=bash
4 |
5 | # ``````````````````````````````````````````````````````````````````````````````
6 | # Function name: nse_databases()
7 | #
8 | # Description:
9 | # NSE Databases Service Module.
10 | #
11 | # Usage:
12 | # nse_databases
13 | #
14 | # Examples:
15 | # nse_databases
16 | #
17 |
18 | function nse_databases() {
19 |
20 | # shellcheck disable=SC2034
21 | local _FUNCTION_ID="nse_databases"
22 | local _STATE=0
23 |
24 | # User variables:
25 | # - module_name: store module name
26 | # - module_args: store module arguments
27 |
28 | export _module_show=
29 | export _module_help=
30 | export _module_opts=
31 | export _module_commands=
32 |
33 | # shellcheck disable=SC2034
34 | _module_variables=()
35 |
36 | # shellcheck disable=SC2034
37 | author="trimstray"
38 | contact="trimstray@gmail.com"
39 | description="NSE Databases Service Module"
40 |
41 | # shellcheck disable=SC2034,SC2154
42 | _module_cfg="${_modules}/${module_name}.cfg"
43 |
44 | touch "$_module_cfg"
45 |
46 | # shellcheck disable=SC2034,SC2154
47 | _module_help=$(printf "%s: \\e[1;32m%s\\e[m" "
48 | Module" "${module_name}")
49 |
50 | _module_help+=$(printf "%s" "
51 |
52 | Description
53 | -----------
54 |
55 | NSE Databases Service Module.
56 |
57 | Commands
58 | --------
59 |
60 | help display module or NSE help
61 | show display module or profile info
62 | config show module configuration
63 | set set module variable value
64 | use reuse module (changed env)
65 | pushd |init|show|flush command line commands stack
66 | search search key in all commands
67 | init [--args] run profile
68 |
69 | Options:
70 |
71 | key value
72 | profile alias or id
73 |
74 | ")
75 |
76 | # shellcheck disable=SC2154
77 | if [[ "$_mstate" -eq 0 ]] ; then
78 |
79 | if [[ -e "$_module_cfg" ]] && [[ -s "$_module_cfg" ]] ; then
80 |
81 | # shellcheck disable=SC1090
82 | source "$_module_cfg"
83 |
84 | else
85 |
86 | # shellcheck disable=SC2034
87 | _module_variables=()
88 |
89 | if [[ "${#_module_variables[@]}" -ne 0 ]] ; then
90 |
91 | printf "_module_variables=(\"%s\")\\n" "${_module_variables[@]}" > "$_module_cfg"
92 |
93 | fi
94 |
95 | _mstate=1
96 |
97 | fi
98 |
99 | else
100 |
101 | # shellcheck disable=SC1090
102 | source "$_module_cfg"
103 |
104 | fi
105 |
106 | # In the given commands you can use variables from the CLI config
107 | # command or the etc/main.cfg file.
108 |
109 | # shellcheck disable=SC2034
110 | _module_commands=(\
111 | #
112 | "https://nmap.org/nsedoc/scripts/couchdb-databases.html;\
113 | ;couchdb-databases;--script=couchdb-databases" \
114 | #
115 | "https://nmap.org/nsedoc/scripts/couchdb-stats.html;\
116 | ;couchdb-stats;--script=couchdb-stats" \
117 | #
118 | "https://nmap.org/nsedoc/scripts/db2-das-info.html;\
119 | ;db2-das-info;--script=db2-das-info" \
120 | #
121 | "https://nmap.org/nsedoc/scripts/membase-brute.html;\
122 | ;membase-brute;--script=membase-brute;\
123 | \"membase-brute.bucketname\"" \
124 | #
125 | "https://nmap.org/nsedoc/scripts/membase-http-info.html;\
126 | ;membase-http-info;--script=membase-http-info" \
127 | #
128 | "https://nmap.org/nsedoc/scripts/mongodb-brute.html;\
129 | ;mongodb-brute;--script=mongodb-brute;\
130 | \"mongodb-brute.db=admin\"" \
131 | #
132 | "https://nmap.org/nsedoc/scripts/mongodb-databases.html;\
133 | ;mongodb-databases;--script=mongodb-databases" \
134 | #
135 | "https://nmap.org/nsedoc/scripts/mongodb-info.html;\
136 | ;mongodb-info;--script=mongodb-info;\
137 | \"mongodb-info.db=admin\"" \
138 | #
139 | "https://nmap.org/nsedoc/scripts/ms-sql-brute.html;\
140 | ;ms-sql-brute;--script=ms-sql-brute;\
141 | \"ms-sql-brute.ignore-lockout\",\"ms-sql-brute.brute-windows-accounts\"" \
142 | #
143 | "https://nmap.org/nsedoc/scripts/ms-sql-config.html;\
144 | ;ms-sql-config;--script=ms-sql-config;\
145 | \"ms-sql-config.showall\"" \
146 | #
147 | "https://nmap.org/nsedoc/scripts/ms-sql-dac.html;\
148 | ;ms-sql-dac;--script=ms-sql-dac" \
149 | #
150 | "https://nmap.org/nsedoc/scripts/ms-sql-dump-hashes.html;\
151 | ;ms-sql-dump-hashes;--script=ms-sql-dump-hashes;\
152 | \"ms-sql-dump-hashes.dir\"" \
153 | #
154 | "https://nmap.org/nsedoc/scripts/ms-sql-empty-password.html;\
155 | ;ms-sql-empty-password;--script=ms-sql-empty-password" \
156 | #
157 | "https://nmap.org/nsedoc/scripts/ms-sql-hasdbaccess.html;\
158 | ;ms-sql-hasdbaccess;--script=ms-sql-hasdbaccess;\
159 | \"ms-sql-hasdbaccess.limit=5\"" \
160 | #
161 | "https://nmap.org/nsedoc/scripts/ms-sql-info.html;\
162 | ;ms-sql-info;--script=ms-sql-info" \
163 | #
164 | "https://nmap.org/nsedoc/scripts/ms-sql-ntlm-info.html;\
165 | ;ms-sql-ntlm-info;--script=ms-sql-ntlm-info" \
166 | #
167 | "https://nmap.org/nsedoc/scripts/ms-sql-query.html;\
168 | ;ms-sql-query;--script=ms-sql-query;\
169 | \"mssql.database=tempdb\",\"ms-sql-query.query\"" \
170 | #
171 | "https://nmap.org/nsedoc/scripts/ms-sql-tables.html;\
172 | ;ms-sql-tables;--script=ms-sql-tables;\
173 | \"ms-sql-tables.keywords\",\"ms-sql-tables.maxdb=5\",\
174 | \"ms-sql-tables.maxtables=5\"" \
175 | #
176 | "https://nmap.org/nsedoc/scripts/ms-sql-xp-cmdshell.html;\
177 | ;ms-sql-xp-cmdshell;--script=ms-sql-xp-cmdshell;\
178 | \"ms-sql-xp-cmdshell.cmd\"" \
179 | #
180 | "https://nmap.org/nsedoc/scripts/mysql-audit.html;\
181 | ;mysql-audit;--script=mysql-audit;\
182 | \"mysql-audit.password\",\"mysql-audit.username\",\
183 | \"mysql-audit.filename\"" \
184 | #
185 | "https://nmap.org/nsedoc/scripts/mysql-brute.html;\
186 | ;mysql-brute;--script=mysql-brute;\
187 | \"mysql-brute.timeout=5s\"" \
188 | #
189 | "https://nmap.org/nsedoc/scripts/mysql-databases.html;\
190 | ;mysql-databases;--script=mysql-databases;\
191 | \"mysqluser\",\"mysqlpass\"" \
192 | #
193 | "https://nmap.org/nsedoc/scripts/mysql-dump-hashes.html;\
194 | ;mysql-dump-hashes;--script=mysql-dump-hashes;\
195 | \"username\",\"password\"" \
196 | #
197 | "https://nmap.org/nsedoc/scripts/mysql-empty-password.html;\
198 | ;mysql-empty-password;--script=mysql-empty-password" \
199 | #
200 | "https://nmap.org/nsedoc/scripts/mysql-enum.html;\
201 | ;mysql-enum;--script=mysql-enum;\
202 | \"mysql-enum.timeout=5s\"" \
203 | #
204 | "https://nmap.org/nsedoc/scripts/mysql-info.html;\
205 | ;mysql-info;--script=mysql-info" \
206 | #
207 | "https://nmap.org/nsedoc/scripts/mysql-query.html;\
208 | ;mysql-query;--script=mysql-query;\
209 | \"mysql-query.noheaders=false\",\"mysql-query.query\",\
210 | \"mysql-query.username\",\"mysql-query.password\"" \
211 | #
212 | "https://nmap.org/nsedoc/scripts/mysql-users.html;\
213 | ;mysql-users;--script=mysql-users;\
214 | \"mysqluser\",\"mysqlpass\"" \
215 | #
216 | "https://nmap.org/nsedoc/scripts/mysql-variables.html;\
217 | ;mysql-variables;--script=mysql-variables;\
218 | \"mysqluser\",\"mysqlpass\"" \
219 | #
220 | "https://nmap.org/nsedoc/scripts/mysql-vuln-cve2012-2122.html;\
221 | ;mysql-vuln-cve2012-2122;--script=mysql-vuln-cve2012-2122;\
222 | \"mysql-vuln-cve2012-2122.pass=nmapFTW\",\"mysql-vuln-cve2012-2122.user=root\",\
223 | \"mysql-vuln-cve2012-2122.iterations=1500\",\"mysql-vuln-cve2012-2122.socket_timeout=5s\"" \
224 | #
225 | "https://nmap.org/nsedoc/scripts/pgsql-brute.html;\
226 | ;pgsql-brute;--script=pgsql-brute;\
227 | \"pgsql.version,pgsql.nossl\"" \
228 | )
229 |
230 | # shellcheck disable=SC2034,SC2154
231 | _module_show=(\
232 | "${module_name}" \
233 | "${#_module_commands[@]}" \
234 | "${author}" \
235 | "${contact}" \
236 | "${description}" \
237 | )
238 |
239 | # shellcheck disable=SC2034
240 | export _module_opts=(\
241 | "$_module_help")
242 |
243 | return $_STATE
244 |
245 | }
246 |
--------------------------------------------------------------------------------
/data/modules/nse_dns-dhcp.mod:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # shellcheck shell=bash
4 |
5 | # ``````````````````````````````````````````````````````````````````````````````
6 | # Function name: nse_dns-dhcp()
7 | #
8 | # Description:
9 | # NSE DNS and DHCP Module.
10 | #
11 | # Usage:
12 | # nse_dns-dhcp
13 | #
14 | # Examples:
15 | # nse_dns-dhcp
16 | #
17 |
18 | function nse_dns-dhcp() {
19 |
20 | # shellcheck disable=SC2034
21 | local _FUNCTION_ID="nse_dns-dhcp"
22 | local _STATE=0
23 |
24 | # User variables:
25 | # - module_name: store module name
26 | # - module_args: store module arguments
27 |
28 | export _module_show=
29 | export _module_help=
30 | export _module_opts=
31 | export _module_commands=
32 |
33 | # shellcheck disable=SC2034
34 | _module_variables=()
35 |
36 | # shellcheck disable=SC2034
37 | author="trimstray"
38 | contact="trimstray@gmail.com"
39 | description="NSE DNS and DHCP Module"
40 |
41 | # shellcheck disable=SC2034,SC2154
42 | _module_cfg="${_modules}/${module_name}.cfg"
43 |
44 | touch "$_module_cfg"
45 |
46 | # shellcheck disable=SC2034,SC2154
47 | _module_help=$(printf "%s: \\e[1;32m%s\\e[m" "
48 | Module" "${module_name}")
49 |
50 | _module_help+=$(printf "%s" "
51 |
52 | Description
53 | -----------
54 |
55 | NSE DNS and DHCP Module.
56 |
57 | Commands
58 | --------
59 |
60 | help display module or NSE help
61 | show display module or profile info
62 | config show module configuration
63 | set set module variable value
64 | use reuse module (changed env)
65 | pushd |init|show|flush command line commands stack
66 | search search key in all commands
67 | init [--args] run profile
68 |
69 | Options:
70 |
71 | key value
72 | profile alias or id
73 |
74 | ")
75 |
76 | # shellcheck disable=SC2154
77 | if [[ "$_mstate" -eq 0 ]] ; then
78 |
79 | if [[ -e "$_module_cfg" ]] && [[ -s "$_module_cfg" ]] ; then
80 |
81 | # shellcheck disable=SC1090
82 | source "$_module_cfg"
83 |
84 | else
85 |
86 | # shellcheck disable=SC2034
87 | _module_variables=()
88 |
89 | if [[ "${#_module_variables[@]}" -ne 0 ]] ; then
90 |
91 | printf "_module_variables=(\"%s\")\\n" "${_module_variables[@]}" > "$_module_cfg"
92 |
93 | fi
94 |
95 | _mstate=1
96 |
97 | fi
98 |
99 | else
100 |
101 | # shellcheck disable=SC1090
102 | source "$_module_cfg"
103 |
104 | fi
105 |
106 | # In the given commands you can use variables from the CLI config
107 | # command or the etc/main.cfg file.
108 |
109 | # shellcheck disable=SC2034
110 | _module_commands=(\
111 | #
112 | "https://nmap.org/nsedoc/scripts/asn-query.html;\
113 | ;asn-query;--script=asn-query;\
114 | \"dns\"" \
115 | #
116 | "https://nmap.org/nsedoc/scripts/dns-blacklist.html;\
117 | ;dns-blacklist;--script=dns-blacklist;\
118 | \"dns-blacklist.services=all\",\"dns-blacklist.ip\",\
119 | \"dns-blacklist.list\",\"dns-blacklist.category=all\",\
120 | \"dns-blacklist.mode=long\"" \
121 | #
122 | "https://nmap.org/nsedoc/scripts/dns-brute.html;\
123 | ;dns-brute;--script=dns-brute;\
124 | \"dns-brute.threads=5\",\"dns-brute.srvlist=nselib/data/dns-srv-names\",\
125 | \"dns-brute.hostlist=nselib/data/vhosts-default.lst\",\"dns-brute.srv\",\
126 | \"dns-brute.domain\"" \
127 | #
128 | "https://nmap.org/nsedoc/scripts/dns-cache-snoop.html;\
129 | ;dns-cache-snoop;--script=dns-cache-snoop.nse;\
130 | \"dns-cache-snoop.mode=nonrecursive\",\"dns-cache-snoop.domains\"" \
131 | #
132 | "https://nmap.org/nsedoc/scripts/dns-check-zone.html;\
133 | ;dns-check-zone;--script=dns-check-zone;\
134 | \"dns-check-zone.domain\"" \
135 | #
136 | "https://nmap.org/nsedoc/scripts/dns-client-subnet-scan.html;\
137 | ;dns-client-subnet-scan;--script=dns-client-subnet-scan;\
138 | \"dns-client-subnet-scan.domain\",\"dns-client-subnet-scan.mask=24\",\
139 | \"dns-client-subnet-scan.nameserver=host.ip\",\"dns-client-subnet-scan.address\"" \
140 | #
141 | "https://nmap.org/nsedoc/scripts/dns-fuzz.html;\
142 | ;dns-fuzz;--script=dns-fuzz;\
143 | \"dns-fuzz.timelimit=10m\"" \
144 | #
145 | "https://nmap.org/nsedoc/scripts/dns-ip6-arpa-scan.html;\
146 | ;dns-ip6-arpa-scan;--script=dns-ip6-arpa-scan;\
147 | \"prefix\",\"mask\"" \
148 | #
149 | "https://nmap.org/nsedoc/scripts/dns-nsec-enum.html;\
150 | ;dns-nsec-enum;--script=dns-nsec-enum;\
151 | \"dns-nsec-enum.domains\"" \
152 | #
153 | "https://nmap.org/nsedoc/scripts/dns-nsec3-enum.html;\
154 | ;dns-nsec3-enum;--script=dns-nsec3-enum;\
155 | \"dns-nsec3-enum.domains\",\"dns-nsec3-enum.timelimit=30m\"" \
156 | #
157 | "https://nmap.org/nsedoc/scripts/dns-nsid.html;\
158 | ;dns-nsid;--script=dns-nsid" \
159 | #
160 | "https://nmap.org/nsedoc/scripts/dns-random-srcport.html;\
161 | ;dns-random-srcport;--script=dns-random-srcport" \
162 | #
163 | "https://nmap.org/nsedoc/scripts/dns-random-txid.html;\
164 | ;dns-random-txid;--script=dns-random-txid" \
165 | #
166 | "https://nmap.org/nsedoc/scripts/dns-recursion.html;\
167 | ;dns-recursion;--script=dns-recursion" \
168 | #
169 | "https://nmap.org/nsedoc/scripts/dns-service-discovery.html;\
170 | ;dns-service-discovery;--script=dns-service-discovery" \
171 | #
172 | "https://nmap.org/nsedoc/scripts/dns-srv-enum.html;\
173 | ;dns-srv-enum;--script=dns-srv-enum;\
174 | \"dns-srv-enum.domain\",\"dns-srv-enum.filter=all\"" \
175 | #
176 | "https://nmap.org/nsedoc/scripts/dns-update.html;\
177 | ;dns-update;--script=dns-update;\
178 | \"dns-update.test\",\"dns-update.ip\",\"dns-update.hostname\"" \
179 | #
180 | "https://nmap.org/nsedoc/scripts/dns-zone-transfer.html;\
181 | ;dns-zone-transfer;--script=dns-zone-transfer;\
182 | \"dns-zone-transfer.port=53\",\"dns-zone-transfer.server\",\
183 | \"dns-zone-transfer.domain\"" \
184 | #
185 | "https://nmap.org/nsedoc/scripts/fcrdns.html;\
186 | ;fcrdns;--script=fcrdns" \
187 | #
188 | "https://nmap.org/nsedoc/scripts/hostmap-bfk.html;\
189 | ;hostmap-bfk;--script=hostmap-bfk;\
190 | \"hostmap-bfk.prefix\"" \
191 | #
192 | "https://nmap.org/nsedoc/scripts/hostmap-crtsh.html;\
193 | ;hostmap-crtsh;--script=hostmap-crtsh;\
194 | \"hostmap.prefix\"" \
195 | #
196 | "https://nmap.org/nsedoc/scripts/hostmap-ip2hosts.html;\
197 | ;hostmap-ip2hosts;--script=hostmap-ip2hosts;\
198 | \"hostmap.prefix\"" \
199 | #
200 | "https://nmap.org/nsedoc/scripts/hostmap-robtex.html;\
201 | ;hostmap-robtex;--script=hostmap-robtex" \
202 | #
203 | "https://nmap.org/nsedoc/scripts/llmnr-resolve.html;\
204 | ;llmnr-resolve;--script=llmnr-resolve;\
205 | \"llmnr-resolve.timeout=3s\",\"llmnr-resolve.hostname\"" \
206 | #
207 | "https://nmap.org/nsedoc/scripts/dhcp-discover.html;\
208 | ;dhcp-discover;--script=dhcp-discover;\
209 | \"randomize_mac\",\"requests\",\"dhcptype=DHCPINFORM\"" \
210 | #
211 | "https://nmap.org/nsedoc/scripts/http-robtex-reverse-ip.html;\
212 | ;http-robtex-reverse-ip;--script=http-robtex-reverse-ip;\
213 | \"http-robtex-reverse-ip.host\"" \
214 | #
215 | "https://nmap.org/nsedoc/scripts/http-robtex-shared-ns.html;\
216 | ;http-robtex-shared-ns;--script=http-robtex-shared-ns" \
217 | )
218 |
219 | # shellcheck disable=SC2034,SC2154
220 | _module_show=(\
221 | "${module_name}" \
222 | "${#_module_commands[@]}" \
223 | "${author}" \
224 | "${contact}" \
225 | "${description}" \
226 | )
227 |
228 | # shellcheck disable=SC2034
229 | export _module_opts=(\
230 | "$_module_help")
231 |
232 | return $_STATE
233 |
234 | }
235 |
--------------------------------------------------------------------------------
/data/modules/nse_external.mod:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # shellcheck shell=bash
4 |
5 | # ``````````````````````````````````````````````````````````````````````````````
6 | # Function name: nse_external()
7 | #
8 | # Description:
9 | # NSE External scripts (eg. from github).
10 | #
11 | # Usage:
12 | # nse_external
13 | #
14 | # Examples:
15 | # nse_external
16 | #
17 |
18 | function nse_external() {
19 |
20 | # shellcheck disable=SC2034
21 | local _FUNCTION_ID="nse_external"
22 | local _STATE=0
23 |
24 | # User variables:
25 | # - module_name: store module name
26 | # - module_args: store module arguments
27 |
28 | export _module_show=
29 | export _module_help=
30 | export _module_opts=
31 | export _module_commands=
32 |
33 | # shellcheck disable=SC2034
34 | _module_variables=()
35 |
36 | # shellcheck disable=SC2034
37 | author="trimstray"
38 | contact="trimstray@gmail.com"
39 | description="NSE External scripts (eg. from github)"
40 |
41 | # shellcheck disable=SC2034,SC2154
42 | _module_cfg="${_modules}/${module_name}.cfg"
43 |
44 | touch "$_module_cfg"
45 |
46 | # shellcheck disable=SC2034,SC2154
47 | _module_help=$(printf "%s: \\e[1;32m%s\\e[m" "
48 | Module" "${module_name}")
49 |
50 | _module_help+=$(printf "%s" "
51 |
52 | Description
53 | -----------
54 |
55 | NSE External scripts (eg. from github).
56 |
57 | Commands
58 | --------
59 |
60 | help display module or NSE help
61 | show display module or profile info
62 | config show module configuration
63 | set set module variable value
64 | use reuse module (changed env)
65 | pushd |init|show|flush command line commands stack
66 | search search key in all commands
67 | init [--args] run profile
68 |
69 | Options:
70 |
71 | key value
72 | profile alias or id
73 |
74 | ")
75 |
76 | # shellcheck disable=SC2154
77 | if [[ "$_mstate" -eq 0 ]] ; then
78 |
79 | if [[ -e "$_module_cfg" ]] && [[ -s "$_module_cfg" ]] ; then
80 |
81 | # shellcheck disable=SC1090
82 | source "$_module_cfg"
83 |
84 | else
85 |
86 | # shellcheck disable=SC2034
87 | _module_variables=()
88 |
89 | if [[ "${#_module_variables[@]}" -ne 0 ]] ; then
90 |
91 | printf "_module_variables=(\"%s\")\\n" "${_module_variables[@]}" > "$_module_cfg"
92 |
93 | fi
94 |
95 | _mstate=1
96 |
97 | fi
98 |
99 | else
100 |
101 | # shellcheck disable=SC1090
102 | source "$_module_cfg"
103 |
104 | fi
105 |
106 | # In the given commands you can use variables from the CLI config
107 | # command or the etc/main.cfg file.
108 |
109 | # shellcheck disable=SC2034
110 | _module_commands=(\
111 | #
112 | "https://github.com/vulnersCom/nmap-vulners;\
113 | ;vulners-script;--script=${_nse}/vulners/vulners.nse;\
114 | \"mincvss\"" \
115 | #
116 | "https://github.com/scipag/vulscan;\
117 | ;vulscan-script;--script=${_nse}/vulscan/vulscan.nse;\
118 | \"vulscandb\"" \
119 | #
120 | "https://github.com/s4n7h0/NSE;\
121 | ;http-nikto-scan;--script=${_nse}/s4n7h0/http-nikto-scan.nse;\
122 | \"http-nikto-scan.display=off\"" \
123 | #
124 | "https://github.com/s4n7h0/NSE;\
125 | ;http-shellshock;--script=${_nse}/s4n7h0/http-shellshock.nse;\
126 | \"http-shockshock.depth=20\",\"http-shockshock.cookie\",\
127 | \"http-shellshock.startpath=/\",\"http-shellshock.uri\"" \
128 | #
129 | "https://github.com/scipag/httprecon-nse;\
130 | ;httprecon-nse;--script=${_nse}/httprecon-nse/httprecon.nse" \
131 | #
132 | "https://github.com/michenriksen/nmap-scripts;\
133 | ;http-apache-server-status;--script=${_nse}/michenriksen/http-apache-server-status.nse" \
134 | )
135 |
136 | # shellcheck disable=SC2034,SC2154
137 | _module_show=(\
138 | "${module_name}" \
139 | "${#_module_commands[@]}" \
140 | "${author}" \
141 | "${contact}" \
142 | "${description}" \
143 | )
144 |
145 | # shellcheck disable=SC2034
146 | export _module_opts=(\
147 | "$_module_help")
148 |
149 | return $_STATE
150 |
151 | }
152 |
--------------------------------------------------------------------------------
/data/modules/nse_ftp.mod:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # shellcheck shell=bash
4 |
5 | # ``````````````````````````````````````````````````````````````````````````````
6 | # Function name: nse_ftp()
7 | #
8 | # Description:
9 | # NSE FTP Service Module.
10 | #
11 | # Usage:
12 | # nse_ftp
13 | #
14 | # Examples:
15 | # nse_ftp
16 | #
17 |
18 | function nse_ftp() {
19 |
20 | # shellcheck disable=SC2034
21 | local _FUNCTION_ID="nse_ftp"
22 | local _STATE=0
23 |
24 | # User variables:
25 | # - module_name: store module name
26 | # - module_args: store module arguments
27 |
28 | export _module_show=
29 | export _module_help=
30 | export _module_opts=
31 | export _module_commands=
32 |
33 | # shellcheck disable=SC2034
34 | _module_variables=()
35 |
36 | # shellcheck disable=SC2034
37 | author="trimstray"
38 | contact="trimstray@gmail.com"
39 | description="NSE FTP Service Module"
40 |
41 | # shellcheck disable=SC2034,SC2154
42 | _module_cfg="${_modules}/${module_name}.cfg"
43 |
44 | touch "$_module_cfg"
45 |
46 | # shellcheck disable=SC2034,SC2154
47 | _module_help=$(printf "%s: \\e[1;32m%s\\e[m" "
48 | Module" "${module_name}")
49 |
50 | _module_help+=$(printf "%s" "
51 |
52 | Description
53 | -----------
54 |
55 | NSE FTP Service Module.
56 |
57 | Commands
58 | --------
59 |
60 | help display module or NSE help
61 | show display module or profile info
62 | config show module configuration
63 | set set module variable value
64 | use reuse module (changed env)
65 | pushd |init|show|flush command line commands stack
66 | search search key in all commands
67 | init [--args] run profile
68 |
69 | Options:
70 |
71 | key value
72 | profile alias or id
73 |
74 | ")
75 |
76 | # shellcheck disable=SC2154
77 | if [[ "$_mstate" -eq 0 ]] ; then
78 |
79 | if [[ -e "$_module_cfg" ]] && [[ -s "$_module_cfg" ]] ; then
80 |
81 | # shellcheck disable=SC1090
82 | source "$_module_cfg"
83 |
84 | else
85 |
86 | # shellcheck disable=SC2034
87 | _module_variables=()
88 |
89 | if [[ "${#_module_variables[@]}" -ne 0 ]] ; then
90 |
91 | printf "_module_variables=(\"%s\")\\n" "${_module_variables[@]}" > "$_module_cfg"
92 |
93 | fi
94 |
95 | _mstate=1
96 |
97 | fi
98 |
99 | else
100 |
101 | # shellcheck disable=SC1090
102 | source "$_module_cfg"
103 |
104 | fi
105 |
106 | # In the given commands you can use variables from the CLI config
107 | # command or the etc/main.cfg file.
108 |
109 | # shellcheck disable=SC2034
110 | _module_commands=(\
111 | #
112 | "https://nmap.org/nsedoc/scripts/ftp-anon.html;\
113 | ;ftp-anon;--script=ftp-anon;\
114 | \"ftp-anon.maxlist=20\"" \
115 | #
116 | "https://nmap.org/nsedoc/scripts/ftp-bounce.html;\
117 | ;ftp-bounce;--script=ftp-bounce;\
118 | \"ftp-bounce.password=IEUser@\",\"ftp-bounce.username=anonymous\",\
119 | \"ftp-bounce.checkhost=scanme.nmap.org\"" \
120 | #
121 | "https://nmap.org/nsedoc/scripts/ftp-brute.html;\
122 | ;ftp-brute;--script=ftp-brute;\
123 | \"ftp-brute.timeout=5s\"" \
124 | #
125 | "https://nmap.org/nsedoc/scripts/ftp-libopie.html;\
126 | ;ftp-libopie;--script=ftp-libopie" \
127 | #
128 | "https://nmap.org/nsedoc/scripts/ftp-proftpd-backdoor.html;\
129 | ;ftp-proftpd-backdoor;--script=ftp-proftpd-backdoor;\
130 | \"ftp-proftpd-backdoor.cmd=id\"" \
131 | #
132 | "https://nmap.org/nsedoc/scripts/ftp-syst.html;\
133 | ;ftp-syst;--script=ftp-syst" \
134 | #
135 | "https://nmap.org/nsedoc/scripts/ftp-vsftpd-backdoor.html;\
136 | ;ftp-vsftpd-backdoor;--script=ftp-vsftpd-backdoor;\
137 | \"ftp-vsftpd-backdoor.cmd=id\"" \
138 | #
139 | "https://nmap.org/nsedoc/scripts/ftp-vuln-cve2010-4221.html;\
140 | ;ftp-vuln-cve2010-4221;--script=ftp-vuln-cve2010-4221" \
141 | #
142 | "https://nmap.org/nsedoc/scripts/tftp-enum.html;\
143 | ;tftp-enum;--script=tftp-enum;\
144 | \"filelist\"" \
145 | )
146 |
147 | # shellcheck disable=SC2034,SC2154
148 | _module_show=(\
149 | "${module_name}" \
150 | "${#_module_commands[@]}" \
151 | "${author}" \
152 | "${contact}" \
153 | "${description}" \
154 | )
155 |
156 | # shellcheck disable=SC2034
157 | export _module_opts=(\
158 | "$_module_help")
159 |
160 | return $_STATE
161 |
162 | }
163 |
--------------------------------------------------------------------------------
/data/modules/nse_hadoop.mod:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # shellcheck shell=bash
4 |
5 | # ``````````````````````````````````````````````````````````````````````````````
6 | # Function name: nse_hadoop()
7 | #
8 | # Description:
9 | # NSE Hadoop Services Module.
10 | #
11 | # Usage:
12 | # nse_hadoop
13 | #
14 | # Examples:
15 | # nse_hadoop
16 | #
17 |
18 | function nse_hadoop() {
19 |
20 | # shellcheck disable=SC2034
21 | local _FUNCTION_ID="nse_hadoop"
22 | local _STATE=0
23 |
24 | # User variables:
25 | # - module_name: store module name
26 | # - module_args: store module arguments
27 |
28 | export _module_show=
29 | export _module_help=
30 | export _module_opts=
31 | export _module_commands=
32 |
33 | # shellcheck disable=SC2034
34 | _module_variables=()
35 |
36 | # shellcheck disable=SC2034
37 | author="trimstray"
38 | contact="trimstray@gmail.com"
39 | description="NSE Hadoop Services Module"
40 |
41 | # shellcheck disable=SC2034,SC2154
42 | _module_cfg="${_modules}/${module_name}.cfg"
43 |
44 | touch "$_module_cfg"
45 |
46 | # shellcheck disable=SC2034,SC2154
47 | _module_help=$(printf "%s: \\e[1;32m%s\\e[m" "
48 | Module" "${module_name}")
49 |
50 | _module_help+=$(printf "%s" "
51 |
52 | Description
53 | -----------
54 |
55 | NSE Hadoop Services Module.
56 |
57 | Commands
58 | --------
59 |
60 | help display module or NSE help
61 | show display module or profile info
62 | config show module configuration
63 | set set module variable value
64 | use reuse module (changed env)
65 | pushd |init|show|flush command line commands stack
66 | search search key in all commands
67 | init [--args] run profile
68 |
69 | Options:
70 |
71 | key value
72 | profile alias or id
73 |
74 | ")
75 |
76 | # shellcheck disable=SC2154
77 | if [[ "$_mstate" -eq 0 ]] ; then
78 |
79 | if [[ -e "$_module_cfg" ]] && [[ -s "$_module_cfg" ]] ; then
80 |
81 | # shellcheck disable=SC1090
82 | source "$_module_cfg"
83 |
84 | else
85 |
86 | # shellcheck disable=SC2034
87 | _module_variables=()
88 |
89 | if [[ "${#_module_variables[@]}" -ne 0 ]] ; then
90 |
91 | printf "_module_variables=(\"%s\")\\n" "${_module_variables[@]}" > "$_module_cfg"
92 |
93 | fi
94 |
95 | _mstate=1
96 |
97 | fi
98 |
99 | else
100 |
101 | # shellcheck disable=SC1090
102 | source "$_module_cfg"
103 |
104 | fi
105 |
106 | # In the given commands you can use variables from the CLI config
107 | # command or the etc/main.cfg file.
108 |
109 | # shellcheck disable=SC2034
110 | _module_commands=(\
111 | #
112 | "https://nmap.org/nsedoc/scripts/hadoop-datanode-info.html;\
113 | ;hadoop-datanode-info;--script=hadoop-datanode-info" \
114 | #
115 | "https://nmap.org/nsedoc/scripts/hadoop-jobtracker-info.html;\
116 | ;hadoop-jobtracker-info;--script=hadoop-jobtracker-info;\
117 | \"hadoop-jobtracker-info.userinfo=false\"" \
118 | #
119 | "https://nmap.org/nsedoc/scripts/hadoop-namenode-info.html;\
120 | ;hadoop-namenode-info;--script=hadoop-namenode-info" \
121 | #
122 | "https://nmap.org/nsedoc/scripts/hadoop-secondary-namenode-info.html;\
123 | ;hadoop-secondary-namenode-info;--script=hadoop-secondary-namenode-info" \
124 | #
125 | "https://nmap.org/nsedoc/scripts/hadoop-tasktracker-info.html;\
126 | ;hadoop-tasktracker-info;--script=hadoop-tasktracker-info" \
127 | #
128 | "https://nmap.org/nsedoc/scripts/hbase-master-info.html;\
129 | ;hbase-master-info;--script=hbase-master-info" \
130 | #
131 | "https://nmap.org/nsedoc/scripts/hbase-region-info.html;\
132 | ;hbase-region-info;--script=hbase-region-info" \
133 | )
134 |
135 | # shellcheck disable=SC2034,SC2154
136 | _module_show=(\
137 | "${module_name}" \
138 | "${#_module_commands[@]}" \
139 | "${author}" \
140 | "${contact}" \
141 | "${description}" \
142 | )
143 |
144 | # shellcheck disable=SC2034
145 | export _module_opts=(\
146 | "$_module_help")
147 |
148 | return $_STATE
149 |
150 | }
151 |
--------------------------------------------------------------------------------
/data/modules/nse_http-cve.mod:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # shellcheck shell=bash
4 |
5 | # ``````````````````````````````````````````````````````````````````````````````
6 | # Function name: nse_http-cve()
7 | #
8 | # Description:
9 | # NSE HTTP Vulnerability CVE Module.
10 | #
11 | # Usage:
12 | # nse_http-cve
13 | #
14 | # Examples:
15 | # nse_http-cve
16 | #
17 |
18 | function nse_http-cve() {
19 |
20 | # shellcheck disable=SC2034
21 | local _FUNCTION_ID="nse_http-cve"
22 | local _STATE=0
23 |
24 | # User variables:
25 | # - module_name: store module name
26 | # - module_args: store module arguments
27 |
28 | export _module_show=
29 | export _module_help=
30 | export _module_opts=
31 | export _module_commands=
32 |
33 | # shellcheck disable=SC2034
34 | _module_variables=()
35 |
36 | # shellcheck disable=SC2034
37 | author="trimstray"
38 | contact="trimstray@gmail.com"
39 | description="NSE HTTP Vulnerability CVE Module"
40 |
41 | # shellcheck disable=SC2034,SC2154
42 | _module_cfg="${_modules}/${module_name}.cfg"
43 |
44 | touch "$_module_cfg"
45 |
46 | # shellcheck disable=SC2034,SC2154
47 | _module_help=$(printf "%s: \\e[1;32m%s\\e[m" "
48 | Module" "${module_name}")
49 |
50 | _module_help+=$(printf "%s" "
51 |
52 | Description
53 | -----------
54 |
55 | NSE HTTP Vulnerability CVE Module.
56 |
57 | Commands
58 | --------
59 |
60 | help display module or NSE help
61 | show display module or profile info
62 | config show module configuration
63 | set set module variable value
64 | use reuse module (changed env)
65 | pushd |init|show|flush command line commands stack
66 | search search key in all commands
67 | init [--args] run profile
68 |
69 | Options:
70 |
71 | key value
72 | profile alias or id
73 |
74 | ")
75 |
76 | # shellcheck disable=SC2154
77 | if [[ "$_mstate" -eq 0 ]] ; then
78 |
79 | if [[ -e "$_module_cfg" ]] && [[ -s "$_module_cfg" ]] ; then
80 |
81 | # shellcheck disable=SC1090
82 | source "$_module_cfg"
83 |
84 | else
85 |
86 | # shellcheck disable=SC2034
87 | _module_variables=()
88 |
89 | if [[ "${#_module_variables[@]}" -ne 0 ]] ; then
90 |
91 | printf "_module_variables=(\"%s\")\\n" "${_module_variables[@]}" > "$_module_cfg"
92 |
93 | fi
94 |
95 | _mstate=1
96 |
97 | fi
98 |
99 | else
100 |
101 | # shellcheck disable=SC1090
102 | source "$_module_cfg"
103 |
104 | fi
105 |
106 | # In the given commands you can use variables from the CLI config
107 | # command or the etc/main.cfg file.
108 |
109 | # shellcheck disable=SC2034
110 | _module_commands=(\
111 | #
112 | "https://nmap.org/nsedoc/scripts/http-vuln-cve2006-3392.html;\
113 | ;http-vuln-cve2006-3392;--script=http-vuln-cve2006-3392;\
114 | \"http-vuln-cve2006-3392.file=/etc/passwd\"" \
115 | #
116 | "https://nmap.org/nsedoc/scripts/http-vuln-cve2009-3960.html;\
117 | ;http-vuln-cve2009-3960;--script=http-vuln-cve2009-3960;\
118 | \"http-vuln-cve2009-3960.root/\",\"http-vuln-cve2009-3960.readfile=/etc/passwd\"" \
119 | #
120 | "https://nmap.org/nsedoc/scripts/http-vuln-cve2010-0738.html;\
121 | ;http-vuln-cve2010-0738;--script=http-vuln-cve2010-0738;\
122 | \"http-vuln-cve2010-0738.paths={\"/jmx-console/\"}\"" \
123 | #
124 | "https://nmap.org/nsedoc/scripts/http-vuln-cve2010-2861.html;\
125 | ;http-vuln-cve2010-2861;--script=http-vuln-cve2010-2861" \
126 | #
127 | "https://nmap.org/nsedoc/scripts/http-vuln-cve2011-3192.html;\
128 | ;http-vuln-cve2011-3192;--script=http-vuln-cve2011-3192;\
129 | \"http-vuln-cve2011-3192.path\",\"http-vuln-cve2011-3192.hostname\"" \
130 | #
131 | "https://nmap.org/nsedoc/scripts/http-vuln-cve2011-3368.html;\
132 | ;http-vuln-cve2011-3368;--script=http-vuln-cve2011-3368;\
133 | \"http-vuln-cve2011-3368.prefix\"" \
134 | #
135 | "https://nmap.org/nsedoc/scripts/http-vuln-cve2012-1823.html;\
136 | ;http-vuln-cve2012-1823;--script=http-vuln-cve2012-1823;\
137 | \"http-vuln-cve2012-1823.uri=/index.php\",\"http-vuln-cve2012-1823.cmd=uname -a\"" \
138 | #
139 | "https://nmap.org/nsedoc/scripts/http-vuln-cve2013-0156.html;\
140 | ;http-vuln-cve2013-0156;--script=http-vuln-cve2013-0156;\
141 | \"http-vuln-cve2013-0156.uri=/\"" \
142 | #
143 | "https://nmap.org/nsedoc/scripts/http-vuln-cve2013-6786.html;\
144 | ;http-vuln-cve2013-6786;--script=http-vuln-cve2013-6786" \
145 | #
146 | "https://nmap.org/nsedoc/scripts/http-vuln-cve2013-7091.html;\
147 | ;http-vuln-cve2013-7091;--script=http-vuln-cve2013-7091;\
148 | \"http-vuln-cve2013-7091.uri=/zimbra\"" \
149 | #
150 | "https://nmap.org/nsedoc/scripts/http-vuln-cve2014-2126.html;\
151 | ;http-vuln-cve2014-2126;--script=http-vuln-cve2014-2126" \
152 | #
153 | "https://nmap.org/nsedoc/scripts/http-vuln-cve2014-2127.html;\
154 | ;http-vuln-cve2014-2127;--script=http-vuln-cve2014-2127" \
155 | #
156 | "https://nmap.org/nsedoc/scripts/http-vuln-cve2014-2128.html;\
157 | ;http-vuln-cve2014-2128;--script=http-vuln-cve2014-2128" \
158 | #
159 | "https://nmap.org/nsedoc/scripts/http-vuln-cve2014-2129.html;\
160 | ;http-vuln-cve2014-2129;--script=http-vuln-cve2014-2129" \
161 | #
162 | "https://nmap.org/nsedoc/scripts/http-vuln-cve2014-3704.html;\
163 | ;http-vuln-cve2014-3704;--script=http-vuln-cve2014-3704;\
164 | \"http-vuln-cve2014-3704.uri=/\",\"http-vuln-cve2014-3704.cmd\",\
165 | \"http-vuln-cve2014-3704.cleanup=true\"" \
166 | #
167 | "https://nmap.org/nsedoc/scripts/http-vuln-cve2014-8877.html;\
168 | ;http-vuln-cve2014-8877;--script=http-vuln-cve2014-8877;\
169 | \"http-vuln-cve2014-8877.cmd\",\"http-vuln-cve2014-8877.uri=/\"" \
170 | #
171 | "https://nmap.org/nsedoc/scripts/http-vuln-cve2015-1427.html;\
172 | ;http-vuln-cve2015-1427;--script=http-vuln-cve2015-1427;\
173 | \"command\",\"invasive\"" \
174 | #
175 | "https://nmap.org/nsedoc/scripts/http-vuln-cve2015-1635.html;\
176 | ;http-vuln-cve2015-1635;--script=http-vuln-cve2015-1635;\
177 | \"http-vuln-cve2015-1635.uri=/\"" \
178 | #
179 | "https://nmap.org/nsedoc/scripts/http-vuln-cve2017-1001000.html;\
180 | ;http-vuln-cve2017-1001000;--script=http-vuln-cve2017-1001000;\
181 | \"http-vuln-cve2017-1001000.uri=/\"" \
182 | #
183 | "https://nmap.org/nsedoc/scripts/http-vuln-cve2017-5638.html;\
184 | ;http-vuln-cve2017-5638;--script=http-vuln-cve2017-5638;\
185 | \"http-vuln-cve2017-5638.path=/\",\"http-vuln-cve2017-5638.method=GET\"" \
186 | #
187 | "https://nmap.org/nsedoc/scripts/http-vuln-cve2017-5689.html;\
188 | ;http-vuln-cve2017-5689;--script=http-vuln-cve2017-5689" \
189 | #
190 | "https://nmap.org/nsedoc/scripts/http-vuln-cve2017-8917.html;\
191 | ;http-vuln-cve2017-8917;--script=http-vuln-cve2017-8917;\
192 | \"http-vuln-cve2017-8917.uri\"" \
193 | )
194 |
195 | # shellcheck disable=SC2034,SC2154
196 | _module_show=(\
197 | "${module_name}" \
198 | "${#_module_commands[@]}" \
199 | "${author}" \
200 | "${contact}" \
201 | "${description}" \
202 | )
203 |
204 | # shellcheck disable=SC2034
205 | export _module_opts=(\
206 | "$_module_help")
207 |
208 | return $_STATE
209 |
210 | }
211 |
--------------------------------------------------------------------------------
/data/modules/nse_http-services.mod:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # shellcheck shell=bash
4 |
5 | # ``````````````````````````````````````````````````````````````````````````````
6 | # Function name: nse_http-services()
7 | #
8 | # Description:
9 | # NSE HTTP Services Module.
10 | #
11 | # Usage:
12 | # nse_http-services
13 | #
14 | # Examples:
15 | # nse_http-services
16 | #
17 |
18 | function nse_http-services() {
19 |
20 | # shellcheck disable=SC2034
21 | local _FUNCTION_ID="nse_http-services"
22 | local _STATE=0
23 |
24 | # User variables:
25 | # - module_name: store module name
26 | # - module_args: store module arguments
27 |
28 | export _module_show=
29 | export _module_help=
30 | export _module_opts=
31 | export _module_commands=
32 |
33 | # shellcheck disable=SC2034
34 | _module_variables=()
35 |
36 | # shellcheck disable=SC2034
37 | author="trimstray"
38 | contact="trimstray@gmail.com"
39 | description="NSE HTTP Services Module"
40 |
41 | # shellcheck disable=SC2034,SC2154
42 | _module_cfg="${_modules}/${module_name}.cfg"
43 |
44 | touch "$_module_cfg"
45 |
46 | # shellcheck disable=SC2034,SC2154
47 | _module_help=$(printf "%s: \\e[1;32m%s\\e[m" "
48 | Module" "${module_name}")
49 |
50 | _module_help+=$(printf "%s" "
51 |
52 | Description
53 | -----------
54 |
55 | NSE HTTP Services Module.
56 |
57 | Commands
58 | --------
59 |
60 | help display module or NSE help
61 | show display module or profile info
62 | config show module configuration
63 | set set module variable value
64 | use reuse module (changed env)
65 | pushd |init|show|flush command line commands stack
66 | search search key in all commands
67 | init [--args] run profile
68 |
69 | Options:
70 |
71 | key value
72 | profile alias or id
73 |
74 | ")
75 |
76 | # shellcheck disable=SC2154
77 | if [[ "$_mstate" -eq 0 ]] ; then
78 |
79 | if [[ -e "$_module_cfg" ]] && [[ -s "$_module_cfg" ]] ; then
80 |
81 | # shellcheck disable=SC1090
82 | source "$_module_cfg"
83 |
84 | else
85 |
86 | # shellcheck disable=SC2034
87 | _module_variables=()
88 |
89 | if [[ "${#_module_variables[@]}" -ne 0 ]] ; then
90 |
91 | printf "_module_variables=(\"%s\")\\n" "${_module_variables[@]}" > "$_module_cfg"
92 |
93 | fi
94 |
95 | _mstate=1
96 |
97 | fi
98 |
99 | else
100 |
101 | # shellcheck disable=SC1090
102 | source "$_module_cfg"
103 |
104 | fi
105 |
106 | # In the given commands you can use variables from the CLI config
107 | # command or the etc/main.cfg file.
108 |
109 | # shellcheck disable=SC2034
110 | _module_commands=(\
111 | #
112 | "https://nmap.org/nsedoc/scripts/http-apache-negotiation.html;\
113 | ;http-apache-negotiation;--script=http-apache-negotiation;\
114 | \"http-apache-negotiation.root=/\"" \
115 | #
116 | "https://nmap.org/nsedoc/scripts/http-apache-server-status.html;\
117 | ;http-apache-server-status;--script=http-apache-server-status" \
118 | #
119 | "https://nmap.org/nsedoc/scripts/http-aspnet-debug.html;\
120 | ;http-aspnet-debug;--script=http-aspnet-debug;\
121 | \"http-aspnet-debug.path=/\"" \
122 | #
123 | "https://nmap.org/nsedoc/scripts/http-awstatstotals-exec.html;\
124 | ;http-awstatstotals-exec;--script=http-awstatstotals-exec;\
125 | \"http-awstatstotals-exec.uri=index.php\",\"http-awstatstotals-exec.cmd=whoami\",\
126 | \"http-awstatstotals-exec.outfile\"" \
127 | #
128 | "https://nmap.org/nsedoc/scripts/http-bigip-cookie.html;\
129 | ;http-bigip-cookie;--script=http-bigip-cookie;\
130 | \"http-bigip-cookie.path=/\"" \
131 | #
132 | "https://nmap.org/nsedoc/scripts/http-cakephp-version.html;\
133 | ;http-cakephp-version;--script=http-cakephp-version" \
134 | #
135 | "https://nmap.org/nsedoc/scripts/http-dlink-backdoor.html;\
136 | ;http-dlink-backdoor;--script=http-dlink-backdoor" \
137 | #
138 | "https://nmap.org/nsedoc/scripts/http-drupal-enum.html;\
139 | ;http-drupal-enum;--script=http-drupal-enum;\
140 | \"http-drupal-enum.themes_path\",\"http-drupal-enum.number=100\",\
141 | \"http-drupal-enum.type=all.choose\",\"http-drupal-enum.root=/\",\
142 | \"http-drupal-enum.modules_path\"" \
143 | #
144 | "https://nmap.org/nsedoc/scripts/http-drupal-enum-users.html;\
145 | ;http-drupal-enum-users;--script=http-drupal-enum-users;\
146 | \"http-drupal-enum-users.root=100\"" \
147 | #
148 | "https://nmap.org/nsedoc/scripts/http-git.html;\
149 | ;http-git;--script=http-git;\
150 | \"http-git.root=/\"" \
151 | #
152 | "https://nmap.org/nsedoc/scripts/http-iis-short-name-brute.html;\
153 | ;http-iis-short-name-brute;--script=http-iis-short-name-brute" \
154 | #
155 | "https://nmap.org/nsedoc/scripts/http-iis-webdav-vuln.html;\
156 | ;http-iis-webdav-vuln;--script=http-iis-webdav-vuln;\
157 | \"basefolder\",\"folderdb\",\"webdavfolder\"" \
158 | #
159 | "https://nmap.org/nsedoc/scripts/http-joomla-brute.html;\
160 | ;http-joomla-brute;--script=http-joomla-brute;\
161 | \"http-joomla-brute.uservar=username\",\"http-joomla-brute.threads=3\",\
162 | \"http-joomla-brute.uri=/administrator/index.php\",\"http-joomla-brute.hostname\",\
163 | \"http-joomla-brute.passvar=passwd\"" \
164 | #
165 | "https://nmap.org/nsedoc/scripts/http-jsonp-detection.html;\
166 | ;http-jsonp-detection;--script=http-jsonp-detection;\
167 | \"http-jsonp-detection.path=/\"" \
168 | #
169 | "https://nmap.org/nsedoc/scripts/http-malware-host.html;\
170 | ;http-malware-host;--script=http-malware-host" \
171 | #
172 | "https://nmap.org/nsedoc/scripts/http-passwd.html;\
173 | ;http-passwd;--script=http-passwd;\
174 | \"http-passwd.root=/\"" \
175 | #
176 | "https://nmap.org/nsedoc/scripts/http-php-version.html;\
177 | ;http-php-version;--script=http-php-version" \
178 | #
179 | "https://nmap.org/nsedoc/scripts/http-phpmyadmin-dir-traversal.html;\
180 | ;http-phpmyadmin-dir-traversal;--script=http-phpmyadmin-dir-traversal;\
181 | \"http-phpmyadmin-dir-traversal.dir=/phpMyAdmin-2.6.4-pl1/\",\
182 | \"http-phpmyadmin-dir-traversal.file=../../../../../etc/passwd\",\
183 | \"http-phpmyadmin-dir-traversal.outfile\"" \
184 | #
185 | "https://nmap.org/nsedoc/scripts/http-robots.txt.html;\
186 | ;http-robots;--script=http-robots.txt" \
187 | #
188 | "https://nmap.org/nsedoc/scripts/http-tplink-dir-traversal.html;\
189 | ;http-tplink-dir-traversal;--script=http-tplink-dir-traversal;\
190 | \"http-tplink-dir-traversal.rfile=/etc/passwd\",\"http-tplink-dir-traversal.outfile\"" \
191 | #
192 | "https://nmap.org/nsedoc/scripts/http-virustotal.html;\
193 | ;http-virustotal;--script=http-virustotal;\
194 | \"http-virustotal.checksum\",\"http-virustotal.apikey\",\
195 | \"http-virustotal.upload=false\",\"http-virustotal.filename\"" \
196 | #
197 | "https://nmap.org/nsedoc/scripts/http-vmware-path-vuln.html;\
198 | ;http-vmware-path-vuln;--script=http-vmware-path-vuln" \
199 | #
200 | "https://nmap.org/nsedoc/scripts/http-waf-detect.html;\
201 | ;http-waf-detect;--script=http-waf-detect;\
202 | \"http-waf-detect.uri\",\"http-waf-detect.aggro\",\
203 | \"http-waf-detect.detectBodyChanges\"" \
204 | #
205 | "https://nmap.org/nsedoc/scripts/http-waf-fingerprint.html;\
206 | ;http-waf-fingerprint;--script=http-waf-fingerprint;\
207 | \"http-waf-fingerprint.root=/\",\"http-waf-fingerprint.intensive\"" \
208 | #
209 | "https://nmap.org/nsedoc/scripts/http-webdav-scan.html;\
210 | ;http-webdav-scan;--script=http-webdav-scan;\
211 | \"http-webdav-scan.path=/\"" \
212 | #
213 | "https://nmap.org/nsedoc/scripts/http-wordpress-brute.html;\
214 | ;http-wordpress-brute;--script=http-wordpress-brute;\
215 | \"http-wordpress-brute.threads=3\",\"http-wordpress-brute.uri=/wp-login.php\",\
216 | \"http-wordpress-brute.uservar=log\",\"http-wordpress-brute.hostname\",\
217 | \"http-wordpress-brute.passvar=pwd\"" \
218 | #
219 | "https://nmap.org/nsedoc/scripts/http-wordpress-enum.html;\
220 | ;http-wordpress-enum;--script=http-wordpress-enum;\
221 | \"http-wordpress-enum.type=all\",\"http-wordpress-enum.search-limit=100\",\
222 | \"http-wordpress-enum.root=/\",\"http-wordpress-enum.check-latest=false\"" \
223 | #
224 | "https://nmap.org/nsedoc/scripts/http-wordpress-users.html;\
225 | ;http-wordpress-users;--script=http-wordpress-users;\
226 | \"http-wordpress-users.out\",\"http-wordpress-users.basepath=/\",\
227 | \"http-wordpress-users.limit=25\"" \
228 | )
229 |
230 | # shellcheck disable=SC2034,SC2154
231 | _module_show=(\
232 | "${module_name}" \
233 | "${#_module_commands[@]}" \
234 | "${author}" \
235 | "${contact}" \
236 | "${description}" \
237 | )
238 |
239 | # shellcheck disable=SC2034
240 | export _module_opts=(\
241 | "$_module_help")
242 |
243 | return $_STATE
244 |
245 | }
246 |
--------------------------------------------------------------------------------
/data/modules/nse_mail.mod:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # shellcheck shell=bash
4 |
5 | # ``````````````````````````````````````````````````````````````````````````````
6 | # Function name: nse_mail()
7 | #
8 | # Description:
9 | # NSE Mail Services Module.
10 | #
11 | # Usage:
12 | # nse_mail
13 | #
14 | # Examples:
15 | # nse_mail
16 | #
17 |
18 | function nse_mail() {
19 |
20 | # shellcheck disable=SC2034
21 | local _FUNCTION_ID="nse_mail"
22 | local _STATE=0
23 |
24 | # User variables:
25 | # - module_name: store module name
26 | # - module_args: store module arguments
27 |
28 | export _module_show=
29 | export _module_help=
30 | export _module_opts=
31 | export _module_commands=
32 |
33 | # shellcheck disable=SC2034
34 | _module_variables=()
35 |
36 | # shellcheck disable=SC2034
37 | author="trimstray"
38 | contact="trimstray@gmail.com"
39 | description="NSE Mail Services Module"
40 |
41 | # shellcheck disable=SC2034,SC2154
42 | _module_cfg="${_modules}/${module_name}.cfg"
43 |
44 | touch "$_module_cfg"
45 |
46 | # shellcheck disable=SC2034,SC2154
47 | _module_help=$(printf "%s: \\e[1;32m%s\\e[m" "
48 | Module" "${module_name}")
49 |
50 | _module_help+=$(printf "%s" "
51 |
52 | Description
53 | -----------
54 |
55 | NSE Mail Services Module.
56 |
57 | Commands
58 | --------
59 |
60 | help display module or NSE help
61 | show display module or profile info
62 | config show module configuration
63 | set set module variable value
64 | use reuse module (changed env)
65 | pushd |init|show|flush command line commands stack
66 | search search key in all commands
67 | init [--args] run profile
68 |
69 | Options:
70 |
71 | key value
72 | profile alias or id
73 |
74 | ")
75 |
76 | # shellcheck disable=SC2154
77 | if [[ "$_mstate" -eq 0 ]] ; then
78 |
79 | if [[ -e "$_module_cfg" ]] && [[ -s "$_module_cfg" ]] ; then
80 |
81 | # shellcheck disable=SC1090
82 | source "$_module_cfg"
83 |
84 | else
85 |
86 | # shellcheck disable=SC2034
87 | _module_variables=()
88 |
89 | if [[ "${#_module_variables[@]}" -ne 0 ]] ; then
90 |
91 | printf "_module_variables=(\"%s\")\\n" "${_module_variables[@]}" > "$_module_cfg"
92 |
93 | fi
94 |
95 | _mstate=1
96 |
97 | fi
98 |
99 | else
100 |
101 | # shellcheck disable=SC1090
102 | source "$_module_cfg"
103 |
104 | fi
105 |
106 | # In the given commands you can use variables from the CLI config
107 | # command or the etc/main.cfg file.
108 |
109 | # shellcheck disable=SC2034
110 | _module_commands=(\
111 | #
112 | "https://nmap.org/nsedoc/scripts/imap-brute.html;\
113 | ;imap-brute;--script=imap-brute;\
114 | \"imap-brute.auth\"" \
115 | #
116 | "https://nmap.org/nsedoc/scripts/imap-capabilities.html;\
117 | ;imap-capabilities;--script=imap-capabilities" \
118 | #
119 | "https://nmap.org/nsedoc/scripts/imap-ntlm-info.html;\
120 | ;imap-ntlm-info;--script=imap-ntlm-info" \
121 | #
122 | "https://nmap.org/nsedoc/scripts/pop3-brute.html;\
123 | ;pop3-brute;--script=pop3-brute;\
124 | \"pop3loginmethod=USER\"" \
125 | #
126 | "https://nmap.org/nsedoc/scripts/pop3-capabilities.html;\
127 | ;pop3-capabilities;--script=pop3-capabilities" \
128 | #
129 | "https://nmap.org/nsedoc/scripts/pop3-ntlm-info.html;\
130 | ;pop3-ntlm-info;--script=pop3-ntlm-info" \
131 | #
132 | "https://nmap.org/nsedoc/scripts/smtp-brute.html;\
133 | ;smtp-brute;--script=smtp-brute;\
134 | \"smtp-brute.auth\"" \
135 | #
136 | "https://nmap.org/nsedoc/scripts/smtp-commands.html;\
137 | ;smtp-commands;--script=smtp-commands;\
138 | \"smtp-commands.domain\"" \
139 | #
140 | "https://nmap.org/nsedoc/scripts/smtp-enum-users.html;\
141 | ;smtp-enum-users;--script=smtp-enum-users;\
142 | \"smtp-enum-users.domain\",\"smtp-enum-users.methods\"" \
143 | #
144 | "https://nmap.org/nsedoc/scripts/smtp-ntlm-info.html;\
145 | ;smtp-ntlm-info;--script=smtp-ntlm-info" \
146 | #
147 | "https://nmap.org/nsedoc/scripts/smtp-open-relay.html;\
148 | ;smtp-open-relay;--script=smtp-open-relay;\
149 | \"smtp-open-relay.ip\",\"smtp-open-relay.to=relaytest\",\
150 | \"smtp-open-relay.domain=nmap.scanme.org\",\"smtp-open-relay.from=antispam\"" \
151 | #
152 | "https://nmap.org/nsedoc/scripts/smtp-strangeport.html;\
153 | ;smtp-strangeport;--script=smtp-strangeport" \
154 | #
155 | "https://nmap.org/nsedoc/scripts/smtp-vuln-cve2010-4344.html;\
156 | ;smtp-vuln-cve2010-4344;--script=smtp-vuln-cve2010-4344;\
157 | \"exploit.cmd\",\"smtp-vuln-cve2010-4344.mailto\",\
158 | \"smtp-vuln-cve2010-4344.mailfrom\",\"smtp-vuln-cve2010-4344.exploit\"" \
159 | #
160 | "https://nmap.org/nsedoc/scripts/smtp-vuln-cve2011-1720.html;\
161 | ;smtp-vuln-cve2011-1720;--script=smtp-vuln-cve2011-1720" \
162 | #
163 | "https://nmap.org/nsedoc/scripts/smtp-vuln-cve2011-1764.html;\
164 | ;smtp-vuln-cve2011-1764;--script=smtp-vuln-cve2011-1764;\
165 | \"smtp-vuln-cve2011-1764.mailto\",\"smtp-vuln-cve2011-1764.mailfrom\"" \
166 | )
167 |
168 | # shellcheck disable=SC2034,SC2154
169 | _module_show=(\
170 | "${module_name}" \
171 | "${#_module_commands[@]}" \
172 | "${author}" \
173 | "${contact}" \
174 | "${description}" \
175 | )
176 |
177 | # shellcheck disable=SC2034
178 | export _module_opts=(\
179 | "$_module_help")
180 |
181 | return $_STATE
182 |
183 | }
184 |
--------------------------------------------------------------------------------
/data/modules/nse_oracle.mod:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # shellcheck shell=bash
4 |
5 | # ``````````````````````````````````````````````````````````````````````````````
6 | # Function name: nse_oracle()
7 | #
8 | # Description:
9 | # NSE Oracle Services Module.
10 | #
11 | # Usage:
12 | # nse_oracle
13 | #
14 | # Examples:
15 | # nse_oracle
16 | #
17 |
18 | function nse_oracle() {
19 |
20 | # shellcheck disable=SC2034
21 | local _FUNCTION_ID="nse_oracle"
22 | local _STATE=0
23 |
24 | # User variables:
25 | # - module_name: store module name
26 | # - module_args: store module arguments
27 |
28 | export _module_show=
29 | export _module_help=
30 | export _module_opts=
31 | export _module_commands=
32 |
33 | # shellcheck disable=SC2034
34 | _module_variables=()
35 |
36 | # shellcheck disable=SC2034
37 | author="trimstray"
38 | contact="trimstray@gmail.com"
39 | description="NSE Oracle Services Module"
40 |
41 | # shellcheck disable=SC2034,SC2154
42 | _module_cfg="${_modules}/${module_name}.cfg"
43 |
44 | touch "$_module_cfg"
45 |
46 | # shellcheck disable=SC2034,SC2154
47 | _module_help=$(printf "%s: \\e[1;32m%s\\e[m" "
48 | Module" "${module_name}")
49 |
50 | _module_help+=$(printf "%s" "
51 |
52 | Description
53 | -----------
54 |
55 | NSE Oracle Services Module.
56 |
57 | Commands
58 | --------
59 |
60 | help display module or NSE help
61 | show display module or profile info
62 | config show module configuration
63 | set set module variable value
64 | use reuse module (changed env)
65 | pushd |init|show|flush command line commands stack
66 | search search key in all commands
67 | init [--args] run profile
68 |
69 | Options:
70 |
71 | key value
72 | profile alias or id
73 |
74 | ")
75 |
76 | # shellcheck disable=SC2154
77 | if [[ "$_mstate" -eq 0 ]] ; then
78 |
79 | if [[ -e "$_module_cfg" ]] && [[ -s "$_module_cfg" ]] ; then
80 |
81 | # shellcheck disable=SC1090
82 | source "$_module_cfg"
83 |
84 | else
85 |
86 | # shellcheck disable=SC2034
87 | _module_variables=()
88 |
89 | if [[ "${#_module_variables[@]}" -ne 0 ]] ; then
90 |
91 | printf "_module_variables=(\"%s\")\\n" "${_module_variables[@]}" > "$_module_cfg"
92 |
93 | fi
94 |
95 | _mstate=1
96 |
97 | fi
98 |
99 | else
100 |
101 | # shellcheck disable=SC1090
102 | source "$_module_cfg"
103 |
104 | fi
105 |
106 | # In the given commands you can use variables from the CLI config
107 | # command or the etc/main.cfg file.
108 |
109 | # shellcheck disable=SC2034
110 | _module_commands=(\
111 | #
112 | "https://nmap.org/nsedoc/scripts/oracle-brute-stealth.html;\
113 | ;oracle-brute-stealth;--script=oracle-brute-stealth;\
114 | \"oracle-brute-stealth.johnfile\",\"oracle-brute-stealth.accounts\",\
115 | \"oracle-brute-stealth.sid\",\"oracle-brute-stealth.nodefault\"" \
116 | #
117 | "https://nmap.org/nsedoc/scripts/oracle-brute.html;\
118 | ;oracle-brute;--script=oracle-brute;\
119 | \"oracle-brute.sid\",\"oracle-brute.nodefault\"" \
120 | #
121 | "https://nmap.org/nsedoc/scripts/oracle-enum-users.html;\
122 | ;oracle-enum-users;--script=oracle-enum-users;\
123 | \"oracle-enum-users.sid\"" \
124 | #
125 | "https://nmap.org/nsedoc/scripts/oracle-sid-brute.html;\
126 | ;oracle-sid-brute;--script=oracle-sid-brute;\
127 | \"oraclesids\"" \
128 | #
129 | "https://nmap.org/nsedoc/scripts/oracle-tns-version.html;\
130 | ;oracle-tns-version;--script=oracle-tns-version" \
131 | #
132 | "https://nmap.org/nsedoc/scripts/ovs-agent-version.html;\
133 | ;ovs-agent-version;--script=ovs-agent-version" \
134 | )
135 |
136 | # shellcheck disable=SC2034,SC2154
137 | _module_show=(\
138 | "${module_name}" \
139 | "${#_module_commands[@]}" \
140 | "${author}" \
141 | "${contact}" \
142 | "${description}" \
143 | )
144 |
145 | # shellcheck disable=SC2034
146 | export _module_opts=(\
147 | "$_module_help")
148 |
149 | return $_STATE
150 |
151 | }
152 |
--------------------------------------------------------------------------------
/data/modules/nse_other-auth.mod:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # shellcheck shell=bash
4 |
5 | # ``````````````````````````````````````````````````````````````````````````````
6 | # Function name: nse_other-auth()
7 | #
8 | # Description:
9 | # NSE Other Auth Module.
10 | #
11 | # Usage:
12 | # nse_other-auth
13 | #
14 | # Examples:
15 | # nse_other-auth
16 | #
17 |
18 | function nse_other-auth() {
19 |
20 | # shellcheck disable=SC2034
21 | local _FUNCTION_ID="nse_other-auth"
22 | local _STATE=0
23 |
24 | # User variables:
25 | # - module_name: store module name
26 | # - module_args: store module arguments
27 |
28 | export _module_show=
29 | export _module_help=
30 | export _module_opts=
31 | export _module_commands=
32 |
33 | # shellcheck disable=SC2034
34 | _module_variables=()
35 |
36 | # shellcheck disable=SC2034
37 | author="trimstray"
38 | contact="trimstray@gmail.com"
39 | description="NSE Other Auth Module"
40 |
41 | # shellcheck disable=SC2034,SC2154
42 | _module_cfg="${_modules}/${module_name}.cfg"
43 |
44 | touch "$_module_cfg"
45 |
46 | # shellcheck disable=SC2034,SC2154
47 | _module_help=$(printf "%s: \\e[1;32m%s\\e[m" "
48 | Module" "${module_name}")
49 |
50 | _module_help+=$(printf "%s" "
51 |
52 | Description
53 | -----------
54 |
55 | NSE Other Auth Module.
56 |
57 | Commands
58 | --------
59 |
60 | help display module or NSE help
61 | show display module or profile info
62 | config show module configuration
63 | set set module variable value
64 | use reuse module (changed env)
65 | pushd |init|show|flush command line commands stack
66 | search search key in all commands
67 | init [--args] run profile
68 |
69 | Options:
70 |
71 | key value
72 | profile alias or id
73 |
74 | ")
75 |
76 | # shellcheck disable=SC2154
77 | if [[ "$_mstate" -eq 0 ]] ; then
78 |
79 | if [[ -e "$_module_cfg" ]] && [[ -s "$_module_cfg" ]] ; then
80 |
81 | # shellcheck disable=SC1090
82 | source "$_module_cfg"
83 |
84 | else
85 |
86 | # shellcheck disable=SC2034
87 | _module_variables=()
88 |
89 | if [[ "${#_module_variables[@]}" -ne 0 ]] ; then
90 |
91 | printf "_module_variables=(\"%s\")\\n" "${_module_variables[@]}" > "$_module_cfg"
92 |
93 | fi
94 |
95 | _mstate=1
96 |
97 | fi
98 |
99 | else
100 |
101 | # shellcheck disable=SC1090
102 | source "$_module_cfg"
103 |
104 | fi
105 |
106 | # In the given commands you can use variables from the CLI config
107 | # command or the etc/main.cfg file.
108 |
109 | # shellcheck disable=SC2034
110 | _module_commands=(\
111 | #
112 | "https://nmap.org/nsedoc/scripts/creds-summary.html;\
113 | ;creds-summary;--script=creds-summary" \
114 | #
115 | "https://nmap.org/nsedoc/scripts/krb5-enum-users.html;\
116 | ;krb5-enum-users;--script=krb5-enum-users;\
117 | \"krb5-enum-users.realm\"" \
118 | #
119 | "https://nmap.org/nsedoc/scripts/x11-access.html;\
120 | ;x11-access;--script=x11-access" \
121 | )
122 |
123 | # shellcheck disable=SC2034,SC2154
124 | _module_show=(\
125 | "${module_name}" \
126 | "${#_module_commands[@]}" \
127 | "${author}" \
128 | "${contact}" \
129 | "${description}" \
130 | )
131 |
132 | # shellcheck disable=SC2034
133 | export _module_opts=(\
134 | "$_module_help")
135 |
136 | return $_STATE
137 |
138 | }
139 |
--------------------------------------------------------------------------------
/data/modules/nse_other-discovery.mod:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # shellcheck shell=bash
4 |
5 | # ``````````````````````````````````````````````````````````````````````````````
6 | # Function name: nse_other-discovery()
7 | #
8 | # Description:
9 | # NSE Other Discovery Module.
10 | #
11 | # Usage:
12 | # nse_other-discovery
13 | #
14 | # Examples:
15 | # nse_other-discovery
16 | #
17 |
18 | function nse_other-discovery() {
19 |
20 | # shellcheck disable=SC2034
21 | local _FUNCTION_ID="nse_other-discovery"
22 | local _STATE=0
23 |
24 | # User variables:
25 | # - module_name: store module name
26 | # - module_args: store module arguments
27 |
28 | export _module_show=
29 | export _module_help=
30 | export _module_opts=
31 | export _module_commands=
32 |
33 | # shellcheck disable=SC2034
34 | _module_variables=()
35 |
36 | # shellcheck disable=SC2034
37 | author="trimstray"
38 | contact="trimstray@gmail.com"
39 | description="NSE Other Discovery Module"
40 |
41 | # shellcheck disable=SC2034,SC2154
42 | _module_cfg="${_modules}/${module_name}.cfg"
43 |
44 | touch "$_module_cfg"
45 |
46 | # shellcheck disable=SC2034,SC2154
47 | _module_help=$(printf "%s: \\e[1;32m%s\\e[m" "
48 | Module" "${module_name}")
49 |
50 | _module_help+=$(printf "%s" "
51 |
52 | Description
53 | -----------
54 |
55 | NSE Other Discovery Module.
56 |
57 | Commands
58 | --------
59 |
60 | help display module or NSE help
61 | show display module or profile info
62 | config show module configuration
63 | set set module variable value
64 | use reuse module (changed env)
65 | pushd |init|show|flush command line commands stack
66 | search search key in all commands
67 | init [--args] run profile
68 |
69 | Options:
70 |
71 | key value
72 | profile alias or id
73 |
74 | ")
75 |
76 | # shellcheck disable=SC2154
77 | if [[ "$_mstate" -eq 0 ]] ; then
78 |
79 | if [[ -e "$_module_cfg" ]] && [[ -s "$_module_cfg" ]] ; then
80 |
81 | # shellcheck disable=SC1090
82 | source "$_module_cfg"
83 |
84 | else
85 |
86 | # shellcheck disable=SC2034
87 | _module_variables=()
88 |
89 | if [[ "${#_module_variables[@]}" -ne 0 ]] ; then
90 |
91 | printf "_module_variables=(\"%s\")\\n" "${_module_variables[@]}" > "$_module_cfg"
92 |
93 | fi
94 |
95 | _mstate=1
96 |
97 | fi
98 |
99 | else
100 |
101 | # shellcheck disable=SC1090
102 | source "$_module_cfg"
103 |
104 | fi
105 |
106 | # In the given commands you can use variables from the CLI config
107 | # command or the etc/main.cfg file.
108 |
109 | # shellcheck disable=SC2034
110 | _module_commands=(\
111 | #
112 | "https://nmap.org/nsedoc/scripts/banner.html;\
113 | ;banner;--script=banner;\
114 | \"banner.timeout=5s\",\"banner.ports\"" \
115 | #
116 | "https://nmap.org/nsedoc/scripts/duplicates.html;\
117 | ;duplicates;--script=duplicates" \
118 | #
119 | "https://nmap.org/nsedoc/scripts/lltd-discovery.html;\
120 | ;lltd-discovery;--script=lltd-discovery;\
121 | \"lltd-discovery.interface\",\"lltd-discovery.timeout=30s\"" \
122 | )
123 |
124 | # shellcheck disable=SC2034,SC2154
125 | _module_show=(\
126 | "${module_name}" \
127 | "${#_module_commands[@]}" \
128 | "${author}" \
129 | "${contact}" \
130 | "${description}" \
131 | )
132 |
133 | # shellcheck disable=SC2034
134 | export _module_opts=(\
135 | "$_module_help")
136 |
137 | return $_STATE
138 |
139 | }
140 |
--------------------------------------------------------------------------------
/data/modules/nse_other-network.mod:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # shellcheck shell=bash
4 |
5 | # ``````````````````````````````````````````````````````````````````````````````
6 | # Function name: nse_other-network()
7 | #
8 | # Description:
9 | # NSE Other Network Module.
10 | #
11 | # Usage:
12 | # nse_other-network
13 | #
14 | # Examples:
15 | # nse_other-network
16 | #
17 |
18 | function nse_other-network() {
19 |
20 | # shellcheck disable=SC2034
21 | local _FUNCTION_ID="nse_other-network"
22 | local _STATE=0
23 |
24 | # User variables:
25 | # - module_name: store module name
26 | # - module_args: store module arguments
27 |
28 | export _module_show=
29 | export _module_help=
30 | export _module_opts=
31 | export _module_commands=
32 |
33 | # shellcheck disable=SC2034
34 | _module_variables=()
35 |
36 | # shellcheck disable=SC2034
37 | author="trimstray"
38 | contact="trimstray@gmail.com"
39 | description="NSE Other Network Module"
40 |
41 | # shellcheck disable=SC2034,SC2154
42 | _module_cfg="${_modules}/${module_name}.cfg"
43 |
44 | touch "$_module_cfg"
45 |
46 | # shellcheck disable=SC2034,SC2154
47 | _module_help=$(printf "%s: \\e[1;32m%s\\e[m" "
48 | Module" "${module_name}")
49 |
50 | _module_help+=$(printf "%s" "
51 |
52 | Description
53 | -----------
54 |
55 | NSE Other Network Module.
56 |
57 | Commands
58 | --------
59 |
60 | help display module or NSE help
61 | show display module or profile info
62 | config show module configuration
63 | set set module variable value
64 | use reuse module (changed env)
65 | pushd |init|show|flush command line commands stack
66 | search search key in all commands
67 | init [--args] run profile
68 |
69 | Options:
70 |
71 | key value
72 | profile alias or id
73 |
74 | ")
75 |
76 | # shellcheck disable=SC2154
77 | if [[ "$_mstate" -eq 0 ]] ; then
78 |
79 | if [[ -e "$_module_cfg" ]] && [[ -s "$_module_cfg" ]] ; then
80 |
81 | # shellcheck disable=SC1090
82 | source "$_module_cfg"
83 |
84 | else
85 |
86 | # shellcheck disable=SC2034
87 | _module_variables=()
88 |
89 | if [[ "${#_module_variables[@]}" -ne 0 ]] ; then
90 |
91 | printf "_module_variables=(\"%s\")\\n" "${_module_variables[@]}" > "$_module_cfg"
92 |
93 | fi
94 |
95 | _mstate=1
96 |
97 | fi
98 |
99 | else
100 |
101 | # shellcheck disable=SC1090
102 | source "$_module_cfg"
103 |
104 | fi
105 |
106 | # In the given commands you can use variables from the CLI config
107 | # command or the etc/main.cfg file.
108 |
109 | # shellcheck disable=SC2034
110 | _module_commands=(\
111 | #
112 | "https://nmap.org/nsedoc/scripts/address-info.html;\
113 | ;address-info;--script=address-info" \
114 | #
115 | "https://nmap.org/nsedoc/scripts/firewall-bypass.html;\
116 | ;firewall-bypass;--script=firewall-bypass;\
117 | \"firewall-bypass.helper=ftp\",\"firewall-bypass.targetport\",\
118 | \"firewall-bypass.helperport\"" \
119 | #
120 | "https://nmap.org/nsedoc/scripts/ip-forwarding.html;\
121 | ;ip-forwarding;--script=ip-forwarding;\
122 | \"ip-forwarding.target\"" \
123 | #
124 | "https://nmap.org/nsedoc/scripts/ip-geolocation-geoplugin.html;\
125 | ;ip-geolocation-geoplugin;--script=ip-geolocation-geoplugin" \
126 | #
127 | "https://nmap.org/nsedoc/scripts/ip-geolocation-ipinfodb.html;\
128 | ;ip-geolocation-ipinfodb;--script=ip-geolocation-ipinfodb;\
129 | \"ip-geolocation-ipinfodb.apikey\"" \
130 | #
131 | "https://nmap.org/nsedoc/scripts/ip-geolocation-map-bing.html;\
132 | ;ip-geolocation-map-bing;--script=ip-geolocation-map-bing;\
133 | \"ip-geolocation-map-bing.format\",\"ip-geolocation-map-bing.size\",\
134 | \"ip-geolocation-map-bing.marker_style\",\"ip-geolocation-map-bing.map_path\",\
135 | \"ip-geolocation-map-bing.language=en\",\"ip-geolocation-map-bing.layer=Road\",\
136 | \"ip-geolocation-map-bing.api_key\",\"ip-geolocation-map-bing.center\"" \
137 | #
138 | "https://nmap.org/nsedoc/scripts/ip-geolocation-map-google.html;\
139 | ;ip-geolocation-map-google;--script=ip-geolocation-map-google;\
140 | \"ip-geolocation-map-google.layer=roadmap\",\"ip-geolocation-map-google.map_path\",\
141 | \"ip-geolocation-map-google.format=png\",\"ip-geolocation-map-google.api_key\",\
142 | \"ip-geolocation-map-google.scale=1\",\"ip-geolocation-map-google.marker_style\",\
143 | \"ip-geolocation-map-google.center\",\"ip-geolocation-map-google.size=640x480\",\
144 | \"ip-geolocation-map-google.language=en\"" \
145 | #
146 | "https://nmap.org/nsedoc/scripts/ip-geolocation-map-kml.html;\
147 | ;ip-geolocation-map-kml;--script=ip-geolocation-map-kml;\
148 | \"ip-geolocation-map-kml.map_path\"" \
149 | #
150 | "https://nmap.org/nsedoc/scripts/ip-geolocation-maxmind.html;\
151 | ;ip-geolocation-maxmind;--script=ip-geolocation-maxmind;\
152 | \"maxmind_db\"" \
153 | #
154 | "https://nmap.org/nsedoc/scripts/ip-https-discover.html;\
155 | ;ip-https-discover;--script=ip-https-discover" \
156 | #
157 | "https://nmap.org/nsedoc/scripts/ipv6-multicast-mld-list.html;\
158 | ;ipv6-multicast-mld-list;--script=ipv6-multicast-mld-list;\
159 | \"ipv6-multicast-mld-list.timeout=10s\",\"ipv6-multicast-mld-list.interface\"" \
160 | #
161 | "https://nmap.org/nsedoc/scripts/ipv6-node-info.html;\
162 | ;ipv6-node-info;--script=ipv6-node-info" \
163 | #
164 | "https://nmap.org/nsedoc/scripts/ipv6-ra-flood.html;\
165 | ;ipv6-ra-flood;--script=ipv6-ra-flood;\
166 | \"ipv6-ra-flood.interface\",\"ipv6-ra-flood.timeout=30s\"" \
167 | #
168 | "https://nmap.org/nsedoc/scripts/mrinfo.html;\
169 | ;mrinfo;--script=mrinfo;\
170 | \"mrinfo.target=224.0.0.1\",\"mrinfo.timeout=5s\"" \
171 | #
172 | "https://nmap.org/nsedoc/scripts/mtrace.html;\
173 | ;mtrace;--script=mtrace;\
174 | \"mtrace.fromip\",\"mtrace.group=0.0.0.0\",\
175 | \"mtrace.timeout=7s\",\"mtrace.firsthop=224.0.0.2\",\
176 | \"mtrace.toip\"" \
177 | #
178 | "https://nmap.org/nsedoc/scripts/nat-pmp-info.html;\
179 | ;nat-pmp-info;--script=nat-pmp-info" \
180 | #
181 | "https://nmap.org/nsedoc/scripts/nat-pmp-mapport.html;\
182 | ;nat-pmp-mapport;--script=nat-pmp-mapport;\
183 | \"nat-pmp-mapport.op\",\"nat-pmp-mapport.protocol\",\
184 | \"nat-pmp-mapport.privport\",\"nat-pmp-mapport.pubport\",\
185 | \"nat-pmp-mapport.lifetime=3600s\"" \
186 | #
187 | "https://nmap.org/nsedoc/scripts/nbstat.html;\
188 | ;nbstat;--script=nbstat" \
189 | #
190 | "https://nmap.org/nsedoc/scripts/nping-brute.html;\
191 | ;nping-brute;--script=nping-brute" \
192 | #
193 | "https://nmap.org/nsedoc/scripts/path-mtu.html;\
194 | ;path-mtu;--script=path-mtu" \
195 | #
196 | "https://nmap.org/nsedoc/scripts/pptp-version.html;\
197 | ;pptp-version;--script=pptp-version" \
198 | #
199 | "https://nmap.org/nsedoc/scripts/qscan.html;\
200 | ;qscan;--script=qscan;\
201 | \"numclosed=1\",\"numopen=8\",\"confidence\",\"numtrips\",\
202 | \"delay=200ms\"" \
203 | #
204 | "https://nmap.org/nsedoc/scripts/reverse-index.html;\
205 | ;reverse-index;--script=reverse-index;\
206 | \"reverse-index.mode=horizontal\",\"reverse-index.names\"" \
207 | #
208 | "https://nmap.org/nsedoc/scripts/sniffer-detect.html;\
209 | ;sniffer-detect;--script=sniffer-detect" \
210 | #
211 | "https://nmap.org/nsedoc/scripts/stun-info.html;\
212 | ;stun-info;--script=stun-info" \
213 | #
214 | "https://nmap.org/nsedoc/scripts/stun-version.html;\
215 | ;stun-version;--script=stun-version" \
216 | #
217 | "https://nmap.org/nsedoc/scripts/targets-asn.html;\
218 | ;targets-asn;--script=targets-asn;\
219 | \"targets-asn.whois_port=43\",\"targets-asn.whois_server=asn.shadowserver.org\",\
220 | \"targets-asn.asn\"" \
221 | #
222 | "https://nmap.org/nsedoc/scripts/targets-ipv6-map4to6.html;\
223 | ;targets-ipv6-map4to6;--script=targets-ipv6-map4to6;\
224 | \"targets-ipv6-map4to6.IPv4Hosts\",\"targets-ipv6-subnet\"" \
225 | #
226 | "https://nmap.org/nsedoc/scripts/targets-ipv6-multicast-echo.html;\
227 | ;targets-ipv6-multicast-echo;--script=targets-ipv6-multicast-echo;\
228 | \"targets-ipv6-multicast-echo.interface\"" \
229 | #
230 | "https://nmap.org/nsedoc/scripts/targets-ipv6-multicast-invalid-dst.html;\
231 | ;targets-ipv6-multicast-invalid-dst;--script=targets-ipv6-multicast-invalid-dst;\
232 | \"targets-ipv6-multicast-invalid-dst.interface\"" \
233 | #
234 | "https://nmap.org/nsedoc/scripts/targets-ipv6-multicast-mld.html;\
235 | ;targets-ipv6-multicast-mld;--script=targets-ipv6-multicast-mld;\
236 | \"targets-ipv6-multicast-mld.interface\",\"targets-ipv6-multicast-mld.timeout=10s\"" \
237 | #
238 | "https://nmap.org/nsedoc/scripts/targets-ipv6-multicast-slaac.html;\
239 | ;targets-ipv6-multicast-slaac;--script=targets-ipv6-multicast-slaac;\
240 | \"targets-ipv6-multicast-slaac.interface\"" \
241 | #
242 | "https://nmap.org/nsedoc/scripts/targets-ipv6-wordlist.html;\
243 | ;targets-ipv6-wordlist;--script=targets-ipv6-wordlist;\
244 | \"targets-ipv6-wordlist.nsegments\",\"targets-ipv6-wordlist.fillright\",\"
245 | \"targets-ipv6-subnet\",\"targets-ipv6-wordlist.wordlist=nselib/data/targets-ipv6-wordlist\"" \
246 | #
247 | "https://nmap.org/nsedoc/scripts/targets-sniffer.html;\
248 | ;targets-sniffer;--script=targets-sniffer;\
249 | \"targets-sniffer.iface\",\"targets-sniffer.timeout=10s\"" \
250 | #
251 | "https://nmap.org/nsedoc/scripts/targets-traceroute.html;\
252 | ;targets-traceroute;--script=targets-traceroute" \
253 | #
254 | "https://nmap.org/nsedoc/scripts/targets-xml.html;\
255 | ;targets-xml;--script=targets-xml;\
256 | \"targets-xml.iX\",\"targets-xml.state=up\"" \
257 | #
258 | "https://nmap.org/nsedoc/scripts/tor-consensus-checker.html;\
259 | ;tor-consensus-checker;--script=tor-consensus-checker" \
260 | #
261 | "https://nmap.org/nsedoc/scripts/traceroute-geolocation.html;\
262 | ;traceroute-geolocation;--script=traceroute-geolocation;\
263 | \"traceroute-geolocation.kmlfile\"" \
264 | )
265 |
266 | # shellcheck disable=SC2034,SC2154
267 | _module_show=(\
268 | "${module_name}" \
269 | "${#_module_commands[@]}" \
270 | "${author}" \
271 | "${contact}" \
272 | "${description}" \
273 | )
274 |
275 | # shellcheck disable=SC2034
276 | export _module_opts=(\
277 | "$_module_help")
278 |
279 | return $_STATE
280 |
281 | }
282 |
--------------------------------------------------------------------------------
/data/modules/nse_other-services.mod:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # shellcheck shell=bash
4 |
5 | # ``````````````````````````````````````````````````````````````````````````````
6 | # Function name: nse_other-services()
7 | #
8 | # Description:
9 | # NSE Other Services Module.
10 | #
11 | # Usage:
12 | # nse_other-services
13 | #
14 | # Examples:
15 | # nse_other-services
16 | #
17 |
18 | function nse_other-services() {
19 |
20 | # shellcheck disable=SC2034
21 | local _FUNCTION_ID="nse_other-services"
22 | local _STATE=0
23 |
24 | # User variables:
25 | # - module_name: store module name
26 | # - module_args: store module arguments
27 |
28 | export _module_show=
29 | export _module_help=
30 | export _module_opts=
31 | export _module_commands=
32 |
33 | # shellcheck disable=SC2034
34 | _module_variables=()
35 |
36 | # shellcheck disable=SC2034
37 | author="trimstray"
38 | contact="trimstray@gmail.com"
39 | description="NSE Other Services Module"
40 |
41 | # shellcheck disable=SC2034,SC2154
42 | _module_cfg="${_modules}/${module_name}.cfg"
43 |
44 | touch "$_module_cfg"
45 |
46 | # shellcheck disable=SC2034,SC2154
47 | _module_help=$(printf "%s: \\e[1;32m%s\\e[m" "
48 | Module" "${module_name}")
49 |
50 | _module_help+=$(printf "%s" "
51 |
52 | Description
53 | -----------
54 |
55 | NSE Other Services Module.
56 |
57 | Commands
58 | --------
59 |
60 | help display module or NSE help
61 | show display module or profile info
62 | config show module configuration
63 | set set module variable value
64 | use reuse module (changed env)
65 | pushd |init|show|flush command line commands stack
66 | search search key in all commands
67 | init [--args] run profile
68 |
69 | Options:
70 |
71 | key value
72 | profile alias or id
73 |
74 | ")
75 |
76 | # shellcheck disable=SC2154
77 | if [[ "$_mstate" -eq 0 ]] ; then
78 |
79 | if [[ -e "$_module_cfg" ]] && [[ -s "$_module_cfg" ]] ; then
80 |
81 | # shellcheck disable=SC1090
82 | source "$_module_cfg"
83 |
84 | else
85 |
86 | # shellcheck disable=SC2034
87 | _module_variables=()
88 |
89 | if [[ "${#_module_variables[@]}" -ne 0 ]] ; then
90 |
91 | printf "_module_variables=(\"%s\")\\n" "${_module_variables[@]}" > "$_module_cfg"
92 |
93 | fi
94 |
95 | _mstate=1
96 |
97 | fi
98 |
99 | else
100 |
101 | # shellcheck disable=SC1090
102 | source "$_module_cfg"
103 |
104 | fi
105 |
106 | # In the given commands you can use variables from the CLI config
107 | # command or the etc/main.cfg file.
108 |
109 | # shellcheck disable=SC2034
110 | _module_commands=(\
111 | #
112 | "https://nmap.org/nsedoc/scripts/amqp-info.html;\
113 | ;amqp-info;--script=amqp-info" \
114 | #
115 | "https://nmap.org/nsedoc/scripts/auth-owners.html;\
116 | ;auth-owners;--script=auth-owners" \
117 | #
118 | "https://nmap.org/nsedoc/scripts/auth-spoof.html;\
119 | ;auth-spoof;--script=auth-spoof" \
120 | #
121 | "https://nmap.org/nsedoc/scripts/bittorrent-discovery.html;\
122 | ;bittorrent-discovery;--script=bittorrent-discovery;\
123 | \"bittorrent-discovery.include-nodes\",\"bittorrent-discovery.timeout=30s\",\
124 | \"bittorrent-discovery.magnet\",\"bittorrent-discovery.torrent\"" \
125 | #
126 | "https://nmap.org/nsedoc/scripts/cassandra-brute.html;\
127 | ;cassandra-brute;--script=cassandra-brute" \
128 | #
129 | "https://nmap.org/nsedoc/scripts/cassandra-info.html;\
130 | ;cassandra-info;--script=cassandra-info" \
131 | #
132 | "https://nmap.org/nsedoc/scripts/clamav-exec.html;\
133 | ;clamav-exec;--script=clamav-exec;\
134 | \"clamav-exec.scandb\",\"clamav-exec.cmd\"" \
135 | #
136 | "https://nmap.org/nsedoc/scripts/cups-info.html;\
137 | ;cups-info;--script=cups-info" \
138 | #
139 | "https://nmap.org/nsedoc/scripts/cups-queue-info.html;\
140 | ;cups-queue-info;--script=cups-queue-info" \
141 | #
142 | "https://nmap.org/nsedoc/scripts/cvs-brute-repository.html;\
143 | ;cvs-brute-repository;--script=cvs-brute-repository;\
144 | \"cvs-brute-repository.repofile\",\"cvs-brute-repository.nodefault\"" \
145 | #
146 | "https://nmap.org/nsedoc/scripts/cvs-brute.html;\
147 | ;cvs-brute;--script=cvs-brute;\
148 | \"cvs-brute.repo\"" \
149 | #
150 | "https://nmap.org/nsedoc/scripts/daytime.html;\
151 | ;daytime;--script=daytime" \
152 | #
153 | "https://nmap.org/nsedoc/scripts/docker-version.html;\
154 | ;docker-version;--script=docker-version" \
155 | #
156 | "https://nmap.org/nsedoc/scripts/hddtemp-info.html;\
157 | ;hddtemp-info;--script=hddtemp-info" \
158 | #
159 | "https://nmap.org/nsedoc/scripts/ike-version.html;\
160 | ;ike-version;--script=ike-version" \
161 | #
162 | "https://nmap.org/nsedoc/scripts/ipmi-brute.html;\
163 | ;ipmi-brute;--script=ipmi-brute" \
164 | #
165 | "https://nmap.org/nsedoc/scripts/ipmi-cipher-zero.html;\
166 | ;ipmi-cipher-zero;--script=ipmi-cipher-zero" \
167 | #
168 | "https://nmap.org/nsedoc/scripts/ipmi-version.html;\
169 | ;ipmi-version;--script=ipmi-version" \
170 | #
171 | "https://nmap.org/nsedoc/scripts/iscsi-brute.html;\
172 | ;iscsi-brute;--script=iscsi-brute;\
173 | \"iscsi-brute.target\"" \
174 | #
175 | "https://nmap.org/nsedoc/scripts/iscsi-info.html;\
176 | ;iscsi-info;--script=iscsi-info" \
177 | #
178 | "https://nmap.org/nsedoc/scripts/ldap-brute.html;\
179 | ;ldap-brute;--script=ldap-brute;\
180 | \"ldap.upnsuffix\",\"ldap.saveprefix\",\"ldap.savetype\",\
181 | \"ldap.base\"" \
182 | #
183 | "https://nmap.org/nsedoc/scripts/ldap-novell-getpass.html;\
184 | ;ldap-novell-getpass;--script=ldap-novell-getpass;\
185 | \"ldap-novell-getpass.password\",\"ldap-novell-getpass.account\",\
186 | \"ldap-novell-getpass.username\"" \
187 | #
188 | "https://nmap.org/nsedoc/scripts/ldap-rootdse.html;\
189 | ;ldap-rootdse;--script=ldap-rootdse" \
190 | #
191 | "https://nmap.org/nsedoc/scripts/ldap-search.html;\
192 | ;ldap-search;--script=ldap-search;\
193 | \"ldap.searchattrib\",\"ldap.maxobjects=20\",\"ldap.qfilter\",\
194 | \"ldap.attrib\",\"ldap.searchvalue=*\",\"ldap.password\",\
195 | \"ldap.savesearch\",\"ldap.username\",\"ldap.base\"" \
196 | #
197 | "https://nmap.org/nsedoc/scripts/memcached-info.html;\
198 | ;memcached-info;--script=memcached-info" \
199 | #
200 | "https://nmap.org/nsedoc/scripts/nfs-ls.html;\
201 | ;nfs-ls;--script=nfs-ls;\
202 | \"nfs-ls.time=m\",\"nfs.version\"" \
203 | #
204 | "https://nmap.org/nsedoc/scripts/nfs-showmount.html;\
205 | ;nfs-showmount;--script=nfs-showmount" \
206 | #
207 | "https://nmap.org/nsedoc/scripts/nfs-statfs.html;\
208 | ;nfs-statfs;--script=nfs-statfs;\
209 | \"nfs-statfs.human\"" \
210 | #
211 | "https://nmap.org/nsedoc/scripts/nntp-ntlm-info.html;\
212 | ;nntp-ntlm-info;--script=nntp-ntlm-info" \
213 | #
214 | "https://nmap.org/nsedoc/scripts/nrpe-enum.html;\
215 | ;nrpe-enum;--script=nrpe-enum;\
216 | \"nrpe-enum.cmds\"" \
217 | #
218 | "https://nmap.org/nsedoc/scripts/ntp-info.html;\
219 | ;ntp-info;--script=ntp-info" \
220 | #
221 | "https://nmap.org/nsedoc/scripts/ntp-monlist.html;\
222 | ;ntp-monlist;--script=ntp-monlist" \
223 | #
224 | "https://nmap.org/nsedoc/scripts/puppet-naivesigning.html;\
225 | ;puppet-naivesigning;--script=puppet-naivesigning;\
226 | \"puppet-naivesigning.env=production\",\"puppet-naivesigning.csr\",\
227 | \"puppet-naivesigning.node=agentzero.localdomain\"" \
228 | #
229 | "https://nmap.org/nsedoc/scripts/redis-brute.html;\
230 | ;redis-brute;--script=redis-brute" \
231 | #
232 | "https://nmap.org/nsedoc/scripts/redis-info.html;\
233 | ;redis-info;--script=redis-info" \
234 | #
235 | "https://nmap.org/nsedoc/scripts/rexec-brute.html;\
236 | ;rexec-brute;--script=rexec-brute;\
237 | \"rexec-brute.timeout=10s\"" \
238 | #
239 | "https://nmap.org/nsedoc/scripts/riak-http-info.html;\
240 | ;riak-http-info;--script=riak-http-info" \
241 | #
242 | "https://nmap.org/nsedoc/scripts/rpc-grind.html;\
243 | ;rpc-grind;--script=rpc-grind;\
244 | \"rpc-grind.threads=4\"" \
245 | #
246 | "https://nmap.org/nsedoc/scripts/rpcinfo.html;\
247 | ;rpcinfo;--script=rpcinfo" \
248 | #
249 | "https://nmap.org/nsedoc/scripts/rsync-brute.html;\
250 | ;rsync-brute;--script=rsync-brute;\
251 | \"rsync-brute.module\"" \
252 | #
253 | "https://nmap.org/nsedoc/scripts/rsync-list-modules.html;\
254 | ;rsync-list-modules;--script=rsync-list-modules" \
255 | #
256 | "https://nmap.org/nsedoc/scripts/rtsp-methods.html;\
257 | ;rtsp-methods;--script=rtsp-methods;\
258 | \"rtsp-methods.path=*\"" \
259 | #
260 | "https://nmap.org/nsedoc/scripts/rtsp-url-brute.html;\
261 | ;rtsp-url-brute;--script=rtsp-url-brute;\
262 | \"rtsp-url-brute.urlfile\",\"rtsp-url-brute.threads\"" \
263 | #
264 | "https://nmap.org/nsedoc/scripts/rusers.html;\
265 | ;rusers;--script=rusers" \
266 | #
267 | "https://nmap.org/nsedoc/scripts/sip-brute.html;\
268 | ;sip-brute;--script=sip-brute" \
269 | #
270 | "https://nmap.org/nsedoc/scripts/sip-call-spoof.html;\
271 | ;sip-call-spoof;--script=sip-call-spoof;\
272 | \"sip-call-spoof.from=Home\",\"sip-call-spoof.extension=100\",\
273 | \"sip-call-spoof.ua=Ekiga\",\"sip-call-spoof.timeout=5s\",\
274 | \"sip-call-spoof.src\"" \
275 | #
276 | "https://nmap.org/nsedoc/scripts/sip-enum-users.html;\
277 | ;sip-enum-users;--script=sip-enum-users;\
278 | \"sip-enum-users.users\",\"sip-enum-users.minext=0\",\
279 | \"sip-enum-users.userslist=nselib/data/usernames.lst\",\
280 | \"sip-enum-users.padding=0\",\"sip-enum-users.maxext=999\"" \
281 | #
282 | "https://nmap.org/nsedoc/scripts/sip-methods.html;\
283 | ;sip-methods;--script=sip-methods" \
284 | #
285 | "https://nmap.org/nsedoc/scripts/skypev2-version.html;\
286 | ;skypev2-version;--script=skypev2-version" \
287 | #
288 | "https://nmap.org/nsedoc/scripts/supermicro-ipmi-conf.html;\
289 | ;supermicro-ipmi-conf;--script=supermicro-ipmi-conf;\
290 | \"supermicro-ipmi-conf.out=_bmc.conf\"" \
291 | #
292 | "https://nmap.org/nsedoc/scripts/svn-brute.html;\
293 | ;svn-brute;--script=svn-brute;\
294 | \"svn-brute.repo\",\"svn-brute.force\"" \
295 | #
296 | "https://nmap.org/nsedoc/scripts/upnp-info.html;\
297 | ;upnp-info;--script=upnp-info;\
298 | \"upnp-info.override=true\"" \
299 | #
300 | "https://nmap.org/nsedoc/scripts/vmauthd-brute.html;\
301 | ;vmauthd-brute;--script=vmauthd-brute" \
302 | #
303 | "https://nmap.org/nsedoc/scripts/vmware-version.html;\
304 | ;vmware-version;--script=vmware-version" \
305 | )
306 |
307 | # shellcheck disable=SC2034,SC2154
308 | _module_show=(\
309 | "${module_name}" \
310 | "${#_module_commands[@]}" \
311 | "${author}" \
312 | "${contact}" \
313 | "${description}" \
314 | )
315 |
316 | # shellcheck disable=SC2034
317 | export _module_opts=(\
318 | "$_module_help")
319 |
320 | return $_STATE
321 |
322 | }
323 |
--------------------------------------------------------------------------------
/data/modules/nse_other-version.mod:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # shellcheck shell=bash
4 |
5 | # ``````````````````````````````````````````````````````````````````````````````
6 | # Function name: nse_other-version()
7 | #
8 | # Description:
9 | # NSE Other Version Module.
10 | #
11 | # Usage:
12 | # nse_other-version
13 | #
14 | # Examples:
15 | # nse_other-version
16 | #
17 |
18 | function nse_other-version() {
19 |
20 | # shellcheck disable=SC2034
21 | local _FUNCTION_ID="nse_other-version"
22 | local _STATE=0
23 |
24 | # User variables:
25 | # - module_name: store module name
26 | # - module_args: store module arguments
27 |
28 | export _module_show=
29 | export _module_help=
30 | export _module_opts=
31 | export _module_commands=
32 |
33 | # shellcheck disable=SC2034
34 | _module_variables=()
35 |
36 | # shellcheck disable=SC2034
37 | author="trimstray"
38 | contact="trimstray@gmail.com"
39 | description="NSE Other Version Module"
40 |
41 | # shellcheck disable=SC2034,SC2154
42 | _module_cfg="${_modules}/${module_name}.cfg"
43 |
44 | touch "$_module_cfg"
45 |
46 | # shellcheck disable=SC2034,SC2154
47 | _module_help=$(printf "%s: \\e[1;32m%s\\e[m" "
48 | Module" "${module_name}")
49 |
50 | _module_help+=$(printf "%s" "
51 |
52 | Description
53 | -----------
54 |
55 | NSE Other Version Module.
56 |
57 | Commands
58 | --------
59 |
60 | help display module or NSE help
61 | show display module or profile info
62 | config show module configuration
63 | set set module variable value
64 | use reuse module (changed env)
65 | pushd |init|show|flush command line commands stack
66 | search search key in all commands
67 | init [--args] run profile
68 |
69 | Options:
70 |
71 | key value
72 | profile alias or id
73 |
74 | ")
75 |
76 | # shellcheck disable=SC2154
77 | if [[ "$_mstate" -eq 0 ]] ; then
78 |
79 | if [[ -e "$_module_cfg" ]] && [[ -s "$_module_cfg" ]] ; then
80 |
81 | # shellcheck disable=SC1090
82 | source "$_module_cfg"
83 |
84 | else
85 |
86 | # shellcheck disable=SC2034
87 | _module_variables=()
88 |
89 | if [[ "${#_module_variables[@]}" -ne 0 ]] ; then
90 |
91 | printf "_module_variables=(\"%s\")\\n" "${_module_variables[@]}" > "$_module_cfg"
92 |
93 | fi
94 |
95 | _mstate=1
96 |
97 | fi
98 |
99 | else
100 |
101 | # shellcheck disable=SC1090
102 | source "$_module_cfg"
103 |
104 | fi
105 |
106 | # In the given commands you can use variables from the CLI config
107 | # command or the etc/main.cfg file.
108 |
109 | # shellcheck disable=SC2034
110 | _module_commands=(\
111 | #
112 | "https://nmap.org/nsedoc/scripts/fingerprint-strings.html;\
113 | ;fingerprint-strings;--script=fingerprint-strings;\
114 | \"fingerprint-strings.n=4\"" \
115 | )
116 |
117 | # shellcheck disable=SC2034,SC2154
118 | _module_show=(\
119 | "${module_name}" \
120 | "${#_module_commands[@]}" \
121 | "${author}" \
122 | "${contact}" \
123 | "${description}" \
124 | )
125 |
126 | # shellcheck disable=SC2034
127 | export _module_opts=(\
128 | "$_module_help")
129 |
130 | return $_STATE
131 |
132 | }
133 |
--------------------------------------------------------------------------------
/data/modules/nse_remote-access.mod:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # shellcheck shell=bash
4 |
5 | # ``````````````````````````````````````````````````````````````````````````````
6 | # Function name: nse_remote-access()
7 | #
8 | # Description:
9 | # NSE Remote Access Module.
10 | #
11 | # Usage:
12 | # nse_remote-access
13 | #
14 | # Examples:
15 | # nse_remote-access
16 | #
17 |
18 | function nse_remote-access() {
19 |
20 | # shellcheck disable=SC2034
21 | local _FUNCTION_ID="nse_remote-access"
22 | local _STATE=0
23 |
24 | # User variables:
25 | # - module_name: store module name
26 | # - module_args: store module arguments
27 |
28 | export _module_show=
29 | export _module_help=
30 | export _module_opts=
31 | export _module_commands=
32 |
33 | # shellcheck disable=SC2034
34 | _module_variables=()
35 |
36 | # shellcheck disable=SC2034
37 | author="trimstray"
38 | contact="trimstray@gmail.com"
39 | description="NSE Remote Access Module"
40 |
41 | # shellcheck disable=SC2034,SC2154
42 | _module_cfg="${_modules}/${module_name}.cfg"
43 |
44 | touch "$_module_cfg"
45 |
46 | # shellcheck disable=SC2034,SC2154
47 | _module_help=$(printf "%s: \\e[1;32m%s\\e[m" "
48 | Module" "${module_name}")
49 |
50 | _module_help+=$(printf "%s" "
51 |
52 | Description
53 | -----------
54 |
55 | NSE Remote Access Module.
56 |
57 | Commands
58 | --------
59 |
60 | help display module or NSE help
61 | show display module or profile info
62 | config show module configuration
63 | set set module variable value
64 | use reuse module (changed env)
65 | pushd |init|show|flush command line commands stack
66 | search search key in all commands
67 | init [--args] run profile
68 |
69 | Options:
70 |
71 | key value
72 | profile alias or id
73 |
74 | ")
75 |
76 | # shellcheck disable=SC2154
77 | if [[ "$_mstate" -eq 0 ]] ; then
78 |
79 | if [[ -e "$_module_cfg" ]] && [[ -s "$_module_cfg" ]] ; then
80 |
81 | # shellcheck disable=SC1090
82 | source "$_module_cfg"
83 |
84 | else
85 |
86 | # shellcheck disable=SC2034
87 | _module_variables=()
88 |
89 | if [[ "${#_module_variables[@]}" -ne 0 ]] ; then
90 |
91 | printf "_module_variables=(\"%s\")\\n" "${_module_variables[@]}" > "$_module_cfg"
92 |
93 | fi
94 |
95 | _mstate=1
96 |
97 | fi
98 |
99 | else
100 |
101 | # shellcheck disable=SC1090
102 | source "$_module_cfg"
103 |
104 | fi
105 |
106 | # In the given commands you can use variables from the CLI config
107 | # command or the etc/main.cfg file.
108 |
109 | # shellcheck disable=SC2034
110 | _module_commands=(\
111 | #
112 | "https://nmap.org/nsedoc/scripts/rdp-enum-encryption.html;\
113 | ;rdp-enum-encryption;--script=rdp-enum-encryption" \
114 | #
115 | "https://nmap.org/nsedoc/scripts/rdp-vuln-ms12-020.html;\
116 | ;rdp-vuln-ms12-020;--script=rdp-vuln-ms12-020" \
117 | #
118 | "https://nmap.org/nsedoc/scripts/realvnc-auth-bypass.html;\
119 | ;realvnc-auth-bypass;--script=realvnc-auth-bypass" \
120 | #
121 | "https://nmap.org/nsedoc/scripts/ssh-auth-methods.html;\
122 | ;ssh-auth-methods;--script=ssh-auth-methods" \
123 | #
124 | "https://nmap.org/nsedoc/scripts/ssh-brute.html;\
125 | ;ssh-brute;--script=ssh-brute;\
126 | \"ssh-brute.timeout=5s\"" \
127 | #
128 | "https://nmap.org/nsedoc/scripts/ssh-hostkey.html;\
129 | ;ssh-hostkey;--script=ssh-hostkey;\
130 | \"ssh-hostkey.known-hosts\",\"ssh-hostkey.known-hosts-path\"" \
131 | #
132 | "https://nmap.org/nsedoc/scripts/ssh-publickey-acceptance.html;\
133 | ;ssh-publickey-acceptance;--script=ssh-publickey-acceptance;\
134 | \"knownbad\",\"ssh.privatekeys\",\"publickeydb\",\
135 | \"ssh.usernames\",\"ssh.publickeys\",\"ssh.passphrases\"" \
136 | #
137 | "https://nmap.org/nsedoc/scripts/ssh-run.html;\
138 | ;ssh-run;--script=ssh-run;\
139 | \"ssh-run.username\",\"ssh-run.cmd\",\"ssh-run.password\",\
140 | \"ssh-run.privatekey\",\"ssh-run.passphrase\"" \
141 | #
142 | "https://nmap.org/nsedoc/scripts/ssh2-enum-algos.html;\
143 | ;ssh2-enum-algos;--script=ssh2-enum-algos" \
144 | #
145 | "https://nmap.org/nsedoc/scripts/sshv1.html;\
146 | ;sshv1;--script=sshv1" \
147 | #
148 | "https://nmap.org/nsedoc/scripts/telnet-brute.html;\
149 | ;telnet-brute;--script=telnet-brute;\
150 | \"telnet-brute.autosize=true\",\"telnet-brute.timeout=5s\"" \
151 | #
152 | "https://nmap.org/nsedoc/scripts/telnet-encryption.html;\
153 | ;telnet-encryption;--script=telnet-encryption" \
154 | #
155 | "https://nmap.org/nsedoc/scripts/telnet-ntlm-info.html;\
156 | ;telnet-ntlm-info;--script=telnet-ntlm-info" \
157 | #
158 | "https://nmap.org/nsedoc/scripts/vnc-brute.html;\
159 | ;vnc-brute;--script=vnc-brute;\
160 | \"vnc-brute.bruteusers=false\"" \
161 | #
162 | "https://nmap.org/nsedoc/scripts/vnc-info.html;\
163 | ;vnc-info;--script=vnc-info" \
164 | #
165 | "https://nmap.org/nsedoc/scripts/vnc-title.html;\
166 | ;vnc-title;--script=vnc-title" \
167 | )
168 |
169 | # shellcheck disable=SC2034,SC2154
170 | _module_show=(\
171 | "${module_name}" \
172 | "${#_module_commands[@]}" \
173 | "${author}" \
174 | "${contact}" \
175 | "${description}" \
176 | )
177 |
178 | # shellcheck disable=SC2034
179 | export _module_opts=(\
180 | "$_module_help")
181 |
182 | return $_STATE
183 |
184 | }
185 |
--------------------------------------------------------------------------------
/data/modules/nse_smb-vuln.mod:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # shellcheck shell=bash
4 |
5 | # ``````````````````````````````````````````````````````````````````````````````
6 | # Function name: nse_smb-vuln()
7 | #
8 | # Description:
9 | # NSE SMB Protocol Vulnerability Module.
10 | #
11 | # Usage:
12 | # nse_smb-vuln
13 | #
14 | # Examples:
15 | # nse_smb-vuln
16 | #
17 |
18 | function nse_smb-vuln() {
19 |
20 | # shellcheck disable=SC2034
21 | local _FUNCTION_ID="nse_smb-vuln"
22 | local _STATE=0
23 |
24 | # User variables:
25 | # - module_name: store module name
26 | # - module_args: store module arguments
27 |
28 | export _module_show=
29 | export _module_help=
30 | export _module_opts=
31 | export _module_commands=
32 |
33 | # shellcheck disable=SC2034
34 | _module_variables=()
35 |
36 | # shellcheck disable=SC2034
37 | author="trimstray"
38 | contact="trimstray@gmail.com"
39 | description="NSE SMB Protocol Vulnerability Module"
40 |
41 | # shellcheck disable=SC2034,SC2154
42 | _module_cfg="${_modules}/${module_name}.cfg"
43 |
44 | touch "$_module_cfg"
45 |
46 | # shellcheck disable=SC2034,SC2154
47 | _module_help=$(printf "%s: \\e[1;32m%s\\e[m" "
48 | Module" "${module_name}")
49 |
50 | _module_help+=$(printf "%s" "
51 |
52 | Description
53 | -----------
54 |
55 | NSE SMB Protocol Vulnerability Module.
56 |
57 | Commands
58 | --------
59 |
60 | help display module or NSE help
61 | show display module or profile info
62 | config show module configuration
63 | set set module variable value
64 | use reuse module (changed env)
65 | pushd |init|show|flush command line commands stack
66 | search search key in all commands
67 | init [--args] run profile
68 |
69 | Options:
70 |
71 | key value
72 | profile alias or id
73 |
74 | ")
75 |
76 | # shellcheck disable=SC2154
77 | if [[ "$_mstate" -eq 0 ]] ; then
78 |
79 | if [[ -e "$_module_cfg" ]] && [[ -s "$_module_cfg" ]] ; then
80 |
81 | # shellcheck disable=SC1090
82 | source "$_module_cfg"
83 |
84 | else
85 |
86 | # shellcheck disable=SC2034
87 | _module_variables=()
88 |
89 | if [[ "${#_module_variables[@]}" -ne 0 ]] ; then
90 |
91 | printf "_module_variables=(\"%s\")\\n" "${_module_variables[@]}" > "$_module_cfg"
92 |
93 | fi
94 |
95 | _mstate=1
96 |
97 | fi
98 |
99 | else
100 |
101 | # shellcheck disable=SC1090
102 | source "$_module_cfg"
103 |
104 | fi
105 |
106 | # In the given commands you can use variables from the CLI config
107 | # command or the etc/main.cfg file.
108 |
109 | # shellcheck disable=SC2034
110 | _module_commands=(\
111 | #
112 | "https://nmap.org/nsedoc/scripts/samba-vuln-cve-2012-1182.html;\
113 | ;samba-vuln-cve-2012-1182;--script=samba-vuln-cve-2012-1182" \
114 | #
115 | "https://nmap.org/nsedoc/scripts/smb-vuln-conficker.html;\
116 | ;smb-vuln-conficker;--script=smb-vuln-conficker" \
117 | #
118 | "https://nmap.org/nsedoc/scripts/smb-vuln-cve-2017-7494.html;\
119 | ;smb-vuln-cve-2017-7494;--script=smb-vuln-cve-2017-7494;\
120 | \"smb-vuln-cve-2017-7494.check-version=false\"" \
121 | #
122 | "https://nmap.org/nsedoc/scripts/smb-vuln-cve2009-3103.html;\
123 | ;smb-vuln-cve2009-3103;--script=smb-vuln-cve2009-3103" \
124 | #
125 | "https://nmap.org/nsedoc/scripts/smb-vuln-ms06-025.html;\
126 | ;smb-vuln-ms06-025;--script=smb-vuln-ms06-025" \
127 | #
128 | "https://nmap.org/nsedoc/scripts/smb-vuln-ms07-029.html;\
129 | ;smb-vuln-ms07-029;--script=smb-vuln-ms07-029" \
130 | #
131 | "https://nmap.org/nsedoc/scripts/smb-vuln-ms08-067.html;\
132 | ;smb-vuln-ms08-067;--script=smb-vuln-ms08-067" \
133 | #
134 | "https://nmap.org/nsedoc/scripts/smb-vuln-ms10-054.html;\
135 | ;smb-vuln-ms10-054;--script=smb-vuln-ms10-054;\
136 | \"smb-vuln-ms10-054.share=ShareDocs\",\"unsafe\"" \
137 | #
138 | "https://nmap.org/nsedoc/scripts/smb-vuln-ms10-061.html;\
139 | ;smb-vuln-ms10-061;--script=smb-vuln-ms10-061;\
140 | \"printer\"" \
141 | #
142 | "https://nmap.org/nsedoc/scripts/smb-vuln-ms17-010.html;\
143 | ;smb-vuln-ms17-010;--script=smb-vuln-ms17-010;\
144 | \"smb-vuln-ms17-010.sharename=IPC$\"" \
145 | #
146 | "https://nmap.org/nsedoc/scripts/smb-vuln-regsvc-dos.html;\
147 | ;smb-vuln-regsvc-dos;--script=smb-vuln-regsvc-dos" \
148 | )
149 |
150 | # shellcheck disable=SC2034,SC2154
151 | _module_show=(\
152 | "${module_name}" \
153 | "${#_module_commands[@]}" \
154 | "${author}" \
155 | "${contact}" \
156 | "${description}" \
157 | )
158 |
159 | # shellcheck disable=SC2034
160 | export _module_opts=(\
161 | "$_module_help")
162 |
163 | return $_STATE
164 |
165 | }
166 |
--------------------------------------------------------------------------------
/data/modules/nse_smb.mod:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # shellcheck shell=bash
4 |
5 | # ``````````````````````````````````````````````````````````````````````````````
6 | # Function name: nse_smb()
7 | #
8 | # Description:
9 | # NSE SMB Protocol Module.
10 | #
11 | # Usage:
12 | # nse_smb
13 | #
14 | # Examples:
15 | # nse_smb
16 | #
17 |
18 | function nse_smb() {
19 |
20 | # shellcheck disable=SC2034
21 | local _FUNCTION_ID="nse_smb"
22 | local _STATE=0
23 |
24 | # User variables:
25 | # - module_name: store module name
26 | # - module_args: store module arguments
27 |
28 | export _module_show=
29 | export _module_help=
30 | export _module_opts=
31 | export _module_commands=
32 |
33 | # shellcheck disable=SC2034
34 | _module_variables=()
35 |
36 | # shellcheck disable=SC2034
37 | author="trimstray"
38 | contact="trimstray@gmail.com"
39 | description="NSE SMB Protocol Module"
40 |
41 | # shellcheck disable=SC2034,SC2154
42 | _module_cfg="${_modules}/${module_name}.cfg"
43 |
44 | touch "$_module_cfg"
45 |
46 | # shellcheck disable=SC2034,SC2154
47 | _module_help=$(printf "%s: \\e[1;32m%s\\e[m" "
48 | Module" "${module_name}")
49 |
50 | _module_help+=$(printf "%s" "
51 |
52 | Description
53 | -----------
54 |
55 | NSE SMB Protocol Module.
56 |
57 | Commands
58 | --------
59 |
60 | help display module or NSE help
61 | show display module or profile info
62 | config show module configuration
63 | set set module variable value
64 | use reuse module (changed env)
65 | pushd |init|show|flush command line commands stack
66 | search search key in all commands
67 | init [--args] run profile
68 |
69 | Options:
70 |
71 | key value
72 | profile alias or id
73 |
74 | ")
75 |
76 | # shellcheck disable=SC2154
77 | if [[ "$_mstate" -eq 0 ]] ; then
78 |
79 | if [[ -e "$_module_cfg" ]] && [[ -s "$_module_cfg" ]] ; then
80 |
81 | # shellcheck disable=SC1090
82 | source "$_module_cfg"
83 |
84 | else
85 |
86 | # shellcheck disable=SC2034
87 | _module_variables=()
88 |
89 | if [[ "${#_module_variables[@]}" -ne 0 ]] ; then
90 |
91 | printf "_module_variables=(\"%s\")\\n" "${_module_variables[@]}" > "$_module_cfg"
92 |
93 | fi
94 |
95 | _mstate=1
96 |
97 | fi
98 |
99 | else
100 |
101 | # shellcheck disable=SC1090
102 | source "$_module_cfg"
103 |
104 | fi
105 |
106 | # In the given commands you can use variables from the CLI config
107 | # command or the etc/main.cfg file.
108 |
109 | # shellcheck disable=SC2034
110 | _module_commands=(\
111 | #
112 | "https://nmap.org/nsedoc/scripts/smb-brute.html;\
113 | ;smb-brute;--script=smb-brute;\
114 | \"smblockout\",\"canaries=3\",\"brutelimit=5000\"" \
115 | #
116 | "https://nmap.org/nsedoc/scripts/smb-double-pulsar-backdoor.html;\
117 | ;smb-double-pulsar-backdoor;--script=smb-double-pulsar-backdoor" \
118 | #
119 | "https://nmap.org/nsedoc/scripts/smb-enum-domains.html;\
120 | ;smb-enum-domains;--script=smb-enum-domains" \
121 | #
122 | "https://nmap.org/nsedoc/scripts/smb-enum-groups.html;\
123 | ;smb-enum-groups;--script=smb-enum-groups" \
124 | #
125 | "https://nmap.org/nsedoc/scripts/smb-enum-processes.html;\
126 | ;smb-enum-processes;--script=smb-enum-processes" \
127 | #
128 | "https://nmap.org/nsedoc/scripts/smb-enum-services.html;\
129 | ;smb-enum-services;--script=smb-enum-services" \
130 | #
131 | "https://nmap.org/nsedoc/scripts/smb-enum-sessions.html;\
132 | ;smb-enum-sessions;--script=smb-enum-sessions" \
133 | #
134 | "https://nmap.org/nsedoc/scripts/smb-enum-shares.html;\
135 | ;smb-enum-shares;--script=smb-enum-shares" \
136 | #
137 | "https://nmap.org/nsedoc/scripts/smb-enum-users.html;\
138 | ;smb-enum-users;--script=smb-enum-users;\
139 | \"samronly\",\"lsaonly\"" \
140 | #
141 | "https://nmap.org/nsedoc/scripts/smb-flood.html;\
142 | ;smb-flood;--script=smb-flood" \
143 | #
144 | "https://nmap.org/nsedoc/scripts/smb-ls.html;\
145 | ;smb-ls;--script=smb-ls;\
146 | \"smb-ls.path=/\",\"smb-ls.pattern=*\",\"smb-ls.share(s)\",\
147 | \"smb-ls.checksum=false\"" \
148 | #
149 | "https://nmap.org/nsedoc/scripts/smb-mbenum.html;\
150 | ;smb-mbenum;--script=smb-mbenum;\
151 | \"smb-mbenum.format=3\",\"smb-mbenum.domain\",\
152 | \"smb-mbenum.filter\"" \
153 | #
154 | "https://nmap.org/nsedoc/scripts/smb-os-discovery.html;\
155 | ;smb-os-discovery;--script=smb-os-discovery" \
156 | #
157 | "https://nmap.org/nsedoc/scripts/smb-print-text.html;\
158 | ;smb-print-text;--script=smb-print-text;\
159 | \"text\",\"filename\",\"printer\"" \
160 | #
161 | "https://nmap.org/nsedoc/scripts/smb-protocols.html;\
162 | ;smb-protocols;--script=smb-protocols" \
163 | #
164 | "https://nmap.org/nsedoc/scripts/smb-psexec.html;\
165 | ;smb-psexec;--script=smb-psexec;\
166 | \"nohide\",\"cleanup\",\"nocipher\",\"sharepath\",\
167 | \"config\",\"time=15s\",\"nocleanup\",\"key\",\"share\"" \
168 | #
169 | "https://nmap.org/nsedoc/scripts/smb-security-mode.html;\
170 | ;smb-security-mode;--script=smb-security-mode" \
171 | #
172 | "https://nmap.org/nsedoc/scripts/smb-server-stats.html;\
173 | ;smb-server-stats;--script=smb-server-stats" \
174 | #
175 | "https://nmap.org/nsedoc/scripts/smb-system-info.html;\
176 | ;smb-system-info;--script=smb-system-info" \
177 | #
178 | "https://nmap.org/nsedoc/scripts/smb2-capabilities.html;\
179 | ;smb2-capabilities;--script=smb2-capabilities" \
180 | #
181 | "https://nmap.org/nsedoc/scripts/smb2-security-mode.html;\
182 | ;smb2-security-mode;--script=smb2-security-mode" \
183 | #
184 | "https://nmap.org/nsedoc/scripts/smb2-time.html;\
185 | ;smb2-time;--script=smb2-time" \
186 | #
187 | "https://nmap.org/nsedoc/scripts/smb2-vuln-uptime.html;\
188 | ;smb2-vuln-uptime;--script=smb2-vuln-uptime;\
189 | \"smb2-vuln-uptime.skip-os\"" \
190 | )
191 |
192 | # shellcheck disable=SC2034,SC2154
193 | _module_show=(\
194 | "${module_name}" \
195 | "${#_module_commands[@]}" \
196 | "${author}" \
197 | "${contact}" \
198 | "${description}" \
199 | )
200 |
201 | # shellcheck disable=SC2034
202 | export _module_opts=(\
203 | "$_module_help")
204 |
205 | return $_STATE
206 |
207 | }
208 |
--------------------------------------------------------------------------------
/data/modules/nse_snmp.mod:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # shellcheck shell=bash
4 |
5 | # ``````````````````````````````````````````````````````````````````````````````
6 | # Function name: nse_snmp()
7 | #
8 | # Description:
9 | # NSE SNMP Protocol Module.
10 | #
11 | # Usage:
12 | # nse_snmp
13 | #
14 | # Examples:
15 | # nse_snmp
16 | #
17 |
18 | function nse_snmp() {
19 |
20 | # shellcheck disable=SC2034
21 | local _FUNCTION_ID="nse_snmp"
22 | local _STATE=0
23 |
24 | # User variables:
25 | # - module_name: store module name
26 | # - module_args: store module arguments
27 |
28 | export _module_show=
29 | export _module_help=
30 | export _module_opts=
31 | export _module_commands=
32 |
33 | # shellcheck disable=SC2034
34 | _module_variables=()
35 |
36 | # shellcheck disable=SC2034
37 | author="trimstray"
38 | contact="trimstray@gmail.com"
39 | description="NSE SNMP Protocol Module"
40 |
41 | # shellcheck disable=SC2034,SC2154
42 | _module_cfg="${_modules}/${module_name}.cfg"
43 |
44 | touch "$_module_cfg"
45 |
46 | # shellcheck disable=SC2034,SC2154
47 | _module_help=$(printf "%s: \\e[1;32m%s\\e[m" "
48 | Module" "${module_name}")
49 |
50 | _module_help+=$(printf "%s" "
51 |
52 | Description
53 | -----------
54 |
55 | NSE SNMP Protocol Module.
56 |
57 | Commands
58 | --------
59 |
60 | help display module or NSE help
61 | show display module or profile info
62 | config show module configuration
63 | set set module variable value
64 | use reuse module (changed env)
65 | pushd |init|show|flush command line commands stack
66 | search search key in all commands
67 | init [--args] run profile
68 |
69 | Options:
70 |
71 | key value
72 | profile alias or id
73 |
74 | ")
75 |
76 | # shellcheck disable=SC2154
77 | if [[ "$_mstate" -eq 0 ]] ; then
78 |
79 | if [[ -e "$_module_cfg" ]] && [[ -s "$_module_cfg" ]] ; then
80 |
81 | # shellcheck disable=SC1090
82 | source "$_module_cfg"
83 |
84 | else
85 |
86 | # shellcheck disable=SC2034
87 | _module_variables=()
88 |
89 | if [[ "${#_module_variables[@]}" -ne 0 ]] ; then
90 |
91 | printf "_module_variables=(\"%s\")\\n" "${_module_variables[@]}" > "$_module_cfg"
92 |
93 | fi
94 |
95 | _mstate=1
96 |
97 | fi
98 |
99 | else
100 |
101 | # shellcheck disable=SC1090
102 | source "$_module_cfg"
103 |
104 | fi
105 |
106 | # In the given commands you can use variables from the CLI config
107 | # command or the etc/main.cfg file.
108 |
109 | # shellcheck disable=SC2034
110 | _module_commands=(\
111 | #
112 | "https://nmap.org/nsedoc/scripts/snmp-brute.html;\
113 | ;snmp-brute;--script=snmp-brute;\
114 | \"snmp-brute.communitiesdb\"" \
115 | #
116 | "https://nmap.org/nsedoc/scripts/snmp-hh3c-logins.html;\
117 | ;snmp-hh3c-logins;--script=snmp-hh3c-logins" \
118 | #
119 | "https://nmap.org/nsedoc/scripts/snmp-info.html;\
120 | ;snmp-info;--script=snmp-info" \
121 | #
122 | "https://nmap.org/nsedoc/scripts/snmp-interfaces.html;\
123 | ;snmp-interfaces;--script=snmp-interfaces;\
124 | \"snmp-interfaces.host\",\"snmp-interfaces.port=161\"" \
125 | #
126 | "https://nmap.org/nsedoc/scripts/snmp-ios-config.html;\
127 | ;snmp-ios-config;--script=snmp-ios-config;\
128 | \"snmp-ios-config.tftproot\"" \
129 | #
130 | "https://nmap.org/nsedoc/scripts/snmp-netstat.html;\
131 | ;snmp-netstat;--script=snmp-netstat" \
132 | #
133 | "https://nmap.org/nsedoc/scripts/snmp-processes.html;\
134 | ;snmp-processes;--script=snmp-processes" \
135 | #
136 | "https://nmap.org/nsedoc/scripts/snmp-sysdescr.html;\
137 | ;snmp-sysdescr;--script=snmp-sysdescr" \
138 | #
139 | "https://nmap.org/nsedoc/scripts/snmp-win32-services.html;\
140 | ;snmp-win32-services;--script=snmp-win32-services" \
141 | #
142 | "https://nmap.org/nsedoc/scripts/snmp-win32-shares.html;\
143 | ;snmp-win32-shares;--script=snmp-win32-shares" \
144 | #
145 | "https://nmap.org/nsedoc/scripts/snmp-win32-software.html;\
146 | ;snmp-win32-software;--script=snmp-win32-software" \
147 | #
148 | "https://nmap.org/nsedoc/scripts/snmp-win32-users.html;\
149 | ;snmp-win32-users;--script=snmp-win32-users" \
150 | )
151 |
152 | # shellcheck disable=SC2034,SC2154
153 | _module_show=(\
154 | "${module_name}" \
155 | "${#_module_commands[@]}" \
156 | "${author}" \
157 | "${contact}" \
158 | "${description}" \
159 | )
160 |
161 | # shellcheck disable=SC2034
162 | export _module_opts=(\
163 | "$_module_help")
164 |
165 | return $_STATE
166 |
167 | }
168 |
--------------------------------------------------------------------------------
/data/modules/nse_socks.mod:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # shellcheck shell=bash
4 |
5 | # ``````````````````````````````````````````````````````````````````````````````
6 | # Function name: nse_socks()
7 | #
8 | # Description:
9 | # NSE SOCKS Module.
10 | #
11 | # Usage:
12 | # nse_socks
13 | #
14 | # Examples:
15 | # nse_socks
16 | #
17 |
18 | function nse_socks() {
19 |
20 | # shellcheck disable=SC2034
21 | local _FUNCTION_ID="nse_socks"
22 | local _STATE=0
23 |
24 | # User variables:
25 | # - module_name: store module name
26 | # - module_args: store module arguments
27 |
28 | export _module_show=
29 | export _module_help=
30 | export _module_opts=
31 | export _module_commands=
32 |
33 | # shellcheck disable=SC2034
34 | _module_variables=()
35 |
36 | # shellcheck disable=SC2034
37 | author="trimstray"
38 | contact="trimstray@gmail.com"
39 | description="NSE SOCKS Module"
40 |
41 | # shellcheck disable=SC2034,SC2154
42 | _module_cfg="${_modules}/${module_name}.cfg"
43 |
44 | touch "$_module_cfg"
45 |
46 | # shellcheck disable=SC2034,SC2154
47 | _module_help=$(printf "%s: \\e[1;32m%s\\e[m" "
48 | Module" "${module_name}")
49 |
50 | _module_help+=$(printf "%s" "
51 |
52 | Description
53 | -----------
54 |
55 | NSE SOCKS Module.
56 |
57 | Commands
58 | --------
59 |
60 | help display module or NSE help
61 | show display module or profile info
62 | config show module configuration
63 | set set module variable value
64 | use reuse module (changed env)
65 | pushd |init|show|flush command line commands stack
66 | search search key in all commands
67 | init [--args] run profile
68 |
69 | Options:
70 |
71 | key value
72 | profile alias or id
73 |
74 | ")
75 |
76 | # shellcheck disable=SC2154
77 | if [[ "$_mstate" -eq 0 ]] ; then
78 |
79 | if [[ -e "$_module_cfg" ]] && [[ -s "$_module_cfg" ]] ; then
80 |
81 | # shellcheck disable=SC1090
82 | source "$_module_cfg"
83 |
84 | else
85 |
86 | # shellcheck disable=SC2034
87 | _module_variables=()
88 |
89 | if [[ "${#_module_variables[@]}" -ne 0 ]] ; then
90 |
91 | printf "_module_variables=(\"%s\")\\n" "${_module_variables[@]}" > "$_module_cfg"
92 |
93 | fi
94 |
95 | _mstate=1
96 |
97 | fi
98 |
99 | else
100 |
101 | # shellcheck disable=SC1090
102 | source "$_module_cfg"
103 |
104 | fi
105 |
106 | # In the given commands you can use variables from the CLI config
107 | # command or the etc/main.cfg file.
108 |
109 | # shellcheck disable=SC2034
110 | _module_commands=(\
111 | #
112 | "https://nmap.org/nsedoc/scripts/socks-auth-info.html;\
113 | ;socks-auth-info;--script=socks-auth-info" \
114 | #
115 | "https://nmap.org/nsedoc/scripts/socks-brute.html;\
116 | ;socks-brute;--script=socks-brute" \
117 | #
118 | "https://nmap.org/nsedoc/scripts/socks-open-proxy.html;\
119 | ;socks-open-proxy;--script=socks-open-proxy" \
120 | )
121 |
122 | # shellcheck disable=SC2034,SC2154
123 | _module_show=(\
124 | "${module_name}" \
125 | "${#_module_commands[@]}" \
126 | "${author}" \
127 | "${contact}" \
128 | "${description}" \
129 | )
130 |
131 | # shellcheck disable=SC2034
132 | export _module_opts=(\
133 | "$_module_help")
134 |
135 | return $_STATE
136 |
137 | }
138 |
--------------------------------------------------------------------------------
/data/modules/nse_ssl.mod:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # shellcheck shell=bash
4 |
5 | # ``````````````````````````````````````````````````````````````````````````````
6 | # Function name: nse_ssl()
7 | #
8 | # Description:
9 | # NSE SSL Protocol Module.
10 | #
11 | # Usage:
12 | # nse_ssl
13 | #
14 | # Examples:
15 | # nse_ssl
16 | #
17 |
18 | function nse_ssl() {
19 |
20 | # shellcheck disable=SC2034
21 | local _FUNCTION_ID="nse_ssl"
22 | local _STATE=0
23 |
24 | # User variables:
25 | # - module_name: store module name
26 | # - module_args: store module arguments
27 |
28 | export _module_show=
29 | export _module_help=
30 | export _module_opts=
31 | export _module_commands=
32 |
33 | # shellcheck disable=SC2034
34 | _module_variables=()
35 |
36 | # shellcheck disable=SC2034
37 | author="trimstray"
38 | contact="trimstray@gmail.com"
39 | description="NSE SSL Protocol Module"
40 |
41 | # shellcheck disable=SC2034,SC2154
42 | _module_cfg="${_modules}/${module_name}.cfg"
43 |
44 | touch "$_module_cfg"
45 |
46 | # shellcheck disable=SC2034,SC2154
47 | _module_help=$(printf "%s: \\e[1;32m%s\\e[m" "
48 | Module" "${module_name}")
49 |
50 | _module_help+=$(printf "%s" "
51 |
52 | Description
53 | -----------
54 |
55 | NSE SSL Protocol Module.
56 |
57 | Commands
58 | --------
59 |
60 | help display module or NSE help
61 | show display module or profile info
62 | config show module configuration
63 | set set module variable value
64 | use reuse module (changed env)
65 | pushd |init|show|flush command line commands stack
66 | search search key in all commands
67 | init [--args] run profile
68 |
69 | Options:
70 |
71 | key value
72 | profile alias or id
73 |
74 | ")
75 |
76 | # shellcheck disable=SC2154
77 | if [[ "$_mstate" -eq 0 ]] ; then
78 |
79 | if [[ -e "$_module_cfg" ]] && [[ -s "$_module_cfg" ]] ; then
80 |
81 | # shellcheck disable=SC1090
82 | source "$_module_cfg"
83 |
84 | else
85 |
86 | # shellcheck disable=SC2034
87 | _module_variables=()
88 |
89 | if [[ "${#_module_variables[@]}" -ne 0 ]] ; then
90 |
91 | printf "_module_variables=(\"%s\")\\n" "${_module_variables[@]}" > "$_module_cfg"
92 |
93 | fi
94 |
95 | _mstate=1
96 |
97 | fi
98 |
99 | else
100 |
101 | # shellcheck disable=SC1090
102 | source "$_module_cfg"
103 |
104 | fi
105 |
106 | # In the given commands you can use variables from the CLI config
107 | # command or the etc/main.cfg file.
108 |
109 | # shellcheck disable=SC2034
110 | _module_commands=(\
111 | #
112 | "https://nmap.org/nsedoc/scripts/rsa-vuln-roca.html;\
113 | ;rsa-vuln-roca;--script=rsa-vuln-roca" \
114 | #
115 | "https://nmap.org/nsedoc/scripts/ssl-ccs-injection.html;\
116 | ;ssl-ccs-injection;--script=ssl-ccs-injection" \
117 | #
118 | "https://nmap.org/nsedoc/scripts/ssl-cert-intaddr.html;\
119 | ;ssl-cert-intaddr;--script=ssl-cert-intaddr" \
120 | #
121 | "https://nmap.org/nsedoc/scripts/ssl-cert.html;\
122 | ;ssl-cert;--script=ssl-cert" \
123 | #
124 | "https://nmap.org/nsedoc/scripts/ssl-date.html;\
125 | ;ssl-date;--script=ssl-date" \
126 | #
127 | "https://nmap.org/nsedoc/scripts/ssl-dh-params.html;\
128 | ;ssl-dh-params;--script=ssl-dh-params" \
129 | #
130 | "https://nmap.org/nsedoc/scripts/ssl-enum-ciphers.html;\
131 | ;ssl-enum-ciphers;--script=ssl-enum-ciphers" \
132 | #
133 | "https://nmap.org/nsedoc/scripts/ssl-heartbleed.html;\
134 | ;ssl-heartbleed;--script=ssl-heartbleed;\
135 | \"ssl-heartbleed.protocols\"" \
136 | #
137 | "https://nmap.org/nsedoc/scripts/ssl-known-key.html;\
138 | ;ssl-known-key;--script=ssl-known-key;\
139 | \"ssl-known-key.fingerprintfile\"" \
140 | #
141 | "https://nmap.org/nsedoc/scripts/ssl-poodle.html;\
142 | ;ssl-poodle;--script=ssl-poodle" \
143 | #
144 | "https://nmap.org/nsedoc/scripts/sslv2-drown.html;\
145 | ;sslv2-drown;--script=sslv2-drown" \
146 | #
147 | "https://nmap.org/nsedoc/scripts/sslv2.html;\
148 | ;sslv2;--script=sslv2" \
149 | #
150 | "https://nmap.org/nsedoc/scripts/sstp-discover.html;\
151 | ;sstp-discover;--script=sstp-discover" \
152 | #
153 | "https://nmap.org/nsedoc/scripts/tls-alpn.html;\
154 | ;tls-alpn;--script=tls-alpn" \
155 | #
156 | "https://nmap.org/nsedoc/scripts/tls-nextprotoneg.html;\
157 | ;tls-nextprotoneg;--script=tls-nextprotoneg" \
158 | #
159 | "https://nmap.org/nsedoc/scripts/tls-ticketbleed.html;\
160 | ;tls-ticketbleed;--script=tls-ticketbleed;\
161 | \"tls-ticketbleed.protocols\"" \
162 | )
163 |
164 | # shellcheck disable=SC2034,SC2154
165 | _module_show=(\
166 | "${module_name}" \
167 | "${#_module_commands[@]}" \
168 | "${author}" \
169 | "${contact}" \
170 | "${description}" \
171 | )
172 |
173 | # shellcheck disable=SC2034
174 | export _module_opts=(\
175 | "$_module_help")
176 |
177 | return $_STATE
178 |
179 | }
180 |
--------------------------------------------------------------------------------
/data/modules/nse_vuln-scanners.mod:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # shellcheck shell=bash
4 |
5 | # ``````````````````````````````````````````````````````````````````````````````
6 | # Function name: nse_vuln-scanners()
7 | #
8 | # Description:
9 | # NSE Vulnerability Scanners Module.
10 | #
11 | # Usage:
12 | # nse_vuln-scanners
13 | #
14 | # Examples:
15 | # nse_vuln-scanners
16 | #
17 |
18 | function nse_vuln-scanners() {
19 |
20 | # shellcheck disable=SC2034
21 | local _FUNCTION_ID="nse_vuln-scanners"
22 | local _STATE=0
23 |
24 | # User variables:
25 | # - module_name: store module name
26 | # - module_args: store module arguments
27 |
28 | export _module_show=
29 | export _module_help=
30 | export _module_opts=
31 | export _module_commands=
32 |
33 | # shellcheck disable=SC2034
34 | _module_variables=()
35 |
36 | # shellcheck disable=SC2034
37 | author="trimstray"
38 | contact="trimstray@gmail.com"
39 | description="NSE Vulnerability Scanners Module"
40 |
41 | # shellcheck disable=SC2034,SC2154
42 | _module_cfg="${_modules}/${module_name}.cfg"
43 |
44 | touch "$_module_cfg"
45 |
46 | # shellcheck disable=SC2034,SC2154
47 | _module_help=$(printf "%s: \\e[1;32m%s\\e[m" "
48 | Module" "${module_name}")
49 |
50 | _module_help+=$(printf "%s" "
51 |
52 | Description
53 | -----------
54 |
55 | NSE Vulnerability Scanners Module.
56 |
57 | Commands
58 | --------
59 |
60 | help display module or NSE help
61 | show display module or profile info
62 | config show module configuration
63 | set set module variable value
64 | use reuse module (changed env)
65 | pushd |init|show|flush command line commands stack
66 | search search key in all commands
67 | init [--args] run profile
68 |
69 | Options:
70 |
71 | key value
72 | profile alias or id
73 |
74 | ")
75 |
76 | # shellcheck disable=SC2154
77 | if [[ "$_mstate" -eq 0 ]] ; then
78 |
79 | if [[ -e "$_module_cfg" ]] && [[ -s "$_module_cfg" ]] ; then
80 |
81 | # shellcheck disable=SC1090
82 | source "$_module_cfg"
83 |
84 | else
85 |
86 | # shellcheck disable=SC2034
87 | _module_variables=()
88 |
89 | if [[ "${#_module_variables[@]}" -ne 0 ]] ; then
90 |
91 | printf "_module_variables=(\"%s\")\\n" "${_module_variables[@]}" > "$_module_cfg"
92 |
93 | fi
94 |
95 | _mstate=1
96 |
97 | fi
98 |
99 | else
100 |
101 | # shellcheck disable=SC1090
102 | source "$_module_cfg"
103 |
104 | fi
105 |
106 | # In the given commands you can use variables from the CLI config
107 | # command or the etc/main.cfg file.
108 |
109 | # shellcheck disable=SC2034
110 | _module_commands=(\
111 | #
112 | "https://nmap.org/nsedoc/scripts/nessus-brute.html;\
113 | ;nessus-brute;--script=nessus-brute" \
114 | #
115 | "https://nmap.org/nsedoc/scripts/nessus-xmlrpc-brute.html;\
116 | ;nessus-xmlrpc-brute;--script=nessus-xmlrpc-brute;\
117 | \"nessus-xmlrpc-brute.timeout=5s\",\"nessus-xmlrpc-brute.threads\"" \
118 | #
119 | "https://nmap.org/nsedoc/scripts/nexpose-brute.html;\
120 | ;nexpose-brute;--script=nexpose-brute" \
121 | #
122 | "https://nmap.org/nsedoc/scripts/omp2-brute.html;\
123 | ;omp2-brute;--script=omp2-brute" \
124 | #
125 | "https://nmap.org/nsedoc/scripts/omp2-enum-targets.html;\
126 | ;omp2-enum-targets;--script=omp2-enum-targets" \
127 | #
128 | "https://nmap.org/nsedoc/scripts/openvas-otp-brute.html;\
129 | ;openvas-otp-brute;--script=openvas-otp-brute;\
130 | \"openvas-otp-brute.threads=4\"" \
131 | #
132 | "https://nmap.org/nsedoc/scripts/shodan-api.html;\
133 | ;shodan-api;--script=shodan-api;\
134 | \"shodan-api.target\",\"shodan-api.apikey\",\"shodan-api.outfile\"" \
135 | )
136 |
137 | # shellcheck disable=SC2034,SC2154
138 | _module_show=(\
139 | "${module_name}" \
140 | "${#_module_commands[@]}" \
141 | "${author}" \
142 | "${contact}" \
143 | "${description}" \
144 | )
145 |
146 | # shellcheck disable=SC2034
147 | export _module_opts=(\
148 | "$_module_help")
149 |
150 | return $_STATE
151 |
152 | }
153 |
--------------------------------------------------------------------------------
/data/modules/nse_whois.mod:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # shellcheck shell=bash
4 |
5 | # ``````````````````````````````````````````````````````````````````````````````
6 | # Function name: nse_whois()
7 | #
8 | # Description:
9 | # NSE Whois Database Module.
10 | #
11 | # Usage:
12 | # nse_whois
13 | #
14 | # Examples:
15 | # nse_whois
16 | #
17 |
18 | function nse_whois() {
19 |
20 | # shellcheck disable=SC2034
21 | local _FUNCTION_ID="nse_whois"
22 | local _STATE=0
23 |
24 | # User variables:
25 | # - module_name: store module name
26 | # - module_args: store module arguments
27 |
28 | export _module_show=
29 | export _module_help=
30 | export _module_opts=
31 | export _module_commands=
32 |
33 | # shellcheck disable=SC2034
34 | _module_variables=()
35 |
36 | # shellcheck disable=SC2034
37 | author="trimstray"
38 | contact="trimstray@gmail.com"
39 | description="NSE Whois Database Module"
40 |
41 | # shellcheck disable=SC2034,SC2154
42 | _module_cfg="${_modules}/${module_name}.cfg"
43 |
44 | touch "$_module_cfg"
45 |
46 | # shellcheck disable=SC2034,SC2154
47 | _module_help=$(printf "%s: \\e[1;32m%s\\e[m" "
48 | Module" "${module_name}")
49 |
50 | _module_help+=$(printf "%s" "
51 |
52 | Description
53 | -----------
54 |
55 | NSE Whois Database Module.
56 |
57 | Commands
58 | --------
59 |
60 | help display module or NSE help
61 | show