Giter Site home page Giter Site logo

tcping-go's Introduction

Tcping GO

一个使用go写的小工具,用于检测TCP端口是否开放

使用方法

你可以简单的测试一个地址的某个端口是否开放,可以使用域名或者IP地址,默认测试该地址的80端口

tcping www.baidu.com
使用 www.qq.com 的 A 记录: 175.27.8.138
[1] 来自 175.27.8.138:80 的响应: 时间=29.256ms
[2] 来自 175.27.8.138:80 的响应: 时间=29.086ms
[3] 来自 175.27.8.138:80 的响应: 时间=37.761ms
[4] 来自 175.27.8.138:80 的响应: 时间=30.259ms

测试完成,成功次数: 4/4

使用 -p 指定端口号,如下

tcping www.qq.com -p 443
使用 www.qq.com 的 A 记录: 175.27.8.138
[1] 来自 175.27.8.138:443 的响应: 时间=28.835ms
[2] 来自 175.27.8.138:443 的响应: 时间=27.419ms
[3] 来自 175.27.8.138:443 的响应: 时间=44.382ms
[4] 来自 175.27.8.138:443 的响应: 时间=28.356ms

测试完成,成功次数: 4/4

使用 -6 指定使用IPv6(仅对域名有效)

tcping www.qq.com -6
使用 www.qq.com 的 AAAA 记录: 240e:97c:2f:1::5c
[1] 来自 [240e:97c:2f:1::5c]:80 的响应: 时间=30.795ms
[2] 来自 [240e:97c:2f:1::5c]:80 的响应: 时间=30.247ms
[3] 来自 [240e:97c:2f:1::5c]:80 的响应: 时间=30.856ms
[4] 来自 [240e:97c:2f:1::5c]:80 的响应: 时间=30.275ms

测试完成,成功次数: 4/4

使用 -c 指定测试次数,默认为4次

使用 -t 指定超时时间,默认为2秒

使用 -f 来启用快速模式,降低两次成功测试之间的间隔时间

tcping-go's People

Contributors

taurusxin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.