MCPcopy
hub / github.com/mehrdadrad/mylg

github.com/mehrdadrad/mylg @v0.2.6 sqlite

repository ↗ · DeepWiki ↗ · release v0.2.6 ↗
2,177 symbols 3,679 edges 53 files 452 documented · 21%
README

Build Status Go Report Card Gitter GORef

IMAGE

myLG, Command line Network Diagnostic Tool

myLG is an open source software utility which combines the functions of the different network probes in one network diagnostic tool.

Features

  • Popular looking glasses (ping/trace/bgp): Telia, Level3
  • More than 200 countries DNS Lookup information
  • Local ping and real-time trace route
  • Packet analyzer - TCP/IP and other packets
  • Quick NMS (network management system)
  • Local HTTP/HTTPS ping (GET, POST, HEAD)
  • RIPE information (ASN, IP/CIDR)
  • PeeringDB information
  • Port scanning
  • Network LAN Discovery
  • Web dashboard
  • Configurable options
  • Direct access to commands from shell
  • Support vi and emacs mode, almost all basic features
  • CLI auto complete and history features

Demo

IMAGE Demo

IMAGE ALT TEXT HERE IMAGE ALT TEXT HERE IMAGE ALT TEXT HERE IMAGE ALT TEXT HERE

Usage

```

                      _    ___ 
            _ __ _  _| |  / __|
           | '  \ || | |_| (_ |
           |_|_|_\_, |____\___|
                  |__/

             My Looking Glass
       Free Network Diagnostic Tool
         www.facebook.com/mylg.io
              http://mylg.io

================== myLG v0.2.6 ==================

local> hping https://www.google.com -trace -c 4 HPING www.google.com (216.58.194.196), Method: HEAD, DNSLookup: 17.2923 ms HTTP Response seq=0, proto=HTTP/1.1, status=200, time=183.097 ms, connection=34.789 ms, first byte read=148.167 ms HTTP Response seq=1, proto=HTTP/1.1, status=200, time=164.960 ms, connection=27.764 ms, first byte read=137.096 ms HTTP Response seq=2, proto=HTTP/1.1, status=200, time=153.559 ms, connection=27.881 ms, first byte read=125.526 ms HTTP Response seq=3, proto=HTTP/1.1, status=200, time=164.309 ms, connection=28.904 ms, first byte read=135.296 ms

--- www.google.com HTTP ping statistics --- 4 requests transmitted, 4 replies received, 0% requests failed HTTP Round-trip min/avg/max = 153.56/164.05/183.10 ms HTTP Code [200] responses : [████████████████████] 100.00%

local> whois 577 BACOM - Bell Canada, CA +--------------------+-----------+ | LOCATION | COVERED % | +--------------------+-----------+ | Canada - ON | 61.3703 | | Canada | 36.2616 | | Canada - QC | 1.3461 | | United States - MA | 0.7160 | | Canada - BC | 0.1766 | | Canada - AB | 0.0811 | | United States | 0.0195 | | United States - NJ | 0.0143 | | Belgium | 0.0048 | | United States - NC | 0.0048 | | United States - TX | 0.0048 | | Canada - NB | 0.0000 | | Canada - NS | 0.0000 | +--------------------+-----------+

local> scan www.google.com -p 1-500 +----------+------+--------+-------------+ | PROTOCOL | PORT | STATUS | DESCRIPTION | +----------+------+--------+-------------+ | TCP | 80 | Open | | | TCP | 443 | Open | | +----------+------+--------+-------------+ Scan done: 2 opened port(s) found in 5.605 seconds

lg/telia/los angeles> bgp 8.8.8.0/24 Telia Carrier Looking Glass - show route protocol bgp 8.8.8.0/24 table inet.0

Router: Los Angeles

Command: show route protocol bgp 8.8.8.0/24 table inet.0

inet.0: 661498 destinations, 5564401 routes (657234 active, 509 holddown, 194799 hidden) + = Active Route, - = Last Active, * = Both

8.8.8.0/24 *[BGP/170] 33w0d 01:36:06, MED 0, localpref 200 AS path: 15169 I, validation-state: unverified > to 62.115.36.170 via ae4.0 [BGP/170] 8w3d 11:19:40, MED 0, localpref 200, from 80.91.255.95 AS path: 15169 I, validation-state: unverified to 62.115.119.84 via xe-1/1/0.0 to 62.115.119.88 via xe-1/2/0.0 to 62.115.119.90 via xe-11/0/3.0 to 62.115.119.102 via xe-9/0/0.0 to 62.115.119.92 via xe-9/0/2.0 > to 62.115.119.86 via xe-9/1/2.0 to 62.115.119.98 via xe-9/2/2.0 to 62.115.119.100 via xe-9/2/3.0 to 62.115.119.94 via xe-9/3/1.0 to 62.115.119.96 via xe-9/3/3.0

ns/united states/redwood city> dig yahoo.com Trying to query server: 204.152.184.76 united states redwood city ;; opcode: QUERY, status: NOERROR, id: 19850 ;; flags: qr rd ra; yahoo.com. 728 IN MX 1 mta6.am0.yahoodns.net. yahoo.com. 728 IN MX 1 mta5.am0.yahoodns.net. yahoo.com. 728 IN MX 1 mta7.am0.yahoodns.net. yahoo.com. 143013 IN NS ns4.yahoo.com. yahoo.com. 143013 IN NS ns6.yahoo.com. yahoo.com. 143013 IN NS ns2.yahoo.com. yahoo.com. 143013 IN NS ns5.yahoo.com. yahoo.com. 143013 IN NS ns1.yahoo.com. yahoo.com. 143013 IN NS ns3.yahoo.com.

;; ADDITIONAL SECTION: ns1.yahoo.com. 561456 IN A 68.180.131.16 ns2.yahoo.com. 27934 IN A 68.142.255.16 ns3.yahoo.com. 532599 IN A 203.84.221.53 ns4.yahoo.com. 532599 IN A 98.138.11.157 ns5.yahoo.com. 532599 IN A 119.160.247.124 ns6.yahoo.com. 143291 IN A 121.101.144.139 ns1.yahoo.com. 51624 IN AAAA 2001:4998:130::1001 ns2.yahoo.com. 51624 IN AAAA 2001:4998:140::1002 ns3.yahoo.com. 51624 IN AAAA 2406:8600:b8:fe03::1003 ns6.yahoo.com. 143291 IN AAAA 2406:2000:108:4::1006 ;; Query time: 1204 ms

;; CHAOS CLASS BIND version.bind. 0 CH TXT "9.10.4-P1" hostname.bind. 0 CH TXT "fred.isc.org"

local> peering 6327 The data provided from www.peeringdb.com +-------------------+---------------+---------------+--------------------+------+ | NAME | TRAFFIC | TYPE | WEB SITE | NOTE | +-------------------+---------------+---------------+--------------------+------+ | Shaw Cablesystems | 500-1000 Gbps | Cable/DSL/ISP | http://www.shaw.ca | | +-------------------+---------------+---------------+--------------------+------+ +------------------+--------+--------+-----------------+-------------------------+ | NAME | STATUS | SPEED | IPV4 ADDR | IPV6 ADDR | +------------------+--------+--------+-----------------+-------------------------+ | Equinix Ashburn | ok | 20000 | 206.126.236.20 | 2001:504:0:2::6327:1 | | Equinix Ashburn | ok | 20000 | 206.223.115.20 | | | Equinix Chicago | ok | 30000 | 206.223.119.20 | 2001:504:0:4::6327:1 | | Equinix San Jose | ok | 30000 | 206.223.116.20 | 2001:504:0:1::6327:1 | | Equinix Seattle | ok | 20000 | 198.32.134.4 | 2001:504:12::4 | | Equinix New York | ok | 10000 | 198.32.118.16 | 2001:504:f::10 | | SIX Seattle | ok | 100000 | 206.81.80.54 | 2001:504:16::18b7 | | NYIIX | ok | 20000 | 198.32.160.86 | 2001:504:1::a500:6327:1 | | TorIX | ok | 10000 | 206.108.34.12 | | | PIX Vancouver | ok | 10000 | 206.223.127.2 | | | PIX Toronto | ok | 1000 | 206.223.127.132 | | | Equinix Toronto | ok | 10000 | 198.32.181.50 | 2001:504:d:80::6327:1 | +------------------+--------+--------+-----------------+-------------------------+

local> disc Network LAN Discovery +--------------+-------------------+------+-----------+-------------------+ | IP | MAC | HOST | INTERFACE | ORGANIZATION NAME | +--------------+-------------------+------+-----------+-------------------+ | 172.16.0.0 | ff:ff:ff:ff:ff:ff | NA | en0 | NA | | 172.16.1.1 | e4:8d:8c:7a:66:26 | NA | en0 | Routerboard.com | | 172.16.1.10 | ac:bc:32:b4:33:23 | NA | en0 | Apple, Inc. | | 172.16.1.205 | 74:e5:b:97:11:28 | NA | en0 | NA | | 172.16.1.254 | 54:4a:0:33:b4:2f | NA | en0 | NA | | 172.16.2.12 | d4:f4:6f:7b:8f:cf | NA | en0 | Apple, Inc. | | 172.16.2.13 | 5c:ad:cf:23:7:f9 | NA | en0 | Apple, Inc. | | 172.16.2.111 | d0:a6:37:72:cf:2d | NA | en0 | Apple, Inc. | | 192.168.33.0 | ff:ff:ff:ff:ff:ff | NA | vboxnet0 | NA | | 192.168.33.1 | a:0:27:0:0:0 | NA | vboxnet0 | NA | | 224.0.0.251 | 1:0:5e:0:0:fb | NA | en0 | NA | +--------------+-------------------+------+-----------+-------------------+ 11 host(s) has been found

local> whois 8.8.8.8 +------------+-------+--------------------------+ | PREFIX | ASN | HOLDER | +------------+-------+--------------------------+ | 8.8.8.0/24 | 15169 | GOOGLE - Google Inc., US | +------------+-------+--------------------------+

local> dump -d +----------+-------------------+--------+-------+--------------------------------+-----------+-----------+--------------+----------+ | NAME | MAC | STATUS | MTU | IP ADDRESSES | MULTICAST | BROADCAST | POINTTOPOINT | LOOPBACK | +----------+-------------------+--------+-------+--------------------------------+-----------+-----------+--------------+----------+ | lo0 | | UP | 16384 | 127.0.0.1/8 ::1/128 fe80::1/64 | ✓ | | | ✓ | | gif0 | | DOWN | 1280 | | ✓ | | ✓ | | | stf0 | | DOWN | 1280 | | | | | | | en0 | ac:bc:32:b4:33:23 | UP | 1500 | fe80::181b:3d55:e9a2:e3df/64 | ✓ | ✓ | | | | | | | | 192.168.0.103/24 | | | | | | p2p0 | 0e:bc:32:b4:33:23 | UP | 2304 | | ✓ | ✓ | | | | awdl0 | ee:3a:98:da:44:5c | UP | 1484 | fe80::ec3a:98ff:feda:445c/64 | ✓ | ✓ | | | | en1 | 4a:00:03:9c:8d:60 | UP | 1500 | | | ✓ | | | | en2 | 4a:00:03:9c:8d:61 | UP | 1500 | | | ✓ | | | | bridge0 | 4a:00:03:9c:8d:60 | UP | 1500 | | ✓ | ✓ | | | | utun0 | | UP | 2000 | fe80::ec23:f621:ae74:5271/64 | ✓ | | ✓ | | | utun1 | | UP | 1380 | fe80::d187:7734:49d9:9d84/64 | ✓ | | ✓ | | | vboxnet0 | 0a:00:27:00:00:00 | DOWN | 1500 | | ✓ | ✓ | | | +----------+-------------------+--------+-------+--------------------------------+-----------+-----------+--------------+----------+

local> dump 20:29:36.415 IPv4/TCP ec2-52-73-80-145.compute-1.amazonaws.com.:443(https) > 192.168.0.104:61479 [P.], win 166, len: 33 20:29:36.416 IPv4/TCP 192.168.0.104:61479 > ec2-52-73-80-145.compute-1.amazonaws.com.:443(https) [.], win 4094, len: 0 20:29:36.417 IPv4/TCP 192.168.0.104:61479 > ec2-52-73-80-145.compute-1.amazonaws.com.:443(https) [P.], win 4096, len: 37 20:29:36.977 IPv4/UDP 192.168.0.104:62733 > 192.168.0.1:53(domain) , len: 0 20:29:37.537 IPv4/TCP ec2-54-86-120-119.compute-1.amazonaws.com.:443(https) > 192.168.0.104:61302 [.], win 124, len: 0 20:29:38.125 IPv4/TCP 192.168.0.104:61304 > ec2-52-23-213-161.compute-1.amazonaws.com.:443(https) [P.], win 4096, len: 85 20:29:38.126 IPv4/TCP ec2-52-23-213-161.compute-1.amazonaws.com.:443(https) > 192.168.0.104:61304 [.], win 1048, len: 0 20:29:38.760 IPv4/TCP ec2-54-165-12-100.compute-1.amazonaws.com.:443(https) > 192.168.0.104:61296 [.], win 2085, len: 0 20:29:39.263 IPv4/ICMP 192.168.0.104 > ir1.fp.vip.ne1.yahoo.com.: EchoRequest id 20859, seq 27196, len: 56 20:29:39.265 IPv4/UDP 192.168.0.1:53(domain) > 192.168.0.104:62733 , len: 0

local> dump tcp and port 443 -c 10 23:26:56.026 IPv4/TCP 192.168.0.104:64686 > 192.0.80.242:443(https) [F.], win 8192, len: 0 23:26:56.045 IPv4/TCP 192.168.0.104:64695 > i2.wp.com.:443(https) [F.], win 8192, len: 0 23:26:56.048 IPv4/TCP i2.wp.com.:443(https) > 192.168.0.104:64695 [F.], win 62, len: 0 23:26:56.081 IPv4/TCP 192.168.0.104:63692 > ec2-54-88-144-213.compute-1.amazonaws.com.:443(https) [P.], win 4096, len: 37 23:26:56.082 IPv4/TCP 192.168.0.104:64695 > i2.wp.com.:443(https) [.], win 8192, len: 0 23:26:56.083 IPv4/TCP 192.0.80.242:443(https) > 192.168.0.104:64686 [.], win 64, len: 0 23:26:56.150 IPv4/TCP ec2-54-88-144-213.compute-1.amazonaws.com.:443(https) > 192.168.0.104:63692 [.], win 166, len: 0 23:26:56.259 IPv4/TCP ec2-54-172-56-148.compute-1.amazonaws.com.:443(https) > 192.168.0.104:63623 [P.], win 1316, len: 85 23:26:56.260 IPv4/TCP 192.168.0.104:63623 > ec2-54-172-56-148.compute-1.amazonaws.com.:443(https) [.], win 4093, len: 0 23:26:56.820 IPv4/TCP 192.168.0.104:64691 > 192.30.253.116:443(https

Extension points exported contracts — how you extend this code

Provider (Interface)
Provider represents looking glass [3 implementers]
mylg.go
APIHandler (FuncType)
APIHandler represents API function w/ cli arg
services/httpd/httpd.go

Core symbols most depended-on inside this repo

Close
called by 44
cli/cli.go
Write
called by 23
ssh/ssh.go
fmtHops
called by 12
icmp/trace.go
Marshal
called by 11
icmp/trace.go
czStr
called by 11
packet/packet.go
Set
called by 9
mylg.go
send
called by 9
icmp/ping.go
UpdateCompleter
called by 8
cli/cli.go

Shape

Function 1,898
Method 203
Struct 52
Class 20
Interface 2
FuncType 1
TypeAlias 1

Languages

TypeScript82%
Go18%

Modules by API surface

services/dashboard/assets/js/bundle.min.js1,733 symbols
mylg.go37 symbols
icmp/trace.go35 symbols
services/dashboard/assets-dev/app/trace/trace.component.ts26 symbols
icmp/ping.go24 symbols
icmp/trace_termui.go23 symbols
cli/config.go21 symbols
cli/cli.go21 symbols
packet/packet.go20 symbols
ripe/ripe.go19 symbols
disc/disc.go19 symbols
ns/ns.go17 symbols

Dependencies from manifests, versioned

@angular/common2.0.2 · 1×
@angular/compiler2.0.2 · 1×
@angular/core2.0.2 · 1×
@angular/forms2.0.2 · 1×
@angular/http2.0.2 · 1×
@angular/platform-browser2.0.2 · 1×
@angular/platform-browser-dynamic2.0.2 · 1×
@angular/router3.0.2 · 1×
@angular/upgrade2.0.2 · 1×
ag-grid6.2.x · 1×
ag-grid-ng26.2.x · 1×
angular-in-memory-web-api0.1.5 · 1×

For agents

$ claude mcp add mylg \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact