Eli Fulkerson .com HomeProjectsTcproute
 

Tcproute.exe

Tcproute is a tcp based traceroute console program for Windows. It uses the Pcap.Net .NET wrapper for WinPcap. Some code has been sourced from StackOverflow: here and here. I believe all the StackOverflow stuff defaults to CC-Attribution-Share-Alike, so feel free to use my modifications under that license.

Requirements:

I have tested tcproute under Windows XP and Windows 8. I'm assuming it will work on the intermediary versions provided the requirements are met - but with all the dependencies it may be hit and miss. Let me know. Additionally - it works fine under VMWare on my Mac, but screws up under my VirtualBox installation (in particular, it seems that VirtualBox's networking is rewriting my packets and losing the TTL settings. This might just be my setup rather than a general issue.) I also have reports that it misbehaves under KVM, but do not have an installation of that here to check.

Tcproute functions by trying to connect to a specified TCP port, starting with a packet TTL of 1 and incrementing upward until it successfully reaches the target.

Currently very beta. Feedback welcome!

Updates:

0.9, Sep 2 2015. Improvements to IP and MAC autodetection added by Sander Aiaots

Download:

tcproute.zip
Please note: source code for this project is a mess - very much a hacked together 0.x version, you have been warned.
source code (C#)

Example:


C:\>tcproute -i 4 www.elifulkerson.com
Ensuring gateway address (192.168.2.1) is in arp... OK!

Using the following values:
---------------------------
Local IP:    192.168.2.20
Local MAC:   90:B1:1C:93:0D:32
Gateway MAC: 00:1F:5B:00:DF:0B
Remote IP:   64.22.103.201

Tracing route to www.elifulkerson.com:80
  1        49 ms        192.168.2.1     TimeExceeded
  2        37 ms        (redacted - Eli)
  3        11 ms        (redacted - Eli)
  4        20 ms        (redacted - Eli)
  5        25 ms        he-3-5-0-0-10-cr01.newyork.ny.ibone.comcast.net [68.86.88.121]  TimeExceeded
  6        18 ms        23.30.207.94    TimeExceeded
  7        35 ms        vlan51.ebr1.NewYork2.Level3.net [4.69.138.222]  TimeExceeded
  8        29 ms        ae-6-6.ebr1.Atlanta2.Level3.net [4.69.148.105]  TimeExceeded
  9        34 ms        ae-82-82.csw3.Washington1.Level3.net [4.69.134.154]     TimeExceeded
 10        36 ms        ae-81-81.ebr1.Washington1.Level3.net [4.69.134.137]     TimeExceeded
 11        32 ms        GIGLINX-INC.edge4.Atlanta2.Level3.net [4.35.6.114]      TimeExceeded
 12      2001 ms        timed out
 13        36 ms        GIGLINX-INC.edge4.Atlanta2.Level3.net [4.35.6.114]      TimeExceeded
 14        34 ms        router2-atl.linode.com [64.22.106.14]   TimeExceeded
 15        35 ms        li16-201.members.linode.com [64.22.103.201]:80  Synchronize, Acknowledgment (port open)
(HTTP)     46 ms        li16-201.members.linode.com [64.22.103.201]:80  Acknowledgment

Help page:


Usage: tcproute.exe [-?][-l][-i INTERFACE#][-p PORT] target

Options:
    -?          Get this help screen
    -v          Display version information
    -l          List available interfaces
    -i INT#     Specify an interface (otherwise you have to pick from the list)
    -p PORT     Specify a TCP port to connect to
    -d          Disable DNS lookup
    -h num      Maximum of 'num' hops (maximum TTL)
    -w ms       Wait 'ms' milliseconds for a response
    -r #        Retry # times if a hop times out
    --http      Send an HTTP request once we get a connection
    target      The IP address or domain name of the target
    --debug     Debug mode, prints stuff for bug reports


Manual (Override) Options:
    --local-ip or --lip
        Manually set the local IP address.
        (format) XXX.XXX.XXX.XXX

    --local-mac or --lmac
        Manually set the local MAC address.
        (format)  XX:XX:XX:XX:XX:XX:XX  (colons only)

    --gateway-mac or --gwmac
        Manually set the gateway's MAC address
        (format)  XX:XX:XX:XX:XX:XX:XX  (colons only)

See also:

tcping.exe