首页 > 其他分享 >测试UDP端口是否开放

测试UDP端口是否开放

时间:2024-04-03 09:55:17浏览次数:19  
标签:UDP Specify source -- 端口 ssl proxy 测试 Ncat

软件下载地址:https://nmap.org/download.html

windows安装后,添加下系统路径

 

命令说明:

>ncat -h
Ncat 7.94 ( https://nmap.org/ncat )
Usage: ncat [options] [hostname] [port]

Options taking a time assume seconds. Append 'ms' for milliseconds,
's' for seconds, 'm' for minutes, or 'h' for hours (e.g. 500ms).
  -4                         Use IPv4 only
  -6                         Use IPv6 only
  -C, --crlf                 Use CRLF for EOL sequence
  -c, --sh-exec <command>    Executes the given command via /bin/sh
  -e, --exec <command>       Executes the given command
      --lua-exec <filename>  Executes the given Lua script
  -g hop1[,hop2,...]         Loose source routing hop points (8 max)
  -G <n>                     Loose source routing hop pointer (4, 8, 12, ...)
  -m, --max-conns <n>        Maximum <n> simultaneous connections
  -h, --help                 Display this help screen
  -d, --delay <time>         Wait between read/writes
  -o, --output <filename>    Dump session data to a file
  -x, --hex-dump <filename>  Dump session data as hex to a file
  -i, --idle-timeout <time>  Idle read/write timeout
  -p, --source-port port     Specify source port to use
  -s, --source addr          Specify source address to use (doesn't affect -l)
  -l, --listen               Bind and listen for incoming connections
  -k, --keep-open            Accept multiple connections in listen mode
  -n, --nodns                Do not resolve hostnames via DNS
  -t, --telnet               Answer Telnet negotiations
  -u, --udp                  Use UDP instead of default TCP
      --sctp                 Use SCTP instead of default TCP
  -v, --verbose              Set verbosity level (can be used several times)
  -w, --wait <time>          Connect timeout
  -z                         Zero-I/O mode, report connection status only
      --append-output        Append rather than clobber specified output files
      --send-only            Only send data, ignoring received; quit on EOF
      --recv-only            Only receive data, never send anything
      --no-shutdown          Continue half-duplex when receiving EOF on stdin
      --allow                Allow only given hosts to connect to Ncat
      --allowfile            A file of hosts allowed to connect to Ncat
      --deny                 Deny given hosts from connecting to Ncat
      --denyfile             A file of hosts denied from connecting to Ncat
      --broker               Enable Ncat's connection brokering mode
      --chat                 Start a simple Ncat chat server
      --proxy <addr[:port]>  Specify address of host to proxy through
      --proxy-type <type>    Specify proxy type ("http", "socks4", "socks5")
      --proxy-auth <auth>    Authenticate with HTTP or SOCKS proxy server
      --proxy-dns <type>     Specify where to resolve proxy destination
      --ssl                  Connect or listen with SSL
      --ssl-cert             Specify SSL certificate file (PEM) for listening
      --ssl-key              Specify SSL private key (PEM) for listening
      --ssl-verify           Verify trust and domain name of certificates
      --ssl-trustfile        PEM file containing trusted SSL certificates
      --ssl-ciphers          Cipherlist containing SSL ciphers to use
      --ssl-servername       Request distinct server name (SNI)
      --ssl-alpn             ALPN protocol list to use
      --version              Display Ncat's version information and exit

See the ncat(1) manpage for full options, descriptions and usage examples

 

测试:

#测试udp端口是否开放
ncat -u -z -v ip port
Ncat: Version 7.94 ( https://nmap.org/ncat )
Ncat: Connected to ip:port.
Ncat: UDP packet sent successfully
Ncat: 1 bytes sent, 0 bytes received in 2.32 seconds.

  

标签:UDP,Specify,source,--,端口,ssl,proxy,测试,Ncat
From: https://www.cnblogs.com/joshua317/p/18112012

相关文章

  • 听说测试“有手就行 ”?华为20年测试老兵干货分享!
    你理解的测试工程师是怎么样的?是不是觉得测试工作很简单呢?测试简单,但也乐趣无穷作为在华为从事大型软件系统测试工作20年的测试老兵,阿钟老师透露,20年前正是因为听信了朋友的一句“测试有手就行”,即使不是科班出身,也自信地加入了华为测试部,从此开始了20年的测试生涯。进入华为......
  • 安全测试工具推荐
     工具名称工具用途工具链接操作指引BurpSuiteBurpSuite是用于攻击web应用程序的集成平台。它包含了许多工具,比如代理抓包等,并为这些工具设计了许多接口,以促进加快攻击应用程序的过程。也就是说,BurpSuite是web应用程序渗透测试集成平台。https:......
  • 推荐一款强大的开源自动化测试神器
    搞过自动化测试的小伙伴,相信都知道,在Web自动化测试中,有一款自动化测试神器工具:selenium。结合标准的WebDriverAPI来编写Python自动化脚本,可以实现解放双手,让脚本代替人工在Web浏览器上完成指定的操作。虽然selenium有完备的文档,但也需要一定的学习成本,对于一个纯小白来讲还是......
  • Open-Sora环境搭建&推理测试
    引子Sora,2024年2月15日,OpenAI发布的人工智能文生视频大模型。支持60秒视频生成,震荡了国内国际学术圈、广告圈、AI教培圈。Sora最主要有三个优点:第一,“60s超长视频”,之前文本生成视频大模型一直无法真正突破AI视频的4秒连贯性瓶颈,而Sora直接做到了60秒连贯视频。第二,单视频既......
  • 【MV】物化视图测试
    物化视图作为Oracle性能调优的一种有效手段值得深入测试和了解,在充分了解和测试物化视图技术的基础上,可以将物化视图技术纳入到数据库架构设计过程中。本文对物化视图的创建以及物化视图的基本知识点进行描述。1.创建测试环境createtablespacesectbsdatafile'E:\oracle\product......
  • 如何获取onvif协议的端口号?
    ONVIF协议本身并没有规定一个固定的端口号。这是因为不同的设备和应用场景可能会有不同的网络配置和需求。因此,ONVIF协议允许设备厂商根据实际情况自行设定端口号。这意味着,在使用ONVIF协议时,我们需要查看设备的文档或配置界面,以确定具体的端口号。一、常见ONVIF端口号虽然ONVI......
  • 验收测试E2E分析方法
    推荐阅读方式默认查看图片方式比较模糊,可以鼠标右键点击图片,采用在新标签页打开,此时可以查看高清大图;前言对于验收测试工程师来说,编写验收测试分析和测试用例是一项必须且重要的工作内容,但大多数同学在做验收测试分析及用例编写时,仍旧陷入到传统的分析及用例编写思维中,与内部......
  • 单元测试和系统测试的区别?
    一、概念:系统测试进行系统测试以检查软件或产品是否满足指定的要求。它由测试人员和开发人员共同完成。它包含系统测试和集成测试。它是通过更多的正面和负面的测试用例来完成的。单元测试单元测试是软件测试级别的类型,其中测试软件的每个单独组件。单元测试通常由开......
  • Shell 编程入门指南:从基础到进阶,轻松掌握 Shell 脚本编程技巧--附有测试题目
    $shell编程setnu显示行号生成随机数RANDOM快速入门文件shell脚本文件第一行特殊格式 #!/bin/bashecho跟输出内容shell脚本执行方式 #方式一sh文件.sh#方式二./文件.sh 相对路径#方式三/root/文件.sh 绝对路径shell的数据类型字符串:建议使......
  • 端口被占用,去终止它吧
    1.打开window+r打开cmd2.netstat-ano|findstr[端口号]//说明:netstat-ano|findstr用于查找进程//例如8558端口被占用执行netstat-ano|findstr85583.taskkill/F/PID[PID]//说明:taskkill/F/PID用于`强制终止`指定PID的进程/......