码农知识堂 - 1000bd
  •   Python
  •   PHP
  •   JS/TS
  •   JAVA
  •   C/C++
  •   C#
  •   GO
  •   Kotlin
  •   Swift
  • Telnet 测试 UDP 端口?


    Telnet 并不支持 UDP 端口的测试,可以使用 nc 命令来进行测试。nc 命令两种都支持:

    TCP

    1. # nc -z -v -u [hostname/IP address] [port number]
    2. # nc -z -v 192.168.10.12 22
    3. Connection to 192.118.20.95 22 port [tcp/ssh] succeeded!

    UDP

    1. # nc -z -v [hostname/IP address] [port number]
    2. # nc -z -v -u 192.168.10.12 123
    3. Connection to 192.118.20.95 123 port [udp/ntp] succeeded!

    下面是一些 nc 的简单用例:

    1. - Start a listener on the specified TCP port and send a file into it:
    2. nc -l -p port < filename
    3. - Connect to a target listener on the specified port and receive a file from it:
    4. nc host port > received_filename
    5. - Scan the open TCP ports of a specified host:
    6. nc -v -z -w timeout_in_seconds host start_port-end_port
    7. - Start a listener on the specified TCP port and provide your local shell access to the connected party (this is dangerous and can be abused):
    8. nc -l -p port -e shell_executable
    9. - Connect to a target listener and provide your local shell access to the remote party (this is dangerous and can be abused):
    10. nc host port -e shell_executable
    11. - Act as a proxy and forward data from a local TCP port to the given remote host:
    12. nc -l -p local_port | nc host remote_port
    13. - Send an HTTP GET request:
    14. echo -e "GET / HTTP/1.1\nHost: host\n\n" | nc host 80

  • 相关阅读:
    深入理解锁
    .NET性能优化-使用SourceGenerator-Logger记录日志
    SCI常见词汇表达
    Java-IO流之字符流(下篇)
    Haskell 组合运算符
    [Jdk版本不一致问题 ]终端查看jdk版本不一致
    电脑重装系统后安全中心有个黄色感叹号如何处理
    Spring配置 + xml的IOC控制反转 + Setter注入
    浅谈分布式任务调度系统Celery的设计与实现
    每日一题 416 分割等和子集(01背包)
  • 原文地址:https://blog.csdn.net/Xuesengxinyi/article/details/134399899
  • 最新文章
  • 攻防演习之三天拿下官网站群
    数据安全治理学习——前期安全规划和安全管理体系建设
    企业安全 | 企业内一次钓鱼演练准备过程
    内网渗透测试 | Kerberos协议及其部分攻击手法
    0day的产生 | 不懂代码的"代码审计"
    安装scrcpy-client模块av模块异常,环境问题解决方案
    leetcode hot100【LeetCode 279. 完全平方数】java实现
    OpenWrt下安装Mosquitto
    AnatoMask论文汇总
    【AI日记】24.11.01 LangChain、openai api和github copilot
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1
正则表达式工具 cron表达式工具 密码生成工具

京公网安备 11010502049817号