Coder Social home page Coder Social logo

nnao45 / pexpo Goto Github PK

View Code? Open in Web Editor NEW
101.0 9.0 10.0 63.49 MB

:computer: Terminal sending ping tool written in Go.

Home Page: http://qiita.com/A_Resas/items/c904ddebdd7096f1a6bc

License: MIT License

Go 94.87% Makefile 5.13%
ping icmp multi-platform go golang tui

pexpo's Introduction

CircleCI Travis CI v1.41 license Go Report Card platform

pexpo

result
pexpo is ping sending tui tool with cool clomun & logging loss-count in the multi platforms(Windows, Mac, Linux...).
pexpo has tui engine is termbox-go, sending ICMP engine is go-fastping.
So, pexpo's code is NATIVE The Go Programming Language application. This is inspired the pinger, Exping.
And, This app use with root(sudo) privilege. Because using socket of icmp.

Current pexpo's version: 1.41
(scroll fix.)

Download

Download Page: https://github.com/nnao45/pexpo/releases/latest

Install

$ brew install nnao45/pexpo/pexpo

if you install with brew, please make ping-list, for example, following text.

$ cat << EOT > ping-list.txt
8.8.8.8	google.com
8.8.4.4	google.com
208.67.220.123 OpenDNS
216.146.35.35 Dyn Internet Guide
216.146.36.36 Dyn Internet Guide
77.88.8.8 Yandex.DNS
77.88.8.1 Yandex.DNS
77.88.8.88 Yandex.DNS
77.88.8.2 Yandex.DNS
77.88.8.7 Yandex.DNS
77.88.8.3 Yandex.DNS
180.76.76.76 Baidu DNS
114.114.114.114 Baidu DNS
80.80.80.80 Freenom World
80.80.81.81 Freenom World
8.26.56.26 Comodo Secure DNS
8.20.247.20 Comodo Secure DNS
106.186.17.181 OpenNIC
106.185.41.36 OpenNIC
2001:4860:4860::8888 www.google.com
EOT

Okay, and run 😊

$ sudo pexpo -f ping-list.txt

Usage

    pexpo | pexpo.exe [-i interval] [-t timeout] [-f ping-list] [-A] [-H] [-S] [-V]

Examples:
    ./pexpo -i 500ms -t 1s -f /usr/local/ping-list.txt
    pexpo.exe -i 500ms -t 1s -f C:\Users\arale\Desktop\ping-list.txt

Option:
    -i Sending ICMP interval time(Default:500ms, should not be lower this).
       You must not use "200" or "1" or..., must use "200ms" or "1s" or ... , so use with time's unit.

    -t Sending ICMP timeout time(Default:3s)
       You must not use "200" or "1" or..., must use "200ms" or "1s" or ... , so use with time's unit.
       this "timeout" is Exact meaning, fastping.NewPinger() receives OnRecv struct value interval.

    -f Using Filepath of ping-list(Default:current_dir/ping-list.txt).

    -A If you want to write on ping-list -- such as Cisco's show ip arp -- , 
       "Internet  10.0.0.1                0   ca01.18cc.0038  ARPA   Ethernet2/0",
	   Ignoring string "Internet", So It is good as you copy&paste show ip arp line.
	   
    -V if you DON'T want to make file "ping-list", should use this option.
       this option is run "vi", and make tmpfile...pexpo this file as ping-list.

<HTTP mode options!>

Examples:
    ./pexpo -H -i 500ms -t 1s -f /usr/local/curl-list.txt
    pexpo.exe -S -i 500ms -t 1s -f C:\Users\arale\Desktop\curl-list.txt
       (If you want to "Request, http and https", Using Both -H & -S.)
	
Option:
    -H This optison is like "curl". So you Sending HTTP(:80) GET Request instead of the PING...!
	   
    -S This optison is like "curl". So you Sending HTTP"S"(:443) GET Request instead of the PING...!
	
       -H or -S options HTTP/HTTPS GET Request instead of the PING.
       (Just like, curl -LIs www.google.com -o /dev/null -w '%{http_code}\n')
       This Request is ververy simple GET Request, Only Getting status code(No header, No form, No getting data.)

       And, if http status code is "200", string color is Blue, else Red.

Demo (macOS 10.13.1):apple:

result

Demo (Ubuntu16.04):penguin:

result

Demo (windows10):four_leaf_clover:

result

Demo (windows10 & HTTPING):earth_asia:

result

Support, Running NO NEED text file mode

Before run main, make ping-list with "vi".

$ sudo pexpo -V

you write, for example, following text,

8.8.8.8	google.com
8.8.4.4	google.com
216.146.35.35 Dyn Internet Guide
216.146.36.36 Dyn Internet Guide
180.76.76.76 Baidu DNS
114.114.114.114 Baidu DNS
80.80.80.80 Freenom World
80.80.81.81 Freenom World
8.26.56.26 Comodo Secure DNS
8.20.247.20 Comodo Secure DNS
106.186.17.181 OpenNIC
106.185.41.36 OpenNIC
2001:4860:4860::8888 www.google.co

okay, and push ":wq", run the pexpo 😌
result

Implementation

  • Very light, and quick application(for Sending ICMP to the too many hosts):metal:
  • ONLY one app run on multi platforms(Windows10, Mac, Linux...)!!:kissing_heart:
  • You can send ICMP or HTTP GET or HTTPS GET ipv4, and ipv6!!:open_mouth:
  • pexpo has several options. You can change ping interval, timeout, select ping-list, ,help Cisco using, & http ping mode!:octocat:
  • Display Counting Ping loss per host:point_up_2:
  • Display Current Dead host(if host is revive, and dead mark will be vanish):boom:
  • pexpo has Pausing Implementation. if you want, push "Crtl+S":traffic_light:

more...

  • Logging ping result($HOME/.pexpo/result_$DATE_.txt).
  • Check the syntax on the ping-list(# is comment out, ignoring blank line, using tab is ok, no description is ok...).
  • Push ArrowUp(Ctrl+A) or ArrowDown(Ctrl+Z) key, scroll host-list ⏫ ⏬

Release note

  • version 1.41...scroll fix.
  • version 1.40...new CI & fix bug.
  • version 1.39...mutex is safetilize.
  • version 1.38...pausing implement change from channel to the mutex.
  • version 1.37...context support & slim goroutine.
  • version 1.36...stable homebrew & glide.
  • version 1.34...bug fix.
  • version 1.34...typo fix.
  • version 1.33...add "-V"...make tmp ping-list with vi.
  • version 1.32...little bug fix & brew install support.
  • version 1.31...little bug fix & brew install support.
  • version 1.30...Scroling host-list!!!!! πŸ₯
  • version 1.25...travis support & reading ping-list's bug fix.
  • version 1.24...go report A+!!(no implement change)
  • version 1.23...Little performance up(assign cap in the string[])
  • version 1.22...Too Little bug fix(string join -> append []string)
  • version 1.21...Too Little change in code & icon+
  • version 1.20...Wow!!:heart_eyes:Adding "HTTP PING"!!
    • "-H", http_ping "-S", https_ping. Using Both, Sending Both with not error.
    • Accompanied by the http ping implementation, little change variavle, channel. There is no change in ICMP behavior.
  • version 1.10...Too little additinal change under line, There is no change in Basic behavior.
    • Print version.
    • Readability up(not using global variable).
    • Add channel, "received"(Both directions key interrupt channels).
    • When push Ctrl+S, change key interrupt message.
  • version 1.00...Implementated Basic functions.

Have a nice go hacking daysβœ¨πŸ˜‰

Writer & License

pexpo was writed by nnao45 (WORK:Network Engineer, Twitter:@A_Resas, MAIL:[email protected]).
This software is released under the MIT License, see LICENSE.

pexpo's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pexpo's Issues

brew install nnao45/pexpo/pexpo γ—γŸγ‚‰δΈ‹θ¨˜γŒε‡Ίγ¦γ„γΎγ™γ€‚

δ½•γ‹ζ–Ήζ³•γ‚γ‚ŠγΎγ™γ§γ—γ‚‡γ†γ‹γ€‚

βœ— brew install nnao45/pexpo/pexpo
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
Updated 4 formulae.

==> Installing pexpo from nnao45/pexpo
==> Downloading https://github.com/nnao45/pexpo/archive/1.41.tar.gz
Already downloaded: /Users/tm/Library/Caches/Homebrew/downloads/b9cb9ece37eb63eccd79e673eab12f9b160f3d3bd7017aff3bd38953559ef85c--pexpo-1.41.tar.gz
==> make glide
==> make deps
==> make
Last 15 lines from /Users/tm/Library/Logs/Homebrew/pexpo/03.make:
2021-02-28 23:29:29 +0900

make

go build -a -tags netgo -installsuffix netgo -ldflags="-s -w -X "main.version=1.41" -extldflags "-static"" -o bin/pexpo
go: cannot find main module, but found glide.lock in /private/tmp/pexpo-20210228-43501-mc08g9/pexpo-1.41/src/github.com/nnao45/pexpo
to create a module there, run:
go mod init
make: *** [bin/pexpo] Error 1

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/nnao45/homebrew-pexpo/issues

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.