Giter Site home page Giter Site logo

killeroo / powerping Goto Github PK

View Code? Open in Web Editor NEW
186.0 15.0 27.0 2.22 MB

Advanced command-line ping tool

License: MIT License

C# 89.27% Shell 0.26% Batchfile 0.70% PowerShell 9.76%
ping c-sharp console network-monitoring network network-admin icmp icmp-header windows

powerping's Introduction

PowerPing - Advanced Windows Ping

Small improved command line ICMP ping program.

alt text

Downloads

Stable releases can be downloaded [here]

Features

Future features:

Arguments:

Ping Options:
    --infinite      [--t]            Ping the target until stopped (Ctrl-C to stop)
    --ipv4          [--4]            Force using IPv4
    --random        [--rng]          Generates random ICMP message
    --dontfrag      [--df]           Set 'Don't Fragment' flag
    --buffer        [--rb]  number   Sets recieve buffer size (default is 5096)
    --beep          [--b]   number   Beep on timeout (1) or on reply (2)
    --count         [--c]   number   Number of pings to send
    --timeout       [--w]   number   Time to wait for reply (in milliseconds)
    --ttl           [--i]   number   Time To Live for packet
    --interval      [--in]  number   Interval between each ping (in milliseconds)
    --type          [--pt]  number   Use custom ICMP type
    --code          [--pc]  number   Use custom ICMP code value
    --size          [--s]   number   Set size (in bytes) of packet (overwrites packet message)
    --message       [--m]   message  Ping packet message
    --timing        [--ti]  timing   Timing levels:
                                        0 - Paranoid    4 - Nimble
                                        1 - Sneaky      5 - Speedy
                                        2 - Quiet       6 - Insane
                                        3 - Polite      7 - Random

Display Options:
    --shorthand     [--sh]           Show less detailed replies
    --displaymsg    [--dm]           Display ICMP message contents
    --timestamp     [--ts]           Display timestamps (add 'UTC' for Coordinated Universal Time)
    --fulltimestamp [--fts]          Display full timestamps with localised date and time
    --nocolor       [--nc]           No colour
    --symbols       [--sym]          Renders replies and timeouts as ASCII symbols (add '1' for alt theme)
    --requests      [--r]            Show request packets
    --notimeouts    [--nt]           Don't display timeout messages
    --quiet         [--q]            No output (only affects normal ping)
    --resolve       [--res]          Resolve hostname of response address from DNS
    --inputaddr     [--ia]           Show input address instead of revolved one
    --checksum      [--chk]          Display checksum of packet
    --requireinput  [--ri]           Always ask for user input upon completion 
    --limit         [--l]   number   Limits output to just replies (1), requests (2) or summary(3)
    --decimals      [--dp]  number   Num of decimal places to use (0 to 3)

Modes:
    --scan          [--sc]  address  Network scanning, specify range "127.0.0.1-55"
                                     (listen command without address will listen on all local network adapters)
    --flood         [--fl]  address  Send high volume of pings to address
    --graph         [--g]   address  Graph view
    --location      [--loc] address  Location info for an address
    --listen        [--li]  address  Listen for ICMP packets on an address
    --listen        [--li]           Listen for ICMP packets on all local network adapters
    --whois                 address  Whois lookup for an address
    --whoami                         Location info for current host

Others:
    --log           [--f]   path     Logs the ping output to a file 
    --help          [--?]            Displays this help message
    --version       [--v]            Shows version and build information

Example usage:

 powerping 8.8.8.8                    -     Send ping to google DNS with default values (3000ms timeout, 5 pings)
 powerping github.com --w 500 --t     -     Send pings indefinitely to github.com with a 500ms timeout     
 powerping --w 500 --t github.com     -     Address can also be specified at the end
 
 powerping 127.0.0.1 --m Meow         -     Send ping with packet message "Meow" to loopback address
 powerping 127.0.0.1 --pt 3 --pc 2    -     Send ping with ICMP type 3 (dest unreachable) and code 2
 
 powerping 8.8.8.8 /c 5 -w 500 --sh   -     Different argument switches (/, - or --) can be used in any combination
 powerping google.com /ti Paranoid    -     Sends using the 'Paranoid' timing option
 powerping google.com /ti 1           -     Same as above

License

License under the MIT License:

Copyright (c) 2024 Matthew Carney [email protected]

Note:

Requires Elevated Rights (Administrator) to Run (more info here)

Screenshots

alt text alt text alt text alt text alt text alt text

powerping's People

Contributors

bccrew avatar jdpurcell avatar killeroo avatar

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  avatar  avatar  avatar  avatar  avatar  avatar

powerping's Issues

Port PowerPing to other platforms

  • Restructure project for dotnet and .net4.5 builds
  • Create Bash build script for building project with .netcore
  • Create Bash build script for building project with mono
  • Batch script for building standard windows binary
  • Travis CI yml script for .netcore and mono (couple of versions of each) (could use previous build script)
  • Add platform/build info to version text (also remove build date)
  • Make sure file versions persist with .net core builds
  • Installers for each build platform

Startup mischecks for inputted address

if (attributes.Address != "") throw new FormatException();
Is a false positive check, should be:
if (attributes.Address == "") throw new FormatException();

Fix Control C event handler

Event C handler currently not working properly, works with delay/lag

Responsiveness tested in:

  • Sending Normally (requires more testing)
  • Graph
  • Flood (requires more testing)
  • Scan

<1ms time being displayed after Timout

image

Seems to only occur after a timeout has occured and seems to stop after another timeout has occured, could be an error with timer or display function

Clean up scan

Check input and proper address finding in program.cs
Add to readme and help

Add IPv6 support

Can maybe be done by changing port type depending on IP Version ping property (that would need to be added)

Top of columns persisting in graph view

image

Top of columns of a specific size (over about 500ms) are persistently being drawn on screen, is either due to:

  • Inadequate height being used in Graph.Clear()
  • Column arrays not being set properly in Graph.CreateColumn

Application crashes when ping is running and pc goes to to sleep

SocketException thrown due to buffer overload?
Solution could be to move socket.sendto into try catch (check if this cause any adverse effects) maybe by changing:

Ping.cs

// Send ping request
timer.Start();
sock.SendTo(packet.getBytes(), packetSize, SocketFlags.None, iep);
sent++;

try
{
	// Try recieve ping response
	byte[] buffer = new byte[1024];
	recv = sock.ReceiveFrom(buffer, ref ep);
	timer.Stop();

	// Display reply packet
	ICMP response = new ICMP(buffer, recv);
	displayReplyPacket(response, ep, index);
	recieved++;

}

To:

try
{
	// Send ping request
	timer.Start();
	sock.SendTo(packet.getBytes(), packetSize, SocketFlags.None, iep);
	sent++;

	// Try recieve ping response
	byte[] buffer = new byte[1024];
	recv = sock.ReceiveFrom(buffer, ref ep);
	timer.Stop();

	// Display reply packet
	ICMP response = new ICMP(buffer, recv);
	displayReplyPacket(response, ep, index);
	recieved++;

}

Add source address option

How to

            SetSocketOption(SocketOptionLevel.Udp, SocketOptionName.NoChecksum, 1);
            sock.Bind((EndPoint)new IPEndPoint(attrs.Source, 0));

Improve statistics

  • Display stats while ping is running by pressing a key
  • Add more stats
  • Make sure percentage lost is working

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.