zsh-workers
 help / color / mirror / code / Atom feed
* completion(nmap): Add `--traceroute` `--script` `-sn` `-sY` `-sZ` `-sM`
@ 2024-07-07  2:42 柳 敏臻
  0 siblings, 0 replies; only message in thread
From: 柳 敏臻 @ 2024-07-07  2:42 UTC (permalink / raw)
  To: zsh-workers


[-- Attachment #1.1: Type: text/plain, Size: 114 bytes --]

Add traceroute and ping only scan since `--traceroute​` is often using with `-sn` and some extra scan options.

[-- Attachment #1.2: Type: text/html, Size: 522 bytes --]

[-- Attachment #2: 0001-Update-nmap-completion.patch --]
[-- Type: application/octet-stream, Size: 2462 bytes --]

From 5540c11c350f935a6741d2ce72556359a18dfbc1 Mon Sep 17 00:00:00 2001
From: marko1616 <marko1616@outlook.com>
Date: Sun, 7 Jul 2024 10:33:20 +0800
Subject: [PATCH] Update nmap completion.

---
 Completion/Unix/Command/_nmap | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Completion/Unix/Command/_nmap b/Completion/Unix/Command/_nmap
index 2a507baa3..cc6719641 100644
--- a/Completion/Unix/Command/_nmap
+++ b/Completion/Unix/Command/_nmap
@@ -5,7 +5,7 @@ local curcontext="$curcontext" state line suf ret=1
 _arguments -C \
   '!-sI:zombie host:_hosts' \
   '!-P'{T,S,U}'+:port list' \
-  '*-s-[specify scan type]:scan type:((S\:TCP\ SYN\ scan T\:TCP\ connect\(\)\ scan F\:stealth\ FIN\ scan X\:stealth\ Xmas\ tree\ scan N\:stealth\ null\ scan P\:ping\ scanning U\:UDP\ scan O\:IP\ protocol\ scan I\:idle\ scan A\:ACK\ scan W\:window\ scan R\:RPC\ scan L\:list\ scan V\:version\ detection))' \
+  '*-s-[specify scan type]:scan type:((S\:TCP\ SYN\ scan T\:TCP\ connect\(\)\ scan F\:stealth\ FIN\ scan X\:stealth\ Xmas\ tree\ scan N\:stealth\ null\ scan P\:ping\ scanning U\:UDP\ scan O\:IP\ protocol\ scan I\:idle\ scan A\:ACK\ scan W\:window\ scan R\:RPC\ scan L\:list\ scan V\:version\ detection Y\:SCTP\ INIT\ scan Z\:SCTP\ COOKIE\ ECHO\ scan M\:TCP\ Maimon\ scan n\:ping\ only\ scan))' \
   '-b[specify ftp relay host]:ftp relay host:_hosts' \
   '*-P-[specify probe types and options]:probe type/options:->probe-opts' \
   '-A[enable OS detection and version scanning]' \
@@ -35,6 +35,7 @@ _arguments -C \
   '-M[specify maximum number of parallel TCP connects]:maximum TCP connects' \
   '--packet-trace[show all packets sent in tcpdump-like format]' \
   '--version-trace[show packets related to version scanning]' \
+  '--traceroute[trace route to target]' \
   '--datadir[specify directory containing data files]:directory:_directories' \
   '-T[specify timing policy]:timing policy:(Paranoid Sneaky Polite Normal Aggressive Insane)' \
   '--host-timeout[specify maximum time for scanning a single host]:timeout (ms)' \
@@ -44,6 +45,7 @@ _arguments -C \
   '--max-parallelism[specify max number of scans to perform in parallel]:number' \
   '--min-parallelism[scan at least specified number of ports in parallel]:number' \
   '--scan-delay[specify minimum amount of time between probes]:delay (ms)' \
+  '--script[NSE options]' \
   '--interactive[go into interactive mode]' \
   '*:host:_hosts' && ret=0
 
-- 
2.45.2.windows.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-07-07  2:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-07  2:42 completion(nmap): Add `--traceroute` `--script` `-sn` `-sY` `-sZ` `-sM` 柳 敏臻

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).