ttr.git


ttr

~ tiny traceroute in golang
git clone https://github.com/djnnvx/ttr.git
log | files | refs | archive | README | LICENSE

README.txt (3008B)

      1 
      2  ███████████ ███████████ ███████████
      3 ▒█▒▒▒███▒▒▒█▒█▒▒▒███▒▒▒█▒▒███▒▒▒▒▒███
      4 ▒   ▒███  ▒ ▒   ▒███  ▒  ▒███    ▒███
      5     ▒███        ▒███     ▒██████████
      6     ▒███        ▒███     ▒███▒▒▒▒▒███
      7     ▒███        ▒███     ▒███    ▒███
      8     █████       █████    █████   █████
      9    ▒▒▒▒▒       ▒▒▒▒▒    ▒▒▒▒▒   ▒▒▒▒▒
     10 
     11 
     12 
     13  ====== version 0.1.1 ======== djnn.sh
     14 
     15 
     16   ~ source code: https://evil.djnn.sh/ttr/log.html
     17 
     18 
     19 1. Simple usage
     20 
     21   To build, simply type "make" and let the compiler install the correct toolchain,
     22   dependencies and build the program for you. It is statically compiled, you may
     23   add it to a container if you wish but I had no need for it.
     24 
     25 
     26   Then, here is the expected output:
     27 
     28   ./ttr djnn.sh
     29 
     30   traceroute to djnn.sh (172.67.154.8), 30 hops max
     31   1  192.168.REDACTED 2.432 ms  4.263 ms  2.700 ms
     32   2  REDACTED.ne.jp (113.33.REDACTED) 5.260 ms  4.054 ms  3.849 ms
     33   3  210.79.REDACTED 4.202 ms  4.357 ms  3.544 ms
     34   4  * * *
     35   5  163.139.REDACTED 3.342 ms  3.219 ms  2.634 ms
     36   6  163.139.REDACTED 3.640 ms  5.679 ms  3.632 ms
     37   7  * * 163.139.REDACTED 7.895 ms
     38   8  103.22.REDACTED 42.821 ms  6.990 ms  8.304 ms
     39   9  172.67.REDACTED 5.022 ms  4.132 ms  3.660 ms
     40 
     41 
     42   NOTE - using without sudo:
     43 
     44   After building, you can simply run the following command, if you're on Linux:
     45 
     46 
     47     sudo setcap cap_net_raw+ep ./tracert
     48     ./ttr djnn.sh
     49 
     50 
     51   This will give your program the necessary permissions so that it is able to
     52   filter packets without your kernel blocking you.
     53 
     54 
     55 2. How does it work ?
     56 
     57   There are several resources online that explain how traceroute works, but I'll
     58   document it here too. In the IP packet, there is a field called TTL (Time-to-live),
     59   every time the packet passes through a router, this field is decreased by one.
     60   It's a feature to improve the reliability of the protocol.
     61 
     62   If the TTL reaches 0, we optionally receive back a ICMP message, "Time Exceeded".
     63   This is very much an optional feature in the spec, so you might not see it all
     64   the time. But the way this program works is by intentionally setting low TTL
     65   values to make packets "die"vat specific hops so we can hear back from the
     66   routers at those locations.
     67 
     68 
     69 3. Project management
     70 
     71   If you find bugs or issues, you can contact me through the method described
     72   here: https://djnn.sh/pgp
     73 
     74   The source code is accessible for free, but Pull Requests are not accepted.
     75   No guaranteed is given on whether the program works or not, no promises is
     76   made on feature support. The behaviour can completely change from one version
     77   to the next, and I take no responsibility as the main developer if it affects
     78   critical operations for you.