-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from bgpkit/feature-as2org
Feature AS inforomation lookup
- Loading branch information
Showing
9 changed files
with
680 additions
and
40 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
[package] | ||
name = "monocle" | ||
version = "0.0.3" | ||
version = "0.0.4" | ||
authors = ["Mingwei Zhang <[email protected]>"] | ||
edition = "2021" | ||
readme = "README.md" | ||
license = "MIT" | ||
repository = "https://github.com/bgpkit/monocle" | ||
documentation = "https://docs.rs/monocle" | ||
description = """ | ||
A commandline application to search, parse, and process BGP information stored in MRT files. | ||
A commandline application to search, parse, and process BGP information in public sources. | ||
""" | ||
keywords = ["bgp", "bgpkit", "mrt"] | ||
|
||
|
@@ -31,4 +31,11 @@ chrono = "0.4" | |
anyhow = "1.0" | ||
tabled = "0.7" | ||
config = {version = "0.13.1", features = ["toml"]} | ||
dirs = "4" | ||
dirs = "4" | ||
rusqlite = { version = "0.28.0", features = ["bundled"] } | ||
reqwest = {version = "0.11", features = ["blocking"]} | ||
flate2 = "1" | ||
regex = "1.6.0" | ||
|
||
[features] | ||
scouter = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
See through all BGP data with a monocle. | ||
|
||
![](https://spaces.bgpkit.org/assets/monocle/monocle-200px.jpg) | ||
![](https://spaces.bgpkit.org/assets/monocle/monocle-emoji.png) | ||
|
||
*Still in early prototype phase. You are warned.* | ||
|
||
|
@@ -18,30 +18,36 @@ Subcommands: | |
- `parse`: parse individual MRT files | ||
- `search`: search for matching messages from all available public MRT files | ||
- `time`: utility to convert time between unix timestamp and RFC3339 string | ||
- `whois`: search AS and organization information by ASN or name | ||
|
||
Top-level help menu: | ||
```text | ||
monocle 0.0.1 | ||
➜ ~ monocle | ||
monocle 0.0.4 | ||
Mingwei Zhang <[email protected]> | ||
A commandline application to search, parse, and process BGP information stored in MRT files. | ||
A commandline application to search, parse, and process BGP information in public sources. | ||
USAGE: | ||
monocle <SUBCOMMAND> | ||
monocle [OPTIONS] <SUBCOMMAND> | ||
OPTIONS: | ||
-h, --help Print help information | ||
-V, --version Print version information | ||
-c, --config <CONFIG> configuration file path, by default $HOME/.monocle.toml is used | ||
--debug Print debug information | ||
-h, --help Print help information | ||
-V, --version Print version information | ||
SUBCOMMANDS: | ||
help Print this message or the help of the given subcommand(s) | ||
parse Parse individual MRT files given a file path, local or remote | ||
scouter Investigative toolbox | ||
search Search BGP messages from all available public MRT files | ||
time Time conversion utilities | ||
help Print this message or the help of the given subcommand(s) | ||
parse Parse individual MRT files given a file path, local or remote | ||
search Search BGP messages from all available public MRT files | ||
time Time conversion utilities | ||
whois ASN and organization lookup utility | ||
``` | ||
|
||
### `monocle parse` | ||
|
||
Parsing single MRT file given a local path or a remote URL. | ||
|
||
```text | ||
➜ monocle git:(main) ✗ monocle parse --help | ||
monocle-parse 0.0.1 | ||
|
@@ -72,6 +78,9 @@ OPTIONS: | |
|
||
### `monocle search` | ||
|
||
Search for BGP messages across publicly available BGP route collectors and parse relevant | ||
MRT files in parallel. More filters can be used to search for messages that match your criteria. | ||
|
||
```text | ||
➜ monocle git:(main) ✗ monocle search --help | ||
monocle-search 0.0.1 | ||
|
@@ -101,6 +110,8 @@ OPTIONS: | |
|
||
### `monocle time` | ||
|
||
Convert between UNIX timestamp and RFC3339 time strings. | ||
|
||
```text | ||
➜ ~ monocle time --help | ||
monocle-time 0.0.3 | ||
|
@@ -144,6 +155,46 @@ Example runs: | |
Input time must be either Unix timestamp or time string compliant with RFC3339 | ||
``` | ||
|
||
### `monocle whois` | ||
|
||
Search AS/organization-level information with ASN or organization name. | ||
|
||
```text | ||
➜ ~ monocle whois --help | ||
monocle-whois 0.0.4 | ||
ASN and organization lookup utility | ||
USAGE: | ||
monocle whois [OPTIONS] <QUERY> | ||
ARGS: | ||
<QUERY> Search query, an ASN (e.g. "400644") or a name (e.g. "bgpkit") | ||
OPTIONS: | ||
-a, --asn-only Search by ASN only | ||
-h, --help Print help information | ||
-n, --name-only Search AS and Org name only | ||
-u, --update Refresh local as2org database | ||
-V, --version Print version information | ||
``` | ||
|
||
Example queries: | ||
```text | ||
➜ ~ monocle whois 400644 | ||
+--------+------------+------------+--------------+-------------+----------+ | ||
| asn | as_name | org_name | org_id | org_country | org_size | | ||
+--------+------------+------------+--------------+-------------+----------+ | ||
| 400644 | BGPKIT-LLC | BGPKIT LLC | BL-1057-ARIN | US | 1 | | ||
+--------+------------+------------+--------------+-------------+----------+ | ||
➜ ~ monocle whois bgpkit | ||
+--------+------------+------------+--------------+-------------+----------+ | ||
| asn | as_name | org_name | org_id | org_country | org_size | | ||
+--------+------------+------------+--------------+-------------+----------+ | ||
| 400644 | BGPKIT-LLC | BGPKIT LLC | BL-1057-ARIN | US | 1 | | ||
+--------+------------+------------+--------------+-------------+----------+ | ||
``` | ||
|
||
## Built with ❤️ by BGPKIT Team | ||
|
||
BGPKIT is a small-team focuses on building the best open-source tooling for BGP data processing in Rust. We have over 10 years of | ||
|
Oops, something went wrong.