diff options
author | Daniil Baturin <daniil@vyos.io> | 2024-09-10 14:15:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-10 14:15:11 +0100 |
commit | 57291121d680eda37689919611293aceb9a0e259 (patch) | |
tree | 92246e1fd916e56421da5b2b35b7b8033a055122 /op-mode-definitions | |
parent | d739a10ce278c5a2cbc2c7790ed36d0e54c2624e (diff) | |
parent | 7d20a52e02bec76474ca060fcb1eaeca52c52001 (diff) | |
download | vyos-1x-57291121d680eda37689919611293aceb9a0e259.tar.gz vyos-1x-57291121d680eda37689919611293aceb9a0e259.zip |
Merge pull request #4038 from natali-rs1985/T6181-current
op_mode: T6181: A feature for checking ports
Diffstat (limited to 'op-mode-definitions')
-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> |