diff options
author | Nataliia Solomko <natalirs1985@gmail.com> | 2024-09-09 15:11:13 +0300 |
---|---|---|
committer | Nataliia Solomko <natalirs1985@gmail.com> | 2024-09-10 10:08:57 +0300 |
commit | 7d20a52e02bec76474ca060fcb1eaeca52c52001 (patch) | |
tree | 2833c9f4bc685d3d5dd8d95505e1227b1386b971 /op-mode-definitions | |
parent | c78c5bd7e65b19e0e50ef6944dc74fb33660ff71 (diff) | |
download | vyos-1x-7d20a52e02bec76474ca060fcb1eaeca52c52001.tar.gz vyos-1x-7d20a52e02bec76474ca060fcb1eaeca52c52001.zip |
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> |