Giter Site home page Giter Site logo

ocochard / graphpath Goto Github PK

View Code? Open in Web Editor NEW
367.0 17.0 21.0 17 KB

Graphpath generates an ASCII network diagram from the route table of a Unix/Linux

License: BSD 2-Clause "Simplified" License

Shell 100.00%
routing router network-visualization network-graph network-monitoring network

graphpath's People

Contributors

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

graphpath's Issues

Minor formatting error on Fedora 27

+----------------------------+    +----------------------------+
| SOURCE HOST                |    | DESTINATION HOST           |
| IP:   xxxxxxxxxxxxx        |    | IP:  xxxxxxxxxx            |
| ARP:  xxxxxxxxxxxxxxxxx    || ARP:  xxxxxxxxxxxxxxxxx    |    |                            |
+----------------------------+    +----------------------------+
                  |                             |
                  |               +----------------------------+
                  |               | ROUTER TOWARDS DESTINATION |
                  |               | IP:   xxxxxxxxxxxxx        |
                  |               | ARP:  xxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxx|
                  |               +----------------------------+
                  |                             |               
            --+---+-----------------------------+---
                  |
...

Looks like src_gateway_arp is coming out as:

"xxxxxxxxxxxxxxxxx\n
xxxxxxxxxxxxxxxxx"

so changing to:
printf '| ARP: %-18s |' "${src_gateway_arp:0:17}"
works.

Testing on Darwin/MacOS

Hello!

As this script is written, once installed on a Mac, and the user enters graphpath $source-ip $destination-ip, the user gets the following output:

-n EXIT:
This script was not tested on Darwin

I am not certain if this is on the roadmap, but I would love to test this on MacOS/Darwin. I know it would be as simple for me as editing the case statement, but if you have no plan to support Darwin in the future, it probably wouldn't be worth my time. If you do, however plan on supporting Macs, I would be more than happy to help.

Thanks again!

packing up new version for homebrew formula

Hello!

Thanks for making such a great tool. I've made a homebrew formula around it, but I'm seeing an error when building, because it appears that the v1.0 release is two commits behind current HEAD. I can add some handling to work around this, but I figured I would ask if it was all right for me to create a v1.1.0 release for these commits before I write the work-around in the homebrew formula.

Thanks!

graphpath: 179: local: |: bad variable name

Hi there,

I'm testing this script on Debian sid and I see the error in the title.

More complete the more complete output:

$ ./graphpath 192.168.20.132 8.8.8.8
+-----------------------------+  +-----------------------------+
| SOURCE                      |  | DESTINATION                 |
| IP:   192.168.20.132        |  | IP:   8.8.8.8               |
| ARP:                        |  |                             |
+-----------------------------+  +-----------------------------+
              |                            |
./graphpath: 179: local: |: bad variable name

I was able to fix this and make the script run correctly by changing the she-bang on line one like this:

diff --git a/graphpath b/graphpath
index c00e722..7842cc5 100755
--- a/graphpath
+++ b/graphpath
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #
 # Graphpath generates an ASCII network diagram from the route table of a Unix/Linux
 # https://bsdrp.net

It seems as though the script makes the assumption that /bin/sh is bash, which is not true on many distros / platforms.

on debian, /bin/sh is normally linked to dash which has very limited functionality and has more a feeling of plain-old-sh-before-bash.

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.