diff options
author | Nataliia Solomko <natalirs1985@gmail.com> | 2024-09-09 15:11:13 +0300 |
---|---|---|
committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2024-09-10 13:15:55 +0000 |
commit | 6032223ef5f06b46f101d740f381ddf24f5a9996 (patch) | |
tree | a40d96da7eb23e0f7583af126c83ee4224253361 /op-mode-definitions/execute-port-scan.xml.in | |
parent | 256fb8974bed38352c893dc9a048d9956feb925a (diff) | |
download | vyos-1x-6032223ef5f06b46f101d740f381ddf24f5a9996.tar.gz vyos-1x-6032223ef5f06b46f101d740f381ddf24f5a9996.zip |
op_mode: T6181: A feature for checking ports
(cherry picked from commit 7d20a52e02bec76474ca060fcb1eaeca52c52001)
Diffstat (limited to 'op-mode-definitions/execute-port-scan.xml.in')
-rw-r--r-- | op-mode-definitions/execute-port-scan.xml.in | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/op-mode-definitions/execute-port-scan.xml.in b/op-mode-definitions/execute-port-scan.xml.in new file mode 100644 index 000000000..52cdab5f0 --- /dev/null +++ b/op-mode-definitions/execute-port-scan.xml.in @@ -0,0 +1,34 @@ +<?xml version="1.0"?> +<interfaceDefinition> + <node name="execute"> + <children> + <node name="port-scan"> + <properties> + <help>Scan network for open ports</help> + </properties> + <children> + <tagNode name="host"> + <properties> + <help>IP address or domain name of the host to scan (scan all ports 1-65535)</help> + <completionHelp> + <list><hostname> <x.x.x.x> <h:h:h:h:h:h:h:h></list> + </completionHelp> + </properties> + <command>nmap -p- -T4 --max-retries=1 --host-timeout=30s "$4"</command> + <children> + <leafNode name="node.tag"> + <properties> + <help>Port scan options</help> + <completionHelp> + <script>${vyos_op_scripts_dir}/execute_port-scan.py --get-options-nested "${COMP_WORDS[@]}"</script> + </completionHelp> + </properties> + <command>${vyos_op_scripts_dir}/execute_port-scan.py "${@:4}"</command> + </leafNode> + </children> + </tagNode> + </children> + </node> + </children> + </node> +</interfaceDefinition> |