mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-07-15 01:24:29 +02:00
update docstring
This commit is contained in:
@ -13,60 +13,34 @@ Compatibility:
|
|||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
$ traceroute www.cnn.com | jc --traceroute -p -r
|
$ traceroute google.com | jc --traceroute -p
|
||||||
{
|
{
|
||||||
"destination_ip": "173.207.22.152",
|
"destination_ip": "216.58.194.46",
|
||||||
"destination_name": "http://google.es",
|
"destination_name": "google.com",
|
||||||
"hops": [
|
"hops": [
|
||||||
{
|
{
|
||||||
"hop": "1",
|
"hop": 1,
|
||||||
"probes": [
|
"probes": [
|
||||||
{
|
{
|
||||||
"annotation": null,
|
"annotation": null,
|
||||||
"asn": "1739",
|
"asn": null,
|
||||||
"ip": "131.240.100.12",
|
"ip": "216.230.231.141",
|
||||||
"name": "131.240.100.12",
|
"name": "216-230-231-141.static.houston.tx.oplink.net",
|
||||||
"rtt": "0.676"
|
"rtt": 198.574
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"annotation": null,
|
"annotation": null,
|
||||||
"asn": "1739",
|
"asn": null,
|
||||||
"ip": "131.240.100.12",
|
"ip": "216.230.231.141",
|
||||||
"name": "131.240.100.12",
|
"name": "216-230-231-141.static.houston.tx.oplink.net",
|
||||||
"rtt": "0.763"
|
"rtt": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"annotation": null,
|
"annotation": null,
|
||||||
"asn": "1739",
|
"asn": null,
|
||||||
"ip": "131.240.100.12",
|
"ip": "216.230.231.141",
|
||||||
"name": "131.240.100.12",
|
"name": "216-230-231-141.static.houston.tx.oplink.net",
|
||||||
"rtt": "0.910"
|
"rtt": 198.65
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"hop": "2",
|
|
||||||
"probes": [
|
|
||||||
{
|
|
||||||
"annotation": null,
|
|
||||||
"asn": "1739",
|
|
||||||
"ip": "131.232.1.26",
|
|
||||||
"name": "http://tut1-fw-vlan558.av.tut.fi",
|
|
||||||
"rtt": "0.266"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"annotation": null,
|
|
||||||
"asn": "1739",
|
|
||||||
"ip": "131.232.1.26",
|
|
||||||
"name": "http://tut1-fw-vlan558.av.tut.fi",
|
|
||||||
"rtt": "0.404"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"annotation": null,
|
|
||||||
"asn": "1739",
|
|
||||||
"ip": "131.232.1.26",
|
|
||||||
"name": "http://tut1-fw-vlan558.av.tut.fi",
|
|
||||||
"rtt": "0.493"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -74,9 +48,40 @@ Examples:
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$ traceroute google.com | jc --traceroute -p -r
|
||||||
$ traceroute | jc --traceroute -p -r
|
{
|
||||||
[]
|
"destination_ip": "216.58.194.46",
|
||||||
|
"destination_name": "google.com",
|
||||||
|
"hops": [
|
||||||
|
{
|
||||||
|
"hop": "1",
|
||||||
|
"probes": [
|
||||||
|
{
|
||||||
|
"annotation": null,
|
||||||
|
"asn": null,
|
||||||
|
"ip": "216.230.231.141",
|
||||||
|
"name": "216-230-231-141.static.houston.tx.oplink.net",
|
||||||
|
"rtt": "198.574"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"annotation": null,
|
||||||
|
"asn": null,
|
||||||
|
"ip": "216.230.231.141",
|
||||||
|
"name": "216-230-231-141.static.houston.tx.oplink.net",
|
||||||
|
"rtt": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"annotation": null,
|
||||||
|
"asn": null,
|
||||||
|
"ip": "216.230.231.141",
|
||||||
|
"name": "216-230-231-141.static.houston.tx.oplink.net",
|
||||||
|
"rtt": "198.650"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
...
|
||||||
|
]
|
||||||
|
}
|
||||||
"""
|
"""
|
||||||
import re
|
import re
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
|
Reference in New Issue
Block a user