From 43b878e0d1ae74dc44d0ec51ce16a23fc6896a61 Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Wed, 2 Sep 2020 22:31:23 -0500 Subject: [PATCH] Initial commit. --- .gitignore | 2 + .vscode/launch.json | 19 + .vscode/tasks.json | 15 + Cargo.lock | 1844 +++++++++++++++++++++++++++++++++++++ Cargo.toml | 37 + src/args.rs | 72 ++ src/cli.yml | 84 ++ src/defaults.rs | 1957 ++++++++++++++++++++++++++++++++++++++++ src/errors.rs | 2 + src/files.rs | 81 ++ src/lib.rs | 21 + src/logger.rs | 121 +++ src/logic.rs | 31 + src/main.rs | 46 + src/misc.rs | 34 + src/networking.rs | 68 ++ src/nmap.rs | 183 ++++ src/resolver_engine.rs | 234 +++++ src/structs.rs | 41 + 19 files changed, 4892 insertions(+) create mode 100644 .gitignore create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 src/args.rs create mode 100644 src/cli.yml create mode 100644 src/defaults.rs create mode 100644 src/errors.rs create mode 100644 src/files.rs create mode 100644 src/lib.rs create mode 100644 src/logger.rs create mode 100644 src/logic.rs create mode 100644 src/main.rs create mode 100644 src/misc.rs create mode 100644 src/networking.rs create mode 100644 src/nmap.rs create mode 100644 src/resolver_engine.rs create mode 100644 src/structs.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d8bd773 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/target +*.txt \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..5d2c43b --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,19 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "lldb", + "request": "launch", + "name": "Debug", + "program": "${workspaceRoot}/target/debug/${workspaceRootFolderName}", + "args": "-f targets.txt -u log.csv --resolvers resolvers.txt --iport 1 --lport 10000 --min-rate 10", + "cwd": "${workspaceRoot}", + "sourceLanguages": [ + "rust" + ] + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..568d43d --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,15 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "type": "shell", + "command": "cargo build", + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": [] + } + ] +} \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..f58fbe0 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,1844 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +[[package]] +name = "addr2line" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b6a2d3371669ab3ca9797670853d61402b03d0b4b9ebf33d677dfa720203072" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" + +[[package]] +name = "aho-corasick" +version = "0.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "043164d8ba5c4c3035fec9bbee8647c0261d788f3474306f93bb65901cae0e86" +dependencies = [ + "memchr", +] + +[[package]] +name = "ansi_term" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +dependencies = [ + "winapi 0.3.9", +] + +[[package]] +name = "arrayref" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" + +[[package]] +name = "arrayvec" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" + +[[package]] +name = "async-trait" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "687c230d85c0a52504709705fc8a53e4a692b83a2184f03dae73e38e1e93a783" +dependencies = [ + "proc-macro2 1.0.19", + "quote 1.0.7", + "syn 1.0.39", +] + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi", + "libc", + "winapi 0.3.9", +] + +[[package]] +name = "autocfg" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" + +[[package]] +name = "autocfg" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" + +[[package]] +name = "backtrace" +version = "0.3.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46254cf2fdcdf1badb5934448c1bcbe046a56537b3987d96c51a7afc5d03f293" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base64" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" + +[[package]] +name = "bitflags" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" + +[[package]] +name = "blake2b_simd" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8fb2d74254a3a0b5cac33ac9f8ed0e44aa50378d9dbb2e5d83bd21ed1dc2c8a" +dependencies = [ + "arrayref", + "arrayvec", + "constant_time_eq", +] + +[[package]] +name = "bstr" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31accafdb70df7871592c058eca3985b71104e15ac32f64706022c58867da931" +dependencies = [ + "lazy_static", + "memchr", + "regex-automata", + "serde 1.0.115", +] + +[[package]] +name = "byteorder" +version = "1.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" + +[[package]] +name = "bytes" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" + +[[package]] +name = "cc" +version = "1.0.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66120af515773fb005778dc07c261bd201ec8ce50bd6e7144c927753fe013381" + +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + +[[package]] +name = "chrono" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "942f72db697d8767c22d46a598e01f2d3b475501ea43d0db4f16d90259182d0b" +dependencies = [ + "num-integer", + "num-traits 0.2.12", + "time", +] + +[[package]] +name = "clap" +version = "2.33.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" +dependencies = [ + "ansi_term", + "atty", + "bitflags", + "strsim", + "textwrap", + "unicode-width", + "vec_map", + "yaml-rust 0.3.5", +] + +[[package]] +name = "cloudabi" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +dependencies = [ + "bitflags", +] + +[[package]] +name = "colored" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4ffc801dacf156c5854b9df4f425a626539c3a6ef7893cc0c5084a23f0b6c59" +dependencies = [ + "atty", + "lazy_static", + "winapi 0.3.9", +] + +[[package]] +name = "config" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b076e143e1d9538dde65da30f8481c2a6c44040edb8e02b9bf1351edb92ce3" +dependencies = [ + "lazy_static", + "nom", + "rust-ini", + "serde 1.0.115", + "serde-hjson", + "serde_json", + "toml", + "yaml-rust 0.4.4", +] + +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + +[[package]] +name = "crossbeam-channel" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ee0cc8804d5393478d743b035099520087a5186f3b93fa58cec08fa62407b6" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", + "maybe-uninit", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" +dependencies = [ + "autocfg 1.0.1", + "cfg-if", + "crossbeam-utils", + "lazy_static", + "maybe-uninit", + "memoffset", + "scopeguard", +] + +[[package]] +name = "crossbeam-utils" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" +dependencies = [ + "autocfg 1.0.1", + "cfg-if", + "lazy_static", +] + +[[package]] +name = "csv" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00affe7f6ab566df61b4be3ce8cf16bc2576bca0963ceb0955e45d514bf9a279" +dependencies = [ + "bstr", + "csv-core", + "itoa", + "ryu", + "serde 1.0.115", +] + +[[package]] +name = "csv-core" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" +dependencies = [ + "memchr", +] + +[[package]] +name = "curl" +version = "0.4.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78baca05127a115136a9898e266988fc49ca7ea2c839f60fc6e1fc9df1599168" +dependencies = [ + "curl-sys", + "libc", + "openssl-probe", + "openssl-sys", + "schannel", + "socket2", + "winapi 0.3.9", +] + +[[package]] +name = "curl-sys" +version = "0.4.36+curl-7.71.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68cad94adeb0c16558429c3c34a607acc9ea58e09a7b66310aabc9788fc5d721" +dependencies = [ + "cc", + "libc", + "libz-sys", + "openssl-sys", + "pkg-config", + "vcpkg", + "winapi 0.3.9", +] + +[[package]] +name = "dirs" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fd78930633bd1c6e35c4b42b1df7b0cbc6bc191146e512bb3bedf243fcc3901" +dependencies = [ + "libc", + "redox_users", + "winapi 0.3.9", +] + +[[package]] +name = "either" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd56b59865bce947ac5958779cfa508f6c3b9497cc762b7e24a12d11ccde2c4f" + +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + +[[package]] +name = "enum-as-inner" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c5f0096a91d210159eceb2ff5e1c4da18388a170e1e3ce948aac9c8fdbbf595" +dependencies = [ + "heck", + "proc-macro2 1.0.19", + "quote 1.0.7", + "syn 1.0.39", +] + +[[package]] +name = "failure" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" +dependencies = [ + "backtrace", + "failure_derive", +] + +[[package]] +name = "failure_derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" +dependencies = [ + "proc-macro2 1.0.19", + "quote 1.0.7", + "syn 1.0.39", + "synstructure", +] + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "fuchsia-cprng" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" + +[[package]] +name = "fuchsia-zircon" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +dependencies = [ + "bitflags", + "fuchsia-zircon-sys", +] + +[[package]] +name = "fuchsia-zircon-sys" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" + +[[package]] +name = "futf" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c9c1ce3fa9336301af935ab852c437817d14cd33690446569392e65170aac3b" +dependencies = [ + "mac", + "new_debug_unreachable", +] + +[[package]] +name = "futures" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e05b85ec287aac0dc34db7d4a569323df697f9c55b99b15d6b4ef8cde49f613" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f366ad74c28cca6ba456d95e6422883cfb4b252a83bed929c83abfdbbf2967d5" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59f5fff90fd5d971f936ad674802482ba441b6f09ba5e15fd8b39145582ca399" + +[[package]] +name = "futures-io" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de27142b013a8e869c14957e6d2edeef89e97c289e69d042ee3a49acd8b51789" + +[[package]] +name = "futures-sink" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f2032893cb734c7a05d85ce0cc8b8c4075278e93b24b66f9de99d6eb0fa8acc" + +[[package]] +name = "futures-task" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb66b5f09e22019b1ab0830f7785bcea8e7a42148683f99214f73f8ec21a626" +dependencies = [ + "once_cell", +] + +[[package]] +name = "futures-util" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8764574ff08b701a084482c3c7031349104b07ac897393010494beaa18ce32c6" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-sink", + "futures-task", + "memchr", + "pin-project", + "pin-utils", + "slab", +] + +[[package]] +name = "getrandom" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + +[[package]] +name = "gimli" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724" + +[[package]] +name = "heck" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "hermit-abi" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3deed196b6e7f9e44a2ae8d94225d80302d81208b1bb673fd21fe634645c85a9" +dependencies = [ + "libc", +] + +[[package]] +name = "hostname" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" +dependencies = [ + "libc", + "match_cfg", + "winapi 0.3.9", +] + +[[package]] +name = "html5ever" +version = "0.22.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c213fa6a618dc1da552f54f85cba74b05d8e883c92ec4e89067736938084c26e" +dependencies = [ + "log", + "mac", + "markup5ever", + "proc-macro2 0.4.30", + "quote 0.6.13", + "syn 0.15.44", +] + +[[package]] +name = "idna" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" +dependencies = [ + "matches", + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "iovec" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" +dependencies = [ + "libc", +] + +[[package]] +name = "ipconfig" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7e2f18aece9709094573a9f24f483c4f65caa4298e2f7ae1b71cc65d853fad7" +dependencies = [ + "socket2", + "widestring", + "winapi 0.3.9", + "winreg", +] + +[[package]] +name = "itoa" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" + +[[package]] +name = "kernel32-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +dependencies = [ + "winapi 0.2.8", + "winapi-build", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "lexical-core" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db65c6da02e61f55dae90a0ae427b2a5f6b3e8db09f58d10efab23af92592616" +dependencies = [ + "arrayvec", + "bitflags", + "cfg-if", + "ryu", + "static_assertions", +] + +[[package]] +name = "libc" +version = "0.2.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "755456fae044e6fa1ebbbd1b3e902ae19e73097ed4ed87bb79934a867c007bc3" + +[[package]] +name = "libz-sys" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b34178653005c1181711c333f0e5604a14a1b5115c814fd42304bdd16245e0" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linked-hash-map" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d262045c5b87c0861b3f004610afd0e2c851e2908d08b6c870cbb9d5f494ecd" +dependencies = [ + "serde 0.8.23", + "serde_test", +] + +[[package]] +name = "linked-hash-map" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dd5a6d5999d9907cda8ed67bbd137d3af8085216c2ac62de5be860bd41f304a" + +[[package]] +name = "log" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "lru-cache" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" +dependencies = [ + "linked-hash-map 0.5.3", +] + +[[package]] +name = "mac" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" + +[[package]] +name = "markup5ever" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897636f9850c3eef4905a5540683ed53dc9393860f0846cab2c2ddf9939862ff" +dependencies = [ + "phf", + "phf_codegen", + "serde 1.0.115", + "serde_derive", + "serde_json", + "string_cache", + "string_cache_codegen", + "tendril", +] + +[[package]] +name = "match_cfg" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" + +[[package]] +name = "matches" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" + +[[package]] +name = "maybe-uninit" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" + +[[package]] +name = "memchr" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" + +[[package]] +name = "memoffset" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c198b026e1bbf08a937e94c6c60f9ec4a2267f5b0d2eec9c1b21b061ce2be55f" +dependencies = [ + "autocfg 1.0.1", +] + +[[package]] +name = "miniz_oxide" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d7559a8a40d0f97e1edea3220f698f78b1c5ab67532e49f68fde3910323b722" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.6.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430" +dependencies = [ + "cfg-if", + "fuchsia-zircon", + "fuchsia-zircon-sys", + "iovec", + "kernel32-sys", + "libc", + "log", + "miow", + "net2", + "slab", + "winapi 0.2.8", +] + +[[package]] +name = "miow" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" +dependencies = [ + "kernel32-sys", + "net2", + "winapi 0.2.8", + "ws2_32-sys", +] + +[[package]] +name = "net2" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ba7c918ac76704fb42afcbbb43891e72731f3dcca3bef2a19786297baf14af7" +dependencies = [ + "cfg-if", + "libc", + "winapi 0.3.9", +] + +[[package]] +name = "new_debug_unreachable" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" + +[[package]] +name = "nom" +version = "5.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" +dependencies = [ + "lexical-core", + "memchr", + "version_check", +] + +[[package]] +name = "num-integer" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d59457e662d541ba17869cf51cf177c0b5f0cbf476c66bdc90bf1edac4f875b" +dependencies = [ + "autocfg 1.0.1", + "num-traits 0.2.12", +] + +[[package]] +name = "num-traits" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" +dependencies = [ + "num-traits 0.2.12", +] + +[[package]] +name = "num-traits" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611" +dependencies = [ + "autocfg 1.0.1", +] + +[[package]] +name = "num_cpus" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "object" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5" + +[[package]] +name = "once_cell" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "260e51e7efe62b592207e9e13a68e43692a7a279171d6ba57abd208bf23645ad" + +[[package]] +name = "openssl" +version = "0.10.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d575eff3665419f9b83678ff2815858ad9d11567e082f5ac1814baba4e2bcb4" +dependencies = [ + "bitflags", + "cfg-if", + "foreign-types", + "lazy_static", + "libc", + "openssl-sys", +] + +[[package]] +name = "openssl-probe" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" + +[[package]] +name = "openssl-src" +version = "111.10.2+1.1.1g" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a287fdb22e32b5b60624d4a5a7a02dbe82777f730ec0dbc42a0554326fef5a70" +dependencies = [ + "cc", +] + +[[package]] +name = "openssl-sys" +version = "0.9.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a842db4709b604f0fe5d1170ae3565899be2ad3d9cbc72dedc789ac0511f78de" +dependencies = [ + "autocfg 1.0.1", + "cc", + "libc", + "openssl-src", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "percent-encoding" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" + +[[package]] +name = "phf" +version = "0.7.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3da44b85f8e8dfaec21adae67f95d93244b2ecf6ad2a692320598dcc8e6dd18" +dependencies = [ + "phf_shared", +] + +[[package]] +name = "phf_codegen" +version = "0.7.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b03e85129e324ad4166b06b2c7491ae27fe3ec353af72e72cd1654c7225d517e" +dependencies = [ + "phf_generator", + "phf_shared", +] + +[[package]] +name = "phf_generator" +version = "0.7.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09364cc93c159b8b06b1f4dd8a4398984503483891b0c26b867cf431fb132662" +dependencies = [ + "phf_shared", + "rand 0.6.5", +] + +[[package]] +name = "phf_shared" +version = "0.7.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "234f71a15de2288bcb7e3b6515828d22af7ec8598ee6d24c3b526fa0a80b67a0" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pin-project" +version = "0.4.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca4433fff2ae79342e497d9f8ee990d174071408f28f726d6d83af93e58e48aa" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "0.4.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c0e815c3ee9a031fdf5af21c10aa17c573c9c6a566328d99e3936c34e36461f" +dependencies = [ + "proc-macro2 1.0.19", + "quote 1.0.7", + "syn 1.0.39", +] + +[[package]] +name = "pin-project-lite" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282adbf10f2698a7a77f8e983a74b2d18176c19a7fd32a45446139ae7b02b715" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d36492546b6af1463394d46f0c834346f31548646f6ba10849802c9c9a27ac33" + +[[package]] +name = "ppv-lite86" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c36fa947111f5c62a733b652544dd0016a43ce89619538a8ef92724a6f501a20" + +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + +[[package]] +name = "prettytable-rs" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fd04b170004fa2daccf418a7f8253aaf033c27760b5f225889024cf66d7ac2e" +dependencies = [ + "atty", + "csv", + "encode_unicode", + "lazy_static", + "term", + "unicode-width", +] + +[[package]] +name = "proc-macro2" +version = "0.4.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" +dependencies = [ + "unicode-xid 0.1.0", +] + +[[package]] +name = "proc-macro2" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04f5f085b5d71e2188cb8271e5da0161ad52c3f227a661a3c135fdf28e258b12" +dependencies = [ + "unicode-xid 0.2.1", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quote" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" +dependencies = [ + "proc-macro2 0.4.30", +] + +[[package]] +name = "quote" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" +dependencies = [ + "proc-macro2 1.0.19", +] + +[[package]] +name = "rand" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" +dependencies = [ + "autocfg 0.1.7", + "libc", + "rand_chacha 0.1.1", + "rand_core 0.4.2", + "rand_hc 0.1.0", + "rand_isaac", + "rand_jitter", + "rand_os", + "rand_pcg", + "rand_xorshift", + "winapi 0.3.9", +] + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc 0.2.0", +] + +[[package]] +name = "rand_chacha" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" +dependencies = [ + "autocfg 0.1.7", + "rand_core 0.3.1", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_core" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" +dependencies = [ + "rand_core 0.4.2", +] + +[[package]] +name = "rand_core" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rand_hc" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_isaac" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "rand_jitter" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" +dependencies = [ + "libc", + "rand_core 0.4.2", + "winapi 0.3.9", +] + +[[package]] +name = "rand_os" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" +dependencies = [ + "cloudabi", + "fuchsia-cprng", + "libc", + "rand_core 0.4.2", + "rdrand", + "winapi 0.3.9", +] + +[[package]] +name = "rand_pcg" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" +dependencies = [ + "autocfg 0.1.7", + "rand_core 0.4.2", +] + +[[package]] +name = "rand_xorshift" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "rayon" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfd016f0c045ad38b5251be2c9c0ab806917f82da4d36b2a327e5166adad9270" +dependencies = [ + "autocfg 1.0.1", + "crossbeam-deque", + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91739a34c4355b5434ce54c9086c5895604a9c278586d1f1aa95e04f66b525a0" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-utils", + "lazy_static", + "num_cpus", +] + +[[package]] +name = "rdrand" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "redox_syscall" +version = "0.1.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" + +[[package]] +name = "redox_users" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d" +dependencies = [ + "getrandom", + "redox_syscall", + "rust-argon2", +] + +[[package]] +name = "regex" +version = "1.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", + "thread_local", +] + +[[package]] +name = "regex-automata" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae1ded71d66a4a97f5e961fd0cb25a5f366a42a41570d16a763a69c092c26ae4" +dependencies = [ + "byteorder", +] + +[[package]] +name = "regex-syntax" +version = "0.6.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8" + +[[package]] +name = "resolv-conf" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11834e137f3b14e309437a8276714eed3a80d1ef894869e510f2c0c0b98b9f4a" +dependencies = [ + "hostname", + "quick-error", +] + +[[package]] +name = "rust-argon2" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dab61250775933275e84053ac235621dfb739556d5c54a2f2e9313b7cf43a19" +dependencies = [ + "base64", + "blake2b_simd", + "constant_time_eq", + "crossbeam-utils", +] + +[[package]] +name = "rust-ini" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e52c148ef37f8c375d49d5a73aa70713125b7f19095948a923f80afdeb22ec2" + +[[package]] +name = "rustc-demangle" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" + +[[package]] +name = "ryu" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" + +[[package]] +name = "schannel" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" +dependencies = [ + "lazy_static", + "winapi 0.3.9", +] + +[[package]] +name = "scopeguard" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + +[[package]] +name = "serde" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dad3f759919b92c3068c696c15c3d17238234498bbdcc80f2c469606f948ac8" + +[[package]] +name = "serde" +version = "1.0.115" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e54c9a88f2da7238af84b5101443f0c0d0a3bbdc455e34a5c9497b1903ed55d5" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde-hjson" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a3a4e0ea8a88553209f6cc6cfe8724ecad22e1acf372793c27d995290fe74f8" +dependencies = [ + "lazy_static", + "linked-hash-map 0.3.0", + "num-traits 0.1.43", + "regex", + "serde 0.8.23", +] + +[[package]] +name = "serde-xml-rs" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efe415925cf3d0bbb2fc47d09b56ce03eef51c5d56846468a39bcc293c7a846c" +dependencies = [ + "log", + "serde 1.0.115", + "thiserror", + "xml-rs", +] + +[[package]] +name = "serde_derive" +version = "1.0.115" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "609feed1d0a73cc36a0182a840a9b37b4a82f0b1150369f0536a9e3f2a31dc48" +dependencies = [ + "proc-macro2 1.0.19", + "quote 1.0.7", + "syn 1.0.39", +] + +[[package]] +name = "serde_json" +version = "1.0.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "164eacbdb13512ec2745fb09d51fd5b22b0d65ed294a1dcf7285a360c80a675c" +dependencies = [ + "itoa", + "ryu", + "serde 1.0.115", +] + +[[package]] +name = "serde_test" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "110b3dbdf8607ec493c22d5d947753282f3bae73c0f56d322af1e8c78e4c23d5" +dependencies = [ + "serde 0.8.23", +] + +[[package]] +name = "siphasher" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" + +[[package]] +name = "slab" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" + +[[package]] +name = "smallvec" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbee7696b84bbf3d89a1c2eccff0850e3047ed46bfcd2e92c29a2d074d57e252" + +[[package]] +name = "socket2" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "winapi 0.3.9", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "string_cache" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89c058a82f9fd69b1becf8c274f412281038877c553182f1d02eb027045a2d67" +dependencies = [ + "lazy_static", + "new_debug_unreachable", + "phf_shared", + "precomputed-hash", + "serde 1.0.115", + "string_cache_codegen", + "string_cache_shared", +] + +[[package]] +name = "string_cache_codegen" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f45ed1b65bf9a4bf2f7b7dc59212d1926e9eaf00fa998988e420fd124467c6" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2 1.0.19", + "quote 1.0.7", + "string_cache_shared", +] + +[[package]] +name = "string_cache_shared" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1884d1bc09741d466d9b14e6d37ac89d6909cbcac41dd9ae982d4d063bbedfc" + +[[package]] +name = "strsim" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" + +[[package]] +name = "syn" +version = "0.15.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" +dependencies = [ + "proc-macro2 0.4.30", + "quote 0.6.13", + "unicode-xid 0.1.0", +] + +[[package]] +name = "syn" +version = "1.0.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891d8d6567fe7c7f8835a3a98af4208f3846fba258c1bc3c31d6e506239f11f9" +dependencies = [ + "proc-macro2 1.0.19", + "quote 1.0.7", + "unicode-xid 0.2.1", +] + +[[package]] +name = "synstructure" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701" +dependencies = [ + "proc-macro2 1.0.19", + "quote 1.0.7", + "syn 1.0.39", + "unicode-xid 0.2.1", +] + +[[package]] +name = "tendril" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "707feda9f2582d5d680d733e38755547a3e8fb471e7ba11452ecfd9ce93a5d3b" +dependencies = [ + "futf", + "mac", + "utf-8", +] + +[[package]] +name = "term" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edd106a334b7657c10b7c540a0106114feadeb4dc314513e97df481d5d966f42" +dependencies = [ + "byteorder", + "dirs", + "winapi 0.3.9", +] + +[[package]] +name = "textwrap" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +dependencies = [ + "unicode-width", +] + +[[package]] +name = "thiserror" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dfdd070ccd8ccb78f4ad66bf1982dc37f620ef696c6b5028fe2ed83dd3d0d08" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd80fc12f73063ac132ac92aceea36734f04a1d93c1240c6944e23a3b8841793" +dependencies = [ + "proc-macro2 1.0.19", + "quote 1.0.7", + "syn 1.0.39", +] + +[[package]] +name = "thread_local" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "time" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" +dependencies = [ + "libc", + "wasi 0.10.0+wasi-snapshot-preview1", + "winapi 0.3.9", +] + +[[package]] +name = "tinyvec" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "238ce071d267c5710f9d31451efec16c5ee22de34df17cc05e56cbc92e967117" + +[[package]] +name = "tokio" +version = "0.2.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d34ca54d84bf2b5b4d7d31e901a8464f7b60ac145a284fba25ceb801f2ddccd" +dependencies = [ + "bytes", + "iovec", + "lazy_static", + "mio", + "pin-project-lite", + "slab", +] + +[[package]] +name = "toml" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" +dependencies = [ + "serde 1.0.115", +] + +[[package]] +name = "trust-dns-proto" +version = "0.19.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdd7061ba6f4d4d9721afedffbfd403f20f39a4301fee1b70d6fcd09cca69f28" +dependencies = [ + "async-trait", + "backtrace", + "enum-as-inner", + "futures", + "idna", + "lazy_static", + "log", + "rand 0.7.3", + "smallvec", + "thiserror", + "tokio", + "url", +] + +[[package]] +name = "trust-dns-resolver" +version = "0.19.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f23cdfdc3d8300b3c50c9e84302d3bd6d860fb9529af84ace6cf9665f181b77" +dependencies = [ + "backtrace", + "cfg-if", + "futures", + "ipconfig", + "lazy_static", + "log", + "lru-cache", + "resolv-conf", + "smallvec", + "thiserror", + "tokio", + "trust-dns-proto", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" +dependencies = [ + "matches", +] + +[[package]] +name = "unicode-normalization" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fb19cf769fa8c6a80a162df694621ebeb4dafb606470b2b2fce0be40a98a977" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-segmentation" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" + +[[package]] +name = "unicode-width" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" + +[[package]] +name = "unicode-xid" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" + +[[package]] +name = "unicode-xid" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" + +[[package]] +name = "unimap" +version = "0.1.0" +dependencies = [ + "atty", + "chrono", + "clap", + "colored", + "config", + "failure", + "lazy_static", + "log", + "openssl", + "prettytable-rs", + "rand 0.7.3", + "rayon", + "serde 1.0.115", + "serde-xml-rs", + "serde_derive", + "trust-dns-resolver", + "webpage", + "winapi 0.3.9", +] + +[[package]] +name = "url" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" +dependencies = [ + "idna", + "matches", + "percent-encoding", +] + +[[package]] +name = "utf-8" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05e42f7c18b8f902290b009cde6d651262f956c98bc51bca4cd1d511c9cd85c7" + +[[package]] +name = "vcpkg" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6454029bf181f092ad1b853286f23e2c507d8e8194d01d92da4a55c274a5508c" + +[[package]] +name = "vec_map" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" + +[[package]] +name = "version_check" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.10.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" + +[[package]] +name = "webpage" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520918a9a8388af7bd5ead603eac6bee26567cdae6c06a35f79d9e310c2aaf94" +dependencies = [ + "curl", + "html5ever", + "serde_json", +] + +[[package]] +name = "widestring" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a763e303c0e0f23b0da40888724762e802a8ffefbc22de4127ef42493c2ea68c" + +[[package]] +name = "winapi" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-build" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "winreg" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" +dependencies = [ + "winapi 0.3.9", +] + +[[package]] +name = "ws2_32-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" +dependencies = [ + "winapi 0.2.8", + "winapi-build", +] + +[[package]] +name = "xml-rs" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b07db065a5cf61a7e4ba64f29e67db906fb1787316516c4e6e5ff0fea1efcd8a" + +[[package]] +name = "yaml-rust" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e66366e18dc58b46801afbf2ca7661a9f59cc8c5962c29892b6039b4f86fa992" + +[[package]] +name = "yaml-rust" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39f0c922f1a334134dc2f7a8b67dc5d25f0735263feec974345ff706bcf20b0d" +dependencies = [ + "linked-hash-map 0.5.3", +] diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..6693b12 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,37 @@ +[package] +name = "unimap" +version = "0.1.0" +authors = ["Eduard Tolosa "] +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +trust-dns-resolver = "0.19.5" +rayon = "1.4.0" +log = { version = "0.4.11", features = ["std"] } +colored = { version = "1.9.3", optional = true } +rand = "0.7.3" +lazy_static = "1.4.0" +serde = { version = "1.0.114", features = ["derive"] } +serde_derive = "1.0.114" +prettytable-rs = "0.8.0" +serde-xml-rs = "0.4.0" +webpage = "1.1.0" +chrono = "0.4.15" +clap = { version = "2.33.1", features = ["yaml"] } +config = { version = "0.10.1", features = ["yaml", "json", "toml", "hjson", "ini"] } +failure = "0.1.8" + +[target.arm-unknown-linux-gnueabihf.dependencies] +openssl = { version = "0.10.30", features = ["vendored"] } + +[target.aarch64-unknown-linux-gnu.dependencies] +openssl = { version = "0.10.30", features = ["vendored"] } + +[target.armv7-unknown-linux-gnueabihf.dependencies] +openssl = { version = "0.10.30", features = ["vendored"] } + +[target.'cfg(windows)'.dependencies] +atty = "0.2.14" +winapi = { version = "0.3.9", features = ["handleapi", "winbase"] } diff --git a/src/args.rs b/src/args.rs new file mode 100644 index 0000000..fe8b152 --- /dev/null +++ b/src/args.rs @@ -0,0 +1,72 @@ +use { + crate::{ + defaults, + logic::validate_target, + misc::{return_matches_vec, sanitize_target_string}, + structs::Args, + }, + chrono::Utc, + clap::{load_yaml, value_t, App}, + std::{collections::HashSet, time::Instant}, +}; + +#[allow(clippy::cognitive_complexity)] +pub fn get_args() -> Args { + let yaml = load_yaml!("cli.yml"); + let matches = App::from_yaml(yaml) + .version(clap::crate_version!()) + .get_matches(); + + Args { + target: { + let target = sanitize_target_string( + value_t!(matches, "target", String).unwrap_or_else(|_| String::new()), + ); + if validate_target(&target) { + target + } else { + String::new() + } + }, + file_name: if matches.is_present("output") { + value_t!(matches, "logs-dir", String).unwrap_or_else(|_| "logs".to_string()) + + "/" + + "unimap" + + &Utc::now().format("-log-%Y-%m-%d_%H-%M-%S").to_string() + + ".csv" + } else if matches.is_present("unique-output") { + matches.value_of("unique-output").unwrap().to_string() + } else { + String::new() + }, + logs_dir: value_t!(matches, "logs-dir", String).unwrap_or_else(|_| "logs".to_string()), + threads: if (matches.is_present("port-scan") + || matches.is_present("initial-port") + || matches.is_present("last-port")) + && !matches.is_present("threads") + { + 30 + } else { + value_t!(matches, "threads", usize).unwrap_or_else(|_| 50) + }, + version: clap::crate_version!().to_string(), + initial_port: value_t!(matches, "initial-port", usize).unwrap_or_else(|_| 1), + last_port: value_t!(matches, "last-port", usize).unwrap_or_else(|_| 65535), + with_output: matches.is_present("output") || matches.is_present("unique-output"), + unique_output_flag: matches.is_present("unique-output"), + from_file_flag: matches.is_present("files"), + quiet_flag: matches.is_present("quiet"), + custom_resolvers: matches.is_present("custom-resolvers"), + custom_ports_range: matches.is_present("initial-port") || matches.is_present("last-port"), + fast_scan: matches.is_present("fast-scan"), + files: return_matches_vec(&matches, "files"), + min_rate: value_t!(matches, "min-rate", usize).unwrap_or_else(|_| 30000), + resolvers: if matches.is_present("custom-resolvers") { + return_matches_vec(&matches, "custom-resolvers") + } else { + defaults::ipv4_resolvers() + }, + targets: HashSet::new(), + time_wasted: Instant::now(), + } +} diff --git a/src/cli.yml b/src/cli.yml new file mode 100644 index 0000000..c7a70a5 --- /dev/null +++ b/src/cli.yml @@ -0,0 +1,84 @@ +name: Unimap +author: Eduard Tolosa +settings: + - ArgRequiredElseHelp + - StrictUtf8 +about: Scan only once by IP address. +args: + - target: + short: t + long: target + help: Target host. + takes_value: true + multiple: false + conflicts_with: + - files + + - files: + short: f + long: file + help: Use a list of targets writen in a file as input. + takes_value: true + multiple: true + conflicts_with: + - target + + - output: + short: o + long: output + help: Write to an output file. The name of the output file will be the target string with TXT format. + takes_value: false + + - unique-output: + short: u + long: unique-output + help: Write all the results for a target or a list of targets to a specified filename. + takes_value: true + multiple: false + conflicts_with: + - output + + - quiet: + short: q + long: quiet + help: Remove informative messages. + takes_value: false + + - threads: + help: Number of threads to use to perform the resolution. + long: threads + takes_value: true + + - custom-resolvers: + help: Path to a file (or files) containing a list of DNS IP address. If no specified then 1.6k of built-in valid DNS servers from public-dns.info are used. + long: resolvers + takes_value: true + multiple: true + + - initial-port: + help: Initial port to scan. Default 0. + long: iport + takes_value: true + multiple: false + + - last-port: + help: Last port to scan. Default 1000. + long: lport + takes_value: true + multiple: false + + - min-rate: + help: Nmap --min-rate value for ports scan. + long: min-rate + takes_value: true + + - fast-scan: + help: Use fast scanning for ports (no version detection). + long: fast-scan + takes_value: false + + - logs-dir: + help: Path to save the subdomains HTML data. + long: logs-dir + takes_value: true + multiple: false diff --git a/src/defaults.rs b/src/defaults.rs new file mode 100644 index 0000000..5a5d87f --- /dev/null +++ b/src/defaults.rs @@ -0,0 +1,1957 @@ +pub fn ipv4_resolvers() -> Vec { + // DNS were validate with dnsvalidator the 03/09/2020 + vec![ + "74.82.42.42", + "209.252.188.104", + "64.72.140.227", + "68.87.75.194", + "216.237.114.149", + "209.237.227.198", + "77.68.46.206", + "77.68.46.179", + "109.70.132.18", + "201.225.225.50", + "212.88.231.138", + "51.75.36.43", + "46.182.19.48", + "185.92.196.182", + "83.69.120.1", + "77.95.89.99", + "61.219.228.166", + "82.196.13.196", + "101.110.34.62", + "219.252.2.100", + "103.245.147.201", + "193.17.212.14", + "77.68.46.58", + "38.109.190.182", + "200.148.191.197", + "77.68.41.48", + "208.180.0.250", + "124.6.168.81", + "202.92.168.47", + "200.87.195.70", + "217.30.169.18", + "168.1.79.229", + "193.159.232.5", + "81.211.96.62", + "61.222.14.170", + "198.99.193.2", + "194.44.153.155", + "190.56.135.221", + "103.22.245.70", + "192.146.229.22", + "62.63.194.114", + "212.244.48.137", + "62.97.223.62", + "222.118.225.37", + "103.85.107.102", + "194.65.30.2", + "159.192.137.80", + "181.114.59.245", + "181.110.241.74", + "91.229.232.218", + "95.97.99.106", + "187.120.208.172", + "109.228.24.78", + "198.0.52.60", + "119.75.32.114", + "201.220.136.186", + "179.191.86.162", + "194.8.128.12", + "80.53.221.126", + "184.67.74.179", + "64.6.65.6", + "109.124.72.180", + "141.0.102.202", + "45.55.147.169", + "142.165.177.96", + "202.248.20.133", + "211.75.84.238", + "62.99.77.54", + "80.66.120.34", + "54.229.171.243", + "114.141.2.103", + "91.217.86.4", + "150.254.125.203", + "68.87.68.166", + "178.248.160.140", + "179.60.235.209", + "186.219.160.7", + "85.175.194.48", + "80.81.232.30", + "162.243.19.47", + "217.149.188.158", + "80.178.170.176", + "89.255.2.228", + "148.251.194.74", + "93.187.83.201", + "41.231.30.138", + "142.77.2.36", + "194.78.185.81", + "213.244.66.226", + "117.53.46.10", + "210.87.250.154", + "164.124.101.2", + "203.211.131.26", + "129.250.35.250", + "124.6.167.149", + "187.157.46.210", + "112.216.108.254", + "216.17.128.1", + "54.39.97.51", + "213.163.127.229", + "62.219.21.64", + "207.188.83.213", + "195.53.69.132", + "201.174.34.194", + "201.28.69.242", + "202.44.53.251", + "91.200.227.141", + "208.67.220.220", + "45.235.35.235", + "50.194.130.97", + "191.253.65.194", + "158.43.240.4", + "196.200.184.31", + "87.229.181.38", + "104.36.234.65", + "41.57.120.177", + "193.109.160.177", + "94.56.151.22", + "83.221.202.188", + "58.185.177.165", + "180.94.69.123", + "186.225.194.29", + "175.100.120.27", + "76.164.163.150", + "51.83.147.174", + "109.70.207.80", + "82.208.99.185", + "200.196.57.42", + "79.190.224.27", + "193.95.93.243", + "61.83.152.140", + "31.133.9.213", + "185.98.244.214", + "9.9.9.12", + "46.105.55.84", + "202.43.162.100", + "177.159.232.52", + "199.85.126.10", + "207.35.8.163", + "61.19.42.5", + "144.76.83.104", + "68.87.73.242", + "157.92.190.15", + "93.95.215.84", + "203.126.238.211", + "41.225.15.201", + "147.97.16.66", + "97.64.150.73", + "203.141.131.66", + "103.16.128.53", + "62.82.213.91", + "192.232.128.20", + "85.88.19.10", + "24.181.107.227", + "217.8.34.70", + "82.194.76.71", + "69.20.190.253", + "131.220.20.199", + "137.59.155.14", + "211.75.84.234", + "209.213.232.32", + "211.181.233.206", + "156.154.71.1", + "68.87.73.246", + "200.45.184.43", + "62.122.103.59", + "89.171.68.66", + "193.109.163.202", + "37.235.70.59", + "81.1.217.134", + "207.179.3.26", + "103.196.124.1", + "186.194.224.82", + "77.68.45.252", + "103.113.200.10", + "210.63.146.133", + "173.244.83.5", + "194.170.223.73", + "119.59.112.202", + "91.223.120.25", + "109.228.7.94", + "68.87.77.130", + "125.227.152.121", + "79.143.180.116", + "177.67.81.134", + "203.127.232.194", + "117.122.125.106", + "194.247.25.110", + "193.26.6.215", + "117.54.10.217", + "60.249.212.149", + "64.84.120.1", + "91.229.232.57", + "201.174.34.195", + "37.235.1.174", + "209.141.60.226", + "200.99.138.13", + "59.124.115.19", + "202.62.11.75", + "170.247.211.253", + "114.4.109.102", + "202.175.89.60", + "176.67.0.60", + "62.97.123.106", + "92.46.49.13", + "221.163.74.11", + "65.73.54.2", + "201.116.184.131", + "171.25.229.166", + "213.184.147.26", + "199.255.95.193", + "213.191.151.178", + "65.111.169.166", + "80.67.169.12", + "218.188.215.94", + "62.97.196.149", + "64.128.251.228", + "193.252.175.10", + "79.161.49.34", + "5.102.56.38", + "89.236.213.118", + "212.100.143.211", + "198.251.100.2", + "206.251.24.16", + "91.205.144.27", + "59.124.69.205", + "91.235.168.254", + "46.231.210.26", + "162.221.207.228", + "51.15.98.97", + "200.110.130.195", + "209.211.254.19", + "115.178.73.100", + "189.55.193.173", + "202.44.45.11", + "82.223.210.111", + "124.6.167.91", + "193.15.1.54", + "159.255.193.22", + "198.175.228.44", + "212.170.159.10", + "50.78.210.9", + "216.169.187.240", + "92.36.225.9", + "121.202.228.25", + "138.204.13.243", + "94.247.43.254", + "93.62.200.35", + "45.33.97.5", + "210.245.89.21", + "113.197.68.20", + "194.224.52.37", + "202.49.127.71", + "181.224.225.3", + "211.105.7.5", + "217.75.213.19", + "90.188.10.193", + "104.131.37.180", + "31.47.196.210", + "103.254.106.166", + "200.105.133.162", + "200.37.71.2", + "202.58.199.170", + "202.46.34.75", + "178.20.112.23", + "211.72.210.250", + "41.226.252.81", + "190.11.225.2", + "175.139.150.29", + "130.244.126.100", + "189.113.132.101", + "193.200.69.233", + "45.71.185.100", + "54.252.183.4", + "77.68.45.191", + "98.102.1.125", + "109.70.207.44", + "200.178.216.67", + "85.90.160.69", + "89.233.43.71", + "195.8.8.1", + "119.160.80.164", + "200.222.51.208", + "62.28.175.214", + "98.101.120.225", + "93.123.112.99", + "195.88.203.248", + "200.169.8.1", + "202.40.179.6", + "188.0.173.134", + "203.231.29.131", + "124.6.190.28", + "178.237.152.146", + "209.244.0.3", + "109.123.19.5", + "115.127.19.137", + "45.64.60.185", + "213.32.68.137", + "142.77.2.85", + "188.118.227.21", + "124.6.164.69", + "114.114.115.115", + "109.228.9.40", + "162.247.147.98", + "213.171.217.148", + "64.107.45.5", + "82.211.160.58", + "198.175.228.33", + "193.230.183.201", + "114.114.115.119", + "158.193.86.29", + "125.141.144.67", + "41.221.186.250", + "200.172.90.4", + "213.182.60.11", + "200.41.191.126", + "194.179.1.101", + "95.129.96.154", + "92.103.144.222", + "194.247.190.70", + "217.13.116.5", + "93.63.229.132", + "177.135.204.163", + "77.68.92.54", + "84.124.52.46", + "194.68.117.129", + "145.253.95.37", + "213.156.49.106", + "113.59.228.125", + "169.53.182.120", + "213.5.120.2", + "81.3.169.172", + "200.142.160.54", + "66.76.13.250", + "85.30.174.220", + "190.57.233.101", + "64.9.50.67", + "194.168.4.123", + "194.243.154.57", + "79.141.83.250", + "211.75.48.98", + "211.179.185.237", + "168.126.63.1", + "193.33.224.253", + "181.14.195.114", + "124.6.173.69", + "37.59.80.218", + "134.153.233.140", + "79.187.201.181", + "202.86.129.98", + "80.83.162.11", + "85.19.217.194", + "216.228.104.3", + "162.248.241.94", + "74.203.248.220", + "169.38.73.5", + "217.13.80.252", + "200.248.178.54", + "122.56.105.82", + "124.6.147.164", + "201.45.193.131", + "177.131.114.86", + "177.135.205.210", + "177.130.60.40", + "200.162.136.138", + "64.6.64.6", + "68.87.64.146", + "161.200.96.9", + "62.212.113.125", + "187.32.81.223", + "125.212.202.19", + "23.101.74.156", + "65.111.169.164", + "83.240.158.216", + "195.235.225.10", + "62.134.17.82", + "217.170.133.134", + "139.99.40.107", + "203.180.100.14", + "200.220.192.88", + "115.127.19.129", + "202.44.55.66", + "91.229.232.58", + "210.59.209.19", + "104.152.211.99", + "188.227.240.58", + "194.224.52.36", + "62.146.202.2", + "194.224.229.56", + "209.237.227.203", + "61.125.143.90", + "202.4.188.227", + "123.30.235.111", + "124.6.167.183", + "193.183.18.21", + "8.15.12.5", + "193.252.10.2", + "111.92.237.107", + "190.104.199.129", + "69.60.134.50", + "15.206.75.44", + "216.237.114.148", + "148.78.200.7", + "37.29.119.100", + "80.55.253.114", + "103.77.188.19", + "188.122.90.219", + "188.128.110.66", + "91.117.103.227", + "92.154.30.50", + "186.216.62.5", + "88.151.140.202", + "210.48.77.68", + "156.154.70.1", + "217.108.101.30", + "81.27.162.100", + "85.93.212.2", + "80.250.60.241", + "170.210.83.110", + "103.15.62.69", + "64.2.142.22", + "209.200.117.42", + "213.229.161.85", + "91.229.232.216", + "61.47.34.4", + "176.28.107.12", + "85.30.180.144", + "1.1.1.1", + "1.241.172.70", + "116.125.119.2", + "203.209.127.103", + "62.160.100.242", + "82.127.168.41", + "168.9.128.14", + "181.48.29.108", + "69.24.197.9", + "190.105.152.28", + "88.204.180.222", + "88.157.200.129", + "66.162.39.114", + "112.171.175.135", + "107.191.48.176", + "80.78.237.33", + "50.203.152.202", + "176.103.130.130", + "60.249.37.54", + "81.82.196.44", + "24.181.107.231", + "1.0.0.1", + "177.43.76.244", + "95.85.108.141", + "195.77.162.220", + "186.148.128.86", + "188.165.245.118", + "83.103.61.107", + "101.110.50.106", + "68.87.76.182", + "212.23.64.92", + "201.247.40.58", + "194.250.200.153", + "80.78.237.4", + "9.9.9.11", + "92.60.50.40", + "62.251.167.196", + "189.124.138.68", + "5.103.179.10", + "72.51.45.108", + "209.209.217.168", + "210.227.116.101", + "91.208.193.1", + "195.88.154.11", + "62.196.2.70", + "103.224.162.40", + "212.145.159.96", + "222.118.225.33", + "109.73.88.54", + "213.108.122.97", + "173.167.215.62", + "158.43.128.1", + "85.214.20.141", + "88.151.179.6", + "194.158.78.137", + "76.72.248.34", + "91.203.177.216", + "124.6.188.231", + "212.19.96.2", + "124.6.175.129", + "206.212.241.14", + "177.19.217.206", + "88.208.248.13", + "68.87.68.162", + "103.28.113.6", + "5.83.92.254", + "185.222.222.222", + "40.86.216.160", + "37.152.45.194", + "212.247.9.100", + "43.245.180.22", + "95.104.194.3", + "211.194.150.11", + "31.3.112.165", + "24.229.250.113", + "14.35.201.12", + "62.94.0.41", + "177.85.176.140", + "109.70.207.146", + "200.221.11.101", + "91.229.232.7", + "80.80.80.80", + "43.249.196.93", + "166.130.64.29", + "187.32.81.194", + "178.88.161.200", + "95.154.98.171", + "202.29.172.153", + "117.53.44.238", + "161.200.65.9", + "148.235.82.66", + "62.28.227.166", + "80.179.155.145", + "108.179.34.214", + "187.33.230.114", + "74.120.24.81", + "95.87.252.178", + "193.190.213.42", + "109.228.7.95", + "87.96.144.179", + "217.128.152.57", + "193.238.75.217", + "220.130.145.66", + "216.55.99.221", + "78.156.159.132", + "212.9.28.233", + "68.87.74.162", + "131.100.36.162", + "193.251.169.83", + "164.77.245.34", + "46.254.14.12", + "212.118.241.33", + "109.228.17.231", + "198.153.194.1", + "85.93.217.105", + "217.195.211.116", + "84.200.70.40", + "67.79.47.3", + "195.189.130.1", + "211.214.160.228", + "177.20.178.12", + "60.251.1.50", + "60.248.94.66", + "180.94.94.194", + "195.198.13.186", + "212.163.193.3", + "103.232.65.73", + "46.246.29.69", + "118.163.51.86", + "139.59.219.245", + "212.66.129.108", + "200.179.97.194", + "124.6.165.253", + "103.87.160.66", + "217.77.71.1", + "210.71.250.93", + "62.40.32.33", + "190.4.63.110", + "193.110.252.21", + "65.111.169.169", + "200.115.141.136", + "217.115.40.123", + "213.184.224.254", + "84.54.226.50", + "58.27.149.70", + "219.166.58.234", + "81.211.21.98", + "125.227.62.229", + "216.106.1.2", + "62.152.66.26", + "82.253.23.73", + "187.188.112.16", + "46.228.199.116", + "124.6.165.95", + "212.118.241.1", + "89.255.2.227", + "78.228.158.48", + "202.147.193.110", + "103.194.120.33", + "195.53.69.148", + "173.167.215.57", + "87.103.120.164", + "168.126.93.10", + "124.6.169.87", + "124.219.73.220", + "109.228.0.51", + "202.46.34.74", + "85.113.208.130", + "208.67.222.222", + "59.124.189.250", + "75.103.119.77", + "5.57.148.177", + "186.193.181.226", + "201.30.200.141", + "213.182.187.65", + "212.230.255.1", + "66.175.146.133", + "193.79.242.39", + "84.53.244.67", + "213.24.237.210", + "210.61.2.99", + "207.179.3.25", + "41.225.236.101", + "5.9.172.92", + "193.58.204.59", + "185.68.179.183", + "159.69.114.157", + "195.234.239.130", + "80.228.9.26", + "201.149.3.110", + "110.45.158.83", + "68.216.230.2", + "43.240.229.194", + "193.126.26.67", + "59.125.7.96", + "69.20.190.209", + "78.136.66.5", + "209.237.227.195", + "178.210.102.193", + "213.82.20.188", + "179.127.175.242", + "83.170.202.226", + "109.70.207.43", + "203.235.1.3", + "109.92.22.97", + "103.61.69.185", + "217.18.206.22", + "186.179.241.146", + "192.100.164.125", + "165.227.162.76", + "211.193.163.251", + "81.95.125.20", + "218.145.160.73", + "193.2.246.9", + "89.255.2.226", + "211.107.234.129", + "193.110.60.3", + "213.13.125.138", + "66.6.128.111", + "200.105.253.170", + "77.34.10.67", + "103.13.31.240", + "212.91.32.6", + "59.124.72.210", + "60.236.29.52", + "95.154.173.200", + "185.43.135.1", + "86.36.50.135", + "121.176.16.144", + "103.8.27.14", + "81.83.4.154", + "218.38.58.185", + "1.242.63.131", + "103.209.52.250", + "217.13.116.4", + "9.9.9.9", + "203.230.200.2", + "106.240.228.50", + "189.254.4.147", + "177.36.152.171", + "194.42.198.199", + "80.15.35.59", + "194.78.250.42", + "177.184.131.54", + "178.150.114.97", + "103.22.245.50", + "121.152.231.196", + "130.185.242.224", + "1.1.141.30", + "195.46.186.75", + "177.86.233.170", + "62.149.176.8", + "85.214.98.185", + "177.159.232.50", + "194.145.240.7", + "87.229.187.110", + "91.229.232.10", + "212.31.32.131", + "103.29.44.1", + "186.160.127.29", + "212.31.32.130", + "88.213.251.98", + "124.6.167.4", + "111.93.163.56", + "222.122.43.43", + "182.171.247.189", + "128.8.221.10", + "195.77.252.34", + "178.33.255.52", + "193.238.102.55", + "194.125.133.11", + "62.28.103.134", + "62.85.160.208", + "94.190.183.145", + "92.247.24.30", + "85.66.180.84", + "140.116.86.51", + "213.242.237.69", + "93.187.83.200", + "159.134.248.17", + "78.7.251.131", + "188.92.209.129", + "24.181.107.226", + "212.124.226.242", + "211.188.11.201", + "31.47.196.211", + "37.99.224.30", + "199.85.127.20", + "77.193.70.146", + "185.126.246.17", + "184.71.101.186", + "187.1.175.86", + "109.69.8.51", + "91.205.3.65", + "189.89.165.114", + "109.228.8.250", + "216.38.105.6", + "209.225.106.43", + "51.75.250.34", + "82.80.196.156", + "195.55.127.169", + "101.255.56.249", + "62.181.235.45", + "212.119.193.78", + "194.172.160.4", + "1.1.1.3", + "121.202.135.11", + "23.226.80.100", + "83.174.232.18", + "103.114.24.19", + "69.90.142.11", + "109.202.11.6", + "59.125.15.236", + "75.103.118.14", + "62.93.184.194", + "62.86.183.222", + "218.102.23.228", + "46.19.103.248", + "218.103.92.84", + "200.174.105.3", + "213.0.77.8", + "208.80.0.62", + "194.213.61.98", + "109.228.4.246", + "62.153.165.107", + "217.12.181.97", + "190.56.163.189", + "68.87.72.134", + "64.132.94.250", + "168.187.46.242", + "217.182.198.203", + "124.6.167.35", + "195.88.203.251", + "86.48.98.10", + "129.71.254.12", + "178.237.150.2", + "93.91.140.127", + "195.243.214.4", + "190.128.224.236", + "84.199.232.98", + "64.127.83.170", + "175.117.145.35", + "80.228.63.124", + "190.57.238.43", + "200.252.235.20", + "80.248.193.165", + "164.100.138.248", + "193.226.61.1", + "131.100.182.222", + "182.71.213.139", + "216.106.88.3", + "91.229.232.30", + "201.247.58.46", + "213.195.214.123", + "41.228.66.65", + "202.175.113.124", + "77.89.232.86", + "81.246.5.131", + "221.157.68.100", + "198.190.61.1", + "109.228.8.12", + "95.155.226.229", + "14.63.217.213", + "108.162.46.243", + "194.7.15.70", + "198.50.212.61", + "194.213.40.45", + "203.8.201.10", + "81.23.225.34", + "89.23.192.109", + "89.236.217.93", + "41.202.163.74", + "83.166.175.220", + "212.244.78.90", + "223.165.64.97", + "203.126.107.195", + "212.152.166.82", + "202.158.38.162", + "207.172.157.201", + "163.24.162.3", + "61.78.35.206", + "211.18.198.110", + "81.180.117.110", + "91.143.212.70", + "80.71.178.68", + "213.24.238.26", + "90.183.151.107", + "195.8.8.2", + "84.200.69.80", + "139.59.218.207", + "213.91.221.2", + "194.7.138.41", + "204.193.157.31", + "92.245.149.39", + "78.130.38.222", + "180.76.76.76", + "62.251.175.254", + "197.159.166.83", + "213.124.119.218", + "124.6.164.213", + "115.249.253.81", + "24.48.219.154", + "177.155.135.81", + "188.40.115.29", + "195.167.205.68", + "177.43.35.247", + "69.59.209.34", + "207.99.19.69", + "211.72.106.204", + "51.75.125.29", + "213.11.172.45", + "213.181.166.26", + "203.146.26.8", + "8.8.4.4", + "209.50.14.35", + "77.68.45.190", + "202.145.243.2", + "190.109.224.227", + "177.124.247.2", + "204.70.127.127", + "61.111.22.2", + "114.29.234.235", + "206.51.143.55", + "195.162.8.154", + "116.212.96.75", + "205.171.202.66", + "199.88.158.1", + "46.171.32.54", + "212.75.208.170", + "84.91.197.19", + "83.171.107.52", + "83.145.86.7", + "213.171.110.153", + "186.215.192.243", + "74.207.1.50", + "103.47.134.195", + "62.97.204.18", + "200.223.129.162", + "216.46.141.99", + "125.227.243.159", + "122.155.6.206", + "200.99.138.103", + "213.229.188.142", + "77.68.36.51", + "83.103.36.213", + "62.233.128.17", + "62.146.25.130", + "91.137.135.75", + "4.0.0.53", + "118.219.234.144", + "193.77.138.83", + "86.53.112.126", + "66.199.241.115", + "84.52.103.114", + "209.252.188.103", + "61.8.0.113", + "84.18.156.85", + "83.246.140.204", + "61.60.85.66", + "82.134.16.250", + "82.148.207.170", + "119.201.155.161", + "77.68.44.26", + "195.26.152.19", + "207.47.132.29", + "190.8.168.1", + "91.147.96.169", + "206.165.6.12", + "182.19.95.34", + "12.166.247.4", + "94.138.192.35", + "211.129.155.175", + "199.29.211.1", + "90.183.151.106", + "62.28.183.147", + "189.125.73.13", + "177.15.67.65", + "193.194.70.66", + "109.225.91.208", + "210.1.31.42", + "80.72.49.57", + "204.15.52.15", + "59.125.86.230", + "148.251.92.241", + "62.244.115.228", + "124.6.167.115", + "212.33.190.217", + "122.146.127.199", + "200.150.112.58", + "90.83.2.169", + "216.136.95.2", + "202.158.49.187", + "164.42.183.3", + "195.22.25.130", + "211.72.109.235", + "68.87.75.198", + "205.171.202.25", + "65.48.143.44", + "170.239.213.68", + "195.129.12.122", + "190.211.104.93", + "89.26.249.19", + "109.234.248.8", + "185.66.9.142", + "61.209.255.131", + "75.150.235.81", + "8.8.8.8", + "62.2.121.88", + "216.173.178.83", + "209.211.254.18", + "193.29.2.4", + "24.75.156.4", + "5.102.56.177", + "5.103.15.184", + "77.74.160.119", + "119.205.210.61", + "80.80.81.81", + "189.2.56.3", + "124.6.173.53", + "27.123.22.82", + "87.233.226.243", + "210.198.30.122", + "59.124.71.99", + "190.128.225.58", + "217.112.27.34", + "124.6.164.175", + "89.236.235.54", + "189.125.18.5", + "193.67.79.39", + "37.128.169.249", + "210.1.58.21", + "200.37.71.3", + "195.76.233.2", + "187.75.155.116", + "194.135.230.86", + "194.7.1.4", + "5.128.91.49", + "103.142.212.235", + "95.140.194.110", + "200.119.192.58", + "122.200.254.203", + "62.91.19.67", + "62.149.128.4", + "154.70.151.66", + "82.151.69.146", + "213.11.172.52", + "50.199.43.137", + "77.89.230.9", + "62.116.228.39", + "212.34.241.14", + "83.223.44.125", + "202.139.96.50", + "1.209.43.1", + "66.159.120.158", + "193.95.93.77", + "61.33.234.2", + "200.68.18.204", + "64.247.161.186", + "83.233.135.188", + "93.104.195.2", + "201.73.200.3", + "61.78.35.202", + "64.212.106.85", + "204.187.78.254", + "200.162.142.66", + "96.31.223.110", + "124.6.169.181", + "195.130.65.20", + "210.232.183.3", + "212.230.255.129", + "195.46.39.40", + "210.243.188.127", + "200.87.146.151", + "210.190.105.66", + "103.123.226.10", + "196.43.199.61", + "195.97.240.237", + "109.228.14.251", + "202.39.47.200", + "91.190.142.200", + "59.124.244.6", + "188.207.200.113", + "194.7.138.43", + "189.111.254.56", + "89.235.136.61", + "199.85.126.20", + "89.29.128.250", + "212.237.125.216", + "207.248.224.72", + "72.14.186.159", + "177.43.56.139", + "5.103.13.158", + "200.150.113.147", + "208.73.176.3", + "200.55.54.234", + "81.170.175.117", + "77.68.83.207", + "124.6.3.216", + "193.22.119.195", + "89.200.168.203", + "61.78.59.74", + "60.248.28.154", + "148.247.22.16", + "213.125.107.179", + "210.1.58.22", + "217.18.206.12", + "188.213.49.35", + "89.108.129.220", + "175.126.123.238", + "193.9.240.62", + "177.47.128.2", + "216.254.141.13", + "216.106.1.254", + "216.218.245.200", + "64.84.120.2", + "195.35.110.4", + "202.152.77.212", + "189.42.239.34", + "108.166.105.234", + "213.11.172.5", + "211.34.105.59", + "87.104.237.210", + "104.41.35.46", + "203.146.127.85", + "66.76.76.15", + "220.128.154.100", + "84.96.26.129", + "220.90.212.161", + "8.20.247.10", + "195.189.150.37", + "210.71.26.1", + "202.134.52.105", + "203.69.87.18", + "89.106.109.235", + "93.81.253.51", + "91.232.102.4", + "188.124.210.1", + "94.236.218.254", + "67.210.172.116", + "119.235.21.188", + "200.115.176.23", + "80.248.72.1", + "187.1.175.81", + "195.18.138.5", + "221.143.46.198", + "109.73.91.70", + "205.213.172.36", + "89.211.53.228", + "60.248.139.169", + "66.42.33.135", + "213.229.136.30", + "187.44.1.140", + "89.31.109.105", + "5.58.74.133", + "43.224.122.28", + "81.211.94.74", + "200.29.96.24", + "95.141.206.1", + "195.46.39.39", + "46.17.184.76", + "217.11.176.244", + "218.149.84.50", + "212.97.32.2", + "45.90.28.203", + "89.104.166.243", + "202.53.93.10", + "192.232.128.21", + "85.132.32.41", + "199.16.102.19", + "180.42.87.49", + "94.100.86.238", + "66.199.45.225", + "46.227.203.9", + "68.87.77.134", + "190.129.94.107", + "186.215.225.243", + "103.88.229.18", + "109.228.2.152", + "103.11.98.187", + "212.36.64.17", + "187.32.7.196", + "89.17.194.43", + "84.236.142.130", + "91.200.116.22", + "109.226.238.177", + "217.147.96.210", + "103.197.106.63", + "162.212.13.62", + "220.110.210.114", + "54.37.9.64", + "109.228.24.166", + "209.250.128.6", + "173.71.30.195", + "203.253.64.1", + "212.37.11.198", + "124.195.190.243", + "203.113.132.171", + "200.11.52.202", + "193.34.173.206", + "203.162.11.12", + "189.2.156.5", + "164.77.214.132", + "62.37.225.56", + "220.128.99.157", + "156.154.70.16", + "200.42.174.188", + "132.248.150.167", + "181.14.245.186", + "210.57.214.83", + "203.199.60.11", + "62.94.56.3", + "177.184.131.180", + "77.88.8.8", + "186.237.202.26", + "213.138.160.20", + "69.10.79.20", + "204.193.157.30", + "124.6.173.117", + "200.59.236.202", + "194.177.56.1", + "66.119.188.199", + "109.228.8.13", + "223.5.5.5", + "184.105.193.74", + "64.233.207.16", + "85.25.105.193", + "187.120.48.47", + "195.218.133.88", + "74.84.64.170", + "195.158.110.109", + "219.99.166.50", + "37.139.11.137", + "82.151.66.178", + "124.6.190.76", + "83.97.23.226", + "87.213.100.113", + "45.225.123.34", + "46.234.226.122", + "208.79.218.162", + "62.28.250.13", + "204.13.152.3", + "59.124.195.5", + "213.65.136.170", + "195.239.36.27", + "212.28.34.65", + "220.130.192.226", + "85.132.57.186", + "109.71.42.228", + "194.78.185.79", + "202.146.130.198", + "185.42.96.217", + "206.123.219.125", + "202.39.210.77", + "82.146.26.2", + "91.121.3.87", + "193.111.200.191", + "202.181.213.108", + "204.90.92.4", + "67.17.215.133", + "203.239.190.50", + "42.116.255.180", + "62.28.166.140", + "200.115.141.138", + "62.212.154.152", + "89.236.218.78", + "103.1.187.162", + "1.232.188.2", + "194.125.133.10", + "50.200.193.97", + "168.62.214.68", + "194.224.253.5", + "223.197.238.226", + "125.206.220.10", + "210.242.228.25", + "88.79.149.4", + "153.19.105.120", + "200.149.208.135", + "181.143.35.154", + "85.88.138.66", + "24.181.107.228", + "185.228.168.9", + "200.110.130.194", + "82.103.129.72", + "80.79.179.2", + "89.250.147.145", + "86.124.83.220", + "115.42.228.246", + "81.243.243.123", + "202.82.21.33", + "139.99.74.182", + "122.56.107.86", + "80.11.160.191", + "61.98.113.222", + "194.79.89.89", + "88.206.152.60", + "62.169.90.152", + "220.128.232.252", + "86.107.249.193", + "103.5.148.99", + "81.83.18.23", + "65.48.140.162", + "204.95.160.2", + "200.221.11.100", + "110.77.151.42", + "24.113.32.29", + "209.29.150.135", + "222.234.2.183", + "81.175.40.23", + "83.236.183.211", + "94.124.165.25", + "193.17.47.1", + "81.82.236.125", + "62.149.132.2", + "202.86.251.201", + "203.140.65.123", + "31.3.193.62", + "196.223.158.58", + "146.255.61.177", + "193.158.99.67", + "187.60.128.69", + "197.248.116.74", + "41.224.250.224", + "62.149.128.2", + "217.19.153.3", + "46.105.214.115", + "77.85.169.102", + "211.126.202.126", + "62.122.101.59", + "178.210.102.225", + "141.0.79.138", + "84.1.150.58", + "1.32.58.251", + "62.48.163.166", + "118.42.126.217", + "103.21.194.19", + "87.247.10.22", + "83.19.241.2", + "195.98.79.117", + "70.88.112.101", + "81.162.111.11", + "66.70.228.164", + "62.28.4.209", + "193.183.98.66", + "119.160.211.198", + "202.182.53.17", + "165.98.138.194", + "202.78.64.84", + "79.175.208.28", + "178.79.166.40", + "213.241.88.98", + "213.184.225.37", + "92.45.59.195", + "147.135.113.37", + "212.216.172.222", + "77.68.44.16", + "193.215.74.3", + "85.18.246.73", + "194.90.121.121", + "190.108.85.3", + "50.116.17.96", + "124.6.167.191", + "203.186.217.185", + "113.53.237.210", + "92.43.224.1", + "66.209.53.88", + "179.60.232.10", + "5.39.118.16", + "77.68.20.30", + "201.144.183.147", + "203.147.7.7", + "50.241.0.98", + "91.121.134.117", + "213.82.20.189", + "103.29.68.118", + "84.237.112.130", + "77.68.44.25", + "85.132.85.85", + "91.229.232.170", + "88.80.64.8", + "213.171.217.147", + "77.68.39.96", + "46.35.180.2", + "109.73.90.205", + "181.49.2.242", + "78.131.88.95", + "88.149.193.46", + "200.46.199.56", + "200.205.150.210", + "61.196.252.28", + "85.88.19.11", + "91.121.208.19", + "194.177.50.125", + "174.47.107.220", + "80.64.32.2", + "8.26.56.10", + "89.108.128.220", + "206.222.107.38", + "62.197.103.39", + "200.62.147.66", + "199.85.127.10", + "194.187.251.67", + "198.52.109.178", + "176.103.66.73", + "46.166.189.68", + "119.73.137.211", + "193.190.66.4", + "80.254.98.212", + "103.196.124.3", + "208.98.188.82", + "51.158.168.202", + "210.232.97.146", + "109.228.25.253", + "194.145.240.6", + "195.22.25.132", + "195.239.49.194", + "107.161.16.30", + "59.125.182.149", + "176.9.1.117", + "65.125.102.18", + "216.146.36.36", + "188.252.69.3", + "212.118.0.1", + "45.225.123.54", + "54.94.175.250", + "93.91.145.230", + "201.64.113.214", + "203.126.118.102", + "213.0.77.5", + "213.211.182.157", + "185.169.159.158", + "62.105.147.13", + "87.241.167.158", + "203.229.206.20", + "62.48.250.106", + "195.162.81.150", + "109.228.8.62", + "195.77.252.37", + "62.94.0.42", + "176.9.93.198", + "212.66.129.107", + "110.77.142.211", + "194.179.1.100", + "59.127.13.183", + "121.129.56.60", + "71.122.219.170", + "72.51.45.191", + "217.86.149.109", + "187.6.84.178", + "194.168.8.123", + "103.78.215.212", + "129.250.35.251", + "103.28.114.126", + "92.222.117.114", + "209.137.146.2", + "212.19.106.134", + "103.8.27.15", + "194.224.52.4", + "1.1.1.2", + "79.187.201.179", + "114.114.114.119", + "77.68.47.167", + "103.86.99.100", + "62.168.251.166", + "24.181.107.229", + "65.39.166.132", + "202.43.162.37", + "109.205.112.9", + "125.206.211.218", + "221.132.89.153", + "85.18.52.172", + "194.243.154.62", + "81.82.197.98", + "195.228.219.226", + "205.242.187.234", + "81.83.19.129", + "2.229.110.149", + "202.147.193.108", + "222.154.228.64", + "118.107.76.3", + "203.207.52.206", + "201.44.177.131", + "103.232.35.101", + "218.103.8.74", + "149.112.112.112", + "61.90.191.14", + "177.222.251.122", + "190.143.189.106", + "91.239.100.100", + "74.120.24.129", + "195.10.195.195", + "109.254.13.190", + "202.86.129.106", + "177.12.230.174", + "198.99.193.1", + "196.21.247.1", + "97.64.136.6", + "109.70.132.17", + "37.187.34.231", + "124.40.250.160", + "46.173.34.32", + "200.159.205.11", + "112.160.193.17", + "202.147.193.109", + "218.149.84.49", + "140.116.77.16", + "212.159.112.232", + "188.138.57.95", + "85.11.24.148", + "167.157.20.2", + "217.69.169.25", + "203.239.130.3", + "78.9.110.22", + "84.96.26.139", + "84.16.240.43", + "80.228.231.48", + "66.240.146.122", + "196.3.132.153", + "210.228.48.238", + "190.86.139.62", + "37.71.134.238", + "213.184.242.6", + "211.11.195.114", + "69.57.230.68", + "195.77.235.10", + "178.150.206.87", + "60.250.174.244", + "208.25.96.18", + "198.199.103.49", + "194.177.210.210", + "91.93.102.43", + "5.102.56.138", + "211.38.3.14", + "175.209.133.88", + "200.115.141.140", + "62.90.108.221", + "211.55.29.223", + "201.134.115.36", + "163.172.170.19", + "176.221.10.213", + "69.20.154.65", + "62.97.70.131", + "122.215.69.149", + "202.44.32.29", + "91.183.238.145", + "192.211.0.10", + "61.19.251.237", + "109.228.23.101", + "81.176.67.101", + "46.28.130.214", + "116.66.197.183", + "213.136.192.2", + "192.116.158.140", + "223.31.121.171", + "169.53.182.124", + "92.111.212.210", + "82.96.64.2", + "185.107.80.84", + "103.30.244.89", + "207.35.8.166", + "207.67.115.254", + "142.77.2.101", + "41.79.124.10", + "202.58.198.158", + "187.141.85.108", + "117.18.119.36", + "194.145.241.6", + "104.36.237.205", + "62.225.66.19", + "82.198.189.24", + "136.145.23.3", + "109.228.9.74", + "203.190.55.129", + "218.146.255.235", + "158.132.187.187", + "200.185.113.202", + "62.225.102.177", + "158.43.128.72", + "109.228.25.186", + "31.168.224.100", + "199.16.220.189", + "46.107.30.182", + "210.48.77.69", + "46.227.200.9", + "88.208.229.248", + "219.95.183.41", + "168.187.234.58", + "81.95.237.58", + "109.228.0.24", + "204.106.240.53", + "200.167.191.114", + "62.85.160.206", + "91.121.211.127", + "114.114.115.110", + "195.250.58.10", + "218.235.251.2", + "208.79.56.204", + "177.43.68.115", + "82.127.173.122", + "12.131.101.32", + "59.120.147.65", + "208.64.129.68", + "109.228.0.164", + "163.172.107.158", + "213.0.55.169", + "83.218.176.140", + "203.63.219.26", + "91.229.232.213", + "195.53.69.133", + "213.125.105.234", + "124.6.165.16", + "80.14.133.244", + "69.20.169.49", + "192.195.100.3", + "203.171.33.150", + "200.99.138.94", + "103.30.244.197", + "212.66.160.2", + "61.19.203.210", + "195.204.130.85", + "177.52.232.7", + "62.37.225.57", + "200.159.205.12", + "68.87.76.178", + "197.253.12.229", + "109.228.25.54", + "81.248.15.223", + "172.98.193.42", + "190.149.249.57", + "200.72.163.50", + "80.248.14.50", + "217.24.255.134", + "67.52.15.27", + "194.213.61.162", + "185.184.222.222", + "203.81.75.37", + "194.209.157.109", + "187.61.9.42", + "103.80.1.2", + "82.165.76.185", + "195.60.70.6", + "177.43.249.132", + "186.215.128.142", + "208.91.112.53", + "222.255.146.26", + "211.22.60.248", + "109.233.144.52", + "151.80.222.79", + "95.142.83.43", + "211.114.145.7", + "87.213.68.130", + "194.61.59.25", + "212.36.64.16", + "37.71.108.130", + "192.121.44.204", + "195.77.252.36", + "213.215.11.190", + "203.189.89.1", + "74.93.247.57", + "204.70.127.128", + "200.195.180.226", + "193.137.7.225", + "83.103.43.81", + "103.226.174.100", + "200.205.44.154", + "103.196.125.2", + "210.57.214.170", + "178.150.45.81", + "114.114.114.110", + "149.112.112.10", + "189.113.75.5", + "209.40.238.71", + "45.250.253.222", + "189.90.241.10", + "194.68.117.1", + "109.228.0.238", + "195.77.90.230", + "91.200.116.21", + "61.250.157.15", + "62.97.123.107", + "177.67.201.203", + "50.204.108.198", + "203.118.155.130", + "151.1.141.155", + "221.119.13.154", + "176.31.121.197", + "69.70.21.150", + "93.108.238.122", + "216.66.104.72", + "223.6.6.6", + "210.66.73.137", + "190.64.140.242", + "91.229.232.168", + "144.76.173.169", + "1.32.58.250", + "84.94.158.213", + "65.49.37.195", + "85.94.178.198", + "177.92.0.90", + "202.51.74.187", + "116.126.142.201", + "43.224.121.177", + "170.56.58.53", + "124.6.169.58", + "59.120.9.23", + "195.162.82.65", + "216.187.93.250", + "68.87.72.130", + "1.9.21.77", + "213.251.133.164", + "4.2.2.6", + "202.44.80.25", + "195.34.237.111", + "195.243.99.35", + "109.228.24.113", + "91.122.77.189", + "195.57.47.3", + "207.35.8.169", + "77.52.183.142", + "217.170.128.27", + "71.40.44.8", + "186.216.62.73", + "61.90.191.10", + "193.178.35.130", + "124.6.167.167", + "109.228.46.244", + "199.116.57.181", + "91.121.143.182", + "185.34.21.5", + "194.78.30.158", + "211.116.138.5", + "81.175.40.21", + "202.164.44.246", + "209.150.154.1", + "212.45.25.202", + "195.76.198.10", + "189.4.130.159", + "188.225.179.158", + "161.35.198.1", + "91.229.232.81", + "31.129.186.43", + "81.222.251.2", + "91.204.4.133", + "193.138.78.117", + "80.241.218.68", + "72.22.86.34", + "59.124.16.34", + "80.48.144.8", + "201.144.40.139", + "66.249.150.51", + "203.73.77.205", + "85.93.231.114", + "179.99.247.239", + "210.149.130.193", + "218.234.18.181", + "212.234.19.21", + "177.66.203.10", + "193.248.128.166", + "89.19.228.52", + "80.254.5.142", + "177.159.232.53", + "65.111.169.160", + "103.28.115.173", + "65.111.169.159", + "103.194.120.3", + "124.6.164.205", + ] + .into_iter() + .map(str::to_owned) + .collect() +} + +#[allow(dead_code)] +pub fn ipv6_resolvers() -> Vec { + vec![ + "2001:4860:4860::8888", + "2001:450:2005:1::4", + "2600::2", + "2600::1", + "2001:1bc0::ffff:bbbb:2", + "2001:1bc0::ffff:aaaa:2", + "2001:418:3ff::1:53", + "2001:450:2005:3::5", + "2001:418:3ff::53", + "2001:4860:4860::8844", + "2001:910:800::12", + "2001:910:800::40", + "2001:450:2005:2::5", + "2001:450:2005:2::4", + "2a02:2178:1:2::2", + "2001:4f8:0:2::14", + "2001:b08:2:280::4:1", + "2001:1a68::d911:2244", + "2620:0:ccc::2", + "2620:0:ccd::2", + "2001:978:1:1::d", + "2001:978:1:2::d", + "2001:550:1:1::d", + "2001:470:0:45::2", + "2001:468:c80:2101:0:100:0:22", + "2001:468:c80:4101:0:100:0:42", + "2001:4870:8000:3::100", + "2001:4870:8000:3::5", + "2001:840:200::", + "2001:840:2010:413::100", + "2407:9000:0:4::2", + "2001:638:902:1::10", + "2001:1488:800:400::130", + "2a02:6b8::feed:0ff", + "2001:913::8", + "2a00:5881:8100:1000::3", + "2001:428:101:100:205:171:2:65", + "2001:428:101:100:205:171:3:65", + "2001:428::1", + "2001:468:C80:2101::100:0:22", + "2001:468:C80:4101::100:0:42", + "2001:67c:2b0::1", + "2001:67c:2b0::2", + "2001:b000:168::1", + "2001:bf0::2", + "2001:67c:15e8:d1::18", + "2001:67c:15e8:d1::19", + "2001:67c:2b24:1000::10", + "2001:67c:2b24:1000::11", + "2620:74:1b::1:1", + "2620:74:1c::2:2", + "2610:a1:1018::5", + "2610:a1:1019::5", + "2610:a1:1018::22", + "2610:a1:1019::22", + "2610:a1:1018::23", + "2610:a1:1019::23", + "2610:a1:1019::24", + "2610:a1:1019::25", + "2610:a1:1019::26", + "2610:a1:1019::27", + "2610:a1:1019::28", + "2610:a1:1019::29", + "2610:a1:1019::30", + "2610:a1:1019::31", + "2610:a1:1019::32", + "2610:a1:1019::33", + "2610:a1:1019::34", + "2610:a1:1019::35", + "2610:a1:1018::24", + "2610:a1:1018::25", + "2610:a1:1018::26", + "2610:a1:1018::27", + "2610:a1:1018::28", + "2610:a1:1018::29", + "2610:a1:1018::30", + "2610:a1:1018::31", + "2610:a1:1018::32", + "2610:a1:1018::33", + "2610:a1:1018::34", + "2610:a1:1018::35", + "2a01:4f8:141:4281::3000", + "2602:3f:e75c:1bff::1", + "2a00:5884:8218::1", + "2001:1608:10:25::1c04:b12f", + "2001:67c:28a4::", + "2c0f:fda8:5::2ed1:d2ec", + "2a01:3a0:53:53::", + "2a02:6b8:0:1::feed:0ff", + "2a02:6b8::feed:bad", + "2a02:6b8:0:1::feed:bad", + "2a02:6b8::feed:a11", + "2a02:6b8:0:1::feed:a11", + "2a02:2750:221:1:0:0:0:92", + "2a01:780:c000:2:0:0:0:1", + "2a01:a740:0:0:0:0:0:b", + "2a01:780:c000:1:0:0:0:1", + "2001:bf0:0:0:0:0:0:2", + "2a00:aa40:0:225:0:0:0:2", + "2607:f778:0:9:0:0:0:2", + "2001:4870:8000:3:0:0:0:5", + "2001:4b8:3:201:0:0:0:902", + "2001:4b8:2:101:0:0:0:602", + "2602:ffaa:0:0:0:0:2:2", + "2001:468:c80:6101:0:100:0:62", + "2001:1bc0:0:0:0:ffff:aaaa:2", + "2001:1bc0:0:0:0:ffff:bbbb:2", + "2803:c800:0:38:0:0:0:2", + "2001:df4:b400:221:0:0:0:1", + "2001:df4:b400:221:0:0:0:2", + "2a00:1390:1:0:0:0:0:1", + "2a02:2720:2:0:0:0:0:2", + "2a02:2720:1:0:0:0:0:1", + "2a00:1908:0:0:0:0:0:74", + "2a00:8b00:0:a:0:0:0:53", + "2804:ac:cafe:0:0:0:0:10", + "2001:DF0:2BA::101", + "2001:df0:2ba:0:0:0:0:101", + "2a00:1908:0:0:0:0:0:72", + "2a00:1908:0:0:0:0:0:73", + "2001:550:1:2::D", + "2001:738:6001:B0B0::1000", + "2a02:6b8::feed:ff", + "2a03:8600:1001::2", + "2606:ed00:2:babe::10", + "2001:b000:168::2", + "2620:fe::fe", + "2620:fe::10", + "2a00:5a60::ad1:0ff", + "2a00:5a60::ad2:0ff", + "2a01:4f8:172:2414:250:56ff:fe00:a9cc", + "2606:4700:4700::1111", + "2606:4700:4700::1001", + "2a03:4000:1c:50a::1", + "2001:41d0:2:73d4::125", + "2001:41d0:2:73d4::100", + "2a00:1a28:1157:3ef::2", + "2001:470:1f06:10b::2", + "2a01:238:42f6:ac00:2a29:4f7f:b6d:ef46", + "2001:de4::101", + "2001:de4::102", + "2a00:1b70:1200:1::53", + "2a00:1b70:1200:1::1:53", + "2a00:1b70:1200:1::64", + "2001:470:b411:80:3063:36ff:fe38:3533", + "2001:da8::666", + "2001:41d0:203:4b1f:2:2:2:2", + "2001:41d0:604:a7:3:3:3:3", + "2001:c38:2000:2421::154", + "2a0d:2a00:1::2", + "2a0d:2a00:2::2", + "2001:470:20::2", + "2a01:3a0:53:53::0", + "2a09::", + "2a09::1", + "2405:8a00:8001::20", + "2607:5300:60:be0::1", + "2607:5300:60:b24::1", + "2a01:4f8:151:34aa::198", + "2a01:4f8:141:316d::117", + "2001:470:b411:80:6065:33ff:fe31:3831", + "2606:4700:4700::1112", + "2606:4700:4700::1002", + "2606:4700:4700::1113", + "2606:4700:4700::1003", + "2620:10A:80BB::10", + "2620:10A:80BC::10", + "2620:10A:80BB::20", + "2620:10A:80BC::20", + "2620:10A:80BB::30", + "2620:10A:80BC::30", + "2A02:2F0F:191:53::35", + "2001:8d8:1801:80bb::1", + "240c::6666", + "240c::6644", + ] + .into_iter() + .map(str::to_owned) + .collect() +} + +#[allow(dead_code)] +pub fn top_1000_ports() -> Vec { + vec![ + 1, 3, 4, 6, 7, 9, 13, 17, 19, 20, 21, 22, 23, 24, 25, 26, 30, 32, 33, 37, 42, 43, 49, 53, + 70, 79, 80, 81, 82, 83, 84, 85, 88, 89, 90, 99, 100, 106, 109, 110, 111, 113, 119, 125, + 135, 139, 143, 144, 146, 161, 163, 179, 199, 211, 212, 222, 254, 255, 256, 259, 264, 280, + 301, 306, 311, 340, 366, 389, 406, 407, 416, 417, 425, 427, 443, 444, 445, 458, 464, 465, + 481, 497, 500, 512, 513, 514, 515, 524, 541, 543, 544, 545, 548, 554, 555, 563, 587, 593, + 616, 617, 625, 631, 636, 646, 648, 666, 667, 668, 683, 687, 691, 700, 705, 711, 714, 720, + 722, 726, 749, 765, 777, 783, 787, 800, 801, 808, 843, 873, 880, 888, 898, 900, 901, 902, + 903, 911, 912, 981, 987, 990, 992, 993, 995, 999, 1000, 1001, 1002, 1007, 1009, 1010, 1011, + 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, + 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, + 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, + 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, + 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, + 1096, 1097, 1098, 1099, 1100, 1102, 1104, 1105, 1106, 1107, 1108, 1110, 1111, 1112, 1113, + 1114, 1117, 1119, 1121, 1122, 1123, 1124, 1126, 1130, 1131, 1132, 1137, 1138, 1141, 1145, + 1147, 1148, 1149, 1151, 1152, 1154, 1163, 1164, 1165, 1166, 1169, 1174, 1175, 1183, 1185, + 1186, 1187, 1192, 1198, 1199, 1201, 1213, 1216, 1217, 1218, 1233, 1234, 1236, 1244, 1247, + 1248, 1259, 1271, 1272, 1277, 1287, 1296, 1300, 1301, 1309, 1310, 1311, 1322, 1328, 1334, + 1352, 1417, 1433, 1434, 1443, 1455, 1461, 1494, 1500, 1501, 1503, 1521, 1524, 1533, 1556, + 1580, 1583, 1594, 1600, 1641, 1658, 1666, 1687, 1688, 1700, 1717, 1718, 1719, 1720, 1721, + 1723, 1755, 1761, 1782, 1783, 1801, 1805, 1812, 1839, 1840, 1862, 1863, 1864, 1875, 1900, + 1914, 1935, 1947, 1971, 1972, 1974, 1984, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, + 2006, 2007, 2008, 2009, 2010, 2013, 2020, 2021, 2022, 2030, 2033, 2034, 2035, 2038, 2040, + 2041, 2042, 2043, 2045, 2046, 2047, 2048, 2049, 2065, 2068, 2099, 2100, 2103, 2105, 2106, + 2107, 2111, 2119, 2121, 2126, 2135, 2144, 2160, 2161, 2170, 2179, 2190, 2191, 2196, 2200, + 2222, 2251, 2260, 2288, 2301, 2323, 2366, 2381, 2382, 2383, 2393, 2394, 2399, 2401, 2492, + 2500, 2522, 2525, 2557, 2601, 2602, 2604, 2605, 2607, 2608, 2638, 2701, 2702, 2710, 2717, + 2718, 2725, 2800, 2809, 2811, 2869, 2875, 2909, 2910, 2920, 2967, 2968, 2998, 3000, 3001, + 3003, 3005, 3006, 3007, 3011, 3013, 3017, 3030, 3031, 3052, 3071, 3077, 3128, 3168, 3211, + 3221, 3260, 3261, 3268, 3269, 3283, 3300, 3301, 3306, 3322, 3323, 3324, 3325, 3333, 3351, + 3367, 3369, 3370, 3371, 3372, 3389, 3390, 3404, 3476, 3493, 3517, 3527, 3546, 3551, 3580, + 3659, 3689, 3690, 3703, 3737, 3766, 3784, 3800, 3801, 3809, 3814, 3826, 3827, 3828, 3851, + 3869, 3871, 3878, 3880, 3889, 3905, 3914, 3918, 3920, 3945, 3971, 3986, 3995, 3998, 4000, + 4001, 4002, 4003, 4004, 4005, 4006, 4045, 4111, 4125, 4126, 4129, 4224, 4242, 4279, 4321, + 4343, 4443, 4444, 4445, 4446, 4449, 4550, 4567, 4662, 4848, 4899, 4900, 4998, 5000, 5001, + 5002, 5003, 5004, 5009, 5030, 5033, 5050, 5051, 5054, 5060, 5061, 5080, 5087, 5100, 5101, + 5102, 5120, 5190, 5200, 5214, 5221, 5222, 5225, 5226, 5269, 5280, 5298, 5357, 5405, 5414, + 5431, 5432, 5440, 5500, 5510, 5544, 5550, 5555, 5560, 5566, 5631, 5633, 5666, 5678, 5679, + 5718, 5730, 5800, 5801, 5802, 5810, 5811, 5815, 5822, 5825, 5850, 5859, 5862, 5877, 5900, + 5901, 5902, 5903, 5904, 5906, 5907, 5910, 5911, 5915, 5922, 5925, 5950, 5952, 5959, 5960, + 5961, 5962, 5963, 5987, 5988, 5989, 5998, 5999, 6000, 6001, 6002, 6003, 6004, 6005, 6006, + 6007, 6009, 6025, 6059, 6100, 6101, 6106, 6112, 6123, 6129, 6156, 6346, 6389, 6502, 6510, + 6543, 6547, 6565, 6566, 6567, 6580, 6646, 6666, 6667, 6668, 6669, 6689, 6692, 6699, 6779, + 6788, 6789, 6792, 6839, 6881, 6901, 6969, 7000, 7001, 7002, 7004, 7007, 7019, 7025, 7070, + 7100, 7103, 7106, 7200, 7201, 7402, 7435, 7443, 7496, 7512, 7625, 7627, 7676, 7741, 7777, + 7778, 7800, 7911, 7920, 7921, 7937, 7938, 7999, 8000, 8001, 8002, 8007, 8008, 8009, 8010, + 8011, 8021, 8022, 8031, 8042, 8045, 8080, 8081, 8082, 8083, 8084, 8085, 8086, 8087, 8088, + 8089, 8090, 8093, 8099, 8100, 8180, 8181, 8192, 8193, 8194, 8200, 8222, 8254, 8290, 8291, + 8292, 8300, 8333, 8383, 8400, 8402, 8443, 8500, 8600, 8649, 8651, 8652, 8654, 8701, 8800, + 8873, 8888, 8899, 8994, 9000, 9001, 9002, 9003, 9009, 9010, 9011, 9040, 9050, 9071, 9080, + 9081, 9090, 9091, 9099, 9100, 9101, 9102, 9103, 9110, 9111, 9200, 9207, 9220, 9290, 9415, + 9418, 9485, 9500, 9502, 9503, 9535, 9575, 9593, 9594, 9595, 9618, 9666, 9876, 9877, 9878, + 9898, 9900, 9917, 9929, 9943, 9944, 9968, 9998, 9999, 10000, 10001, 10002, 10003, 10004, + 10009, 10010, 10012, 10024, 10025, 10082, 10180, 10215, 10243, 10566, 10616, 10617, 10621, + 10626, 10628, 10629, 10778, 11110, 11111, 11967, 12000, 12174, 12265, 12345, 13456, 13722, + 13782, 13783, 14000, 14238, 14441, 14442, 15000, 15002, 15003, 15004, 15660, 15742, 16000, + 16001, 16012, 16016, 16018, 16080, 16113, 16992, 16993, 17877, 17988, 18040, 18101, 18988, + 19101, 19283, 19315, 19350, 19780, 19801, 19842, 20000, 20005, 20031, 20221, 20222, 20828, + 21571, 22939, 23502, 24444, 24800, 25734, 25735, 26214, 27000, 27352, 27353, 27355, 27356, + 27715, 28201, 30000, 30718, 30951, 31038, 31337, 32768, 32769, 32770, 32771, 32772, 32773, + 32774, 32775, 32776, 32777, 32778, 32779, 32780, 32781, 32782, 32783, 32784, 32785, 33354, + 33899, 34571, 34572, 34573, 35500, 38292, 40193, 40911, 41511, 42510, 44176, 44442, 44443, + 44501, 45100, 48080, 49152, 49153, 49154, 49155, 49156, 49157, 49158, 49159, 49160, 49161, + 49163, 49165, 49167, 49175, 49176, 49400, 49999, 50000, 50001, 50002, 50003, 50006, 50300, + 50389, 50500, 50636, 50800, 51103, 51493, 52673, 52822, 52848, 52869, 54045, 54328, 55055, + 55056, 55555, 55600, 56737, 56738, 57294, 57797, 58080, 60020, 60443, 61532, 61900, 62078, + 63331, 64623, 64680, 65000, 65129, 65389, + ] +} diff --git a/src/errors.rs b/src/errors.rs new file mode 100644 index 0000000..245cff2 --- /dev/null +++ b/src/errors.rs @@ -0,0 +1,2 @@ +pub use failure::{Error, ResultExt}; +pub type Result = ::std::result::Result; diff --git a/src/files.rs b/src/files.rs new file mode 100644 index 0000000..aea0f42 --- /dev/null +++ b/src/files.rs @@ -0,0 +1,81 @@ +use { + crate::{errors::*, structs::Args}, + log::error, + prettytable::Table, + std::{ + collections::HashSet, + fs::{self, File, OpenOptions}, + io::{BufRead, BufReader, Write}, + path::Path, + }, +}; + +pub fn return_file_targets(args: &Args, mut files: Vec) -> Vec { + let mut targets: Vec = Vec::new(); + files.sort(); + files.dedup(); + for f in files { + match File::open(&f) { + Ok(file) => { + for target in BufReader::new(file).lines().flatten() { + targets.push(target); + } + } + Err(e) => { + if args.files.len() == 1 { + error!("Can not open file {}. Error: {}\n", f, e); + std::process::exit(1) + } else if !args.quiet_flag { + error!( + "Can not open file {}, working with next file. Error: {}\n", + f, e + ); + } + } + } + } + targets.sort(); + targets.dedup(); + targets.iter().map(|target| target.to_lowercase()).collect() +} + +pub fn table_to_file(table: &Table, file_name: Option) -> Result<()> { + table.to_csv(file_name.unwrap())?; + Ok(()) +} + +pub fn return_output_file(args: &Args) -> Option { + if args.file_name.is_empty() || !args.with_output { + None + } else { + Some( + OpenOptions::new() + .append(true) + .create(true) + .open(&args.file_name) + .with_context(|_| format!("Can't create file {}", &args.file_name)) + .unwrap(), + ) + } +} + +pub fn check_full_path(full_path: &str) -> bool { + (Path::new(full_path).exists() && Path::new(full_path).is_dir()) + || fs::create_dir_all(full_path).is_ok() +} + +pub fn delete_files(paths: &HashSet) { + for file in paths { + if Path::new(&file).exists() { + match std::fs::remove_file(&file) { + Ok(_) => (), + Err(e) => error!("Error deleting the file {}. Description: {}", &file, e), + } + } + } +} + +pub fn string_to_file(data: String, mut file: File) -> Result<()> { + file.write_all(data.as_bytes())?; + Ok(()) +} diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..5b46bea --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,21 @@ +#[macro_use] +extern crate serde_derive; +#[macro_use] +extern crate lazy_static; +#[macro_use] +extern crate prettytable; + +extern crate log; + +pub mod args; +pub mod errors; +pub mod files; +pub mod logger; +pub mod resolver_engine; + +mod defaults; +mod logic; +mod misc; +mod networking; +mod nmap; +mod structs; diff --git a/src/logger.rs b/src/logger.rs new file mode 100644 index 0000000..7bc5b80 --- /dev/null +++ b/src/logger.rs @@ -0,0 +1,121 @@ +#[cfg(windows)] +extern crate atty; +#[cfg(feature = "chrono")] +extern crate chrono; +#[cfg(feature = "colored")] +extern crate colored; +extern crate log; +#[cfg(windows)] +extern crate winapi; + +#[cfg(feature = "chrono")] +use chrono::Local; +#[cfg(feature = "colored")] +use colored::*; +use log::{Level, Log, Metadata, Record, SetLoggerError}; +struct SimpleLogger { + level: Level, +} + +impl Log for SimpleLogger { + fn enabled(&self, metadata: &Metadata) -> bool { + metadata.level() <= self.level + } + + fn log(&self, record: &Record) { + let target = if !record.target().is_empty() { + record.target() + } else { + record.module_path().unwrap_or_default() + }; + if target.contains("unimap") && self.enabled(record.metadata()) { + let level_string = { + #[cfg(feature = "colored")] + { + match record.level() { + Level::Error => record.level().to_string().red(), + Level::Warn => record.level().to_string().yellow(), + Level::Info => record.level().to_string().cyan(), + Level::Debug => record.level().to_string().purple(), + Level::Trace => record.level().to_string().normal(), + } + } + #[cfg(not(feature = "colored"))] + { + record.level().to_string() + } + }; + #[cfg(feature = "chrono")] + { + print!( + "\n{} [{}] {}", + Local::now().format("%Y-%m-%d %H:%M:%S,%3f"), + level_string, + record.args() + ); + } + #[cfg(not(feature = "chrono"))] + { + print!("\n[{}] {}", level_string, record.args()); + } + } + } + + fn flush(&self) {} +} + +#[cfg(windows)] +fn set_up_color_terminal() { + use atty::Stream; + + if atty::is(Stream::Stdout) { + unsafe { + use winapi::um::consoleapi::*; + use winapi::um::handleapi::*; + use winapi::um::processenv::*; + use winapi::um::winbase::*; + use winapi::um::wincon::*; + + let stdout = GetStdHandle(STD_OUTPUT_HANDLE); + + if stdout == INVALID_HANDLE_VALUE { + return; + } + + let mut mode: winapi::shared::minwindef::DWORD = 0; + + if GetConsoleMode(stdout, &mut mode) == 0 { + return; + } + + SetConsoleMode(stdout, mode | ENABLE_VIRTUAL_TERMINAL_PROCESSING); + } + } +} + +pub fn init_with_level(level: Level) -> Result<(), SetLoggerError> { + #[cfg(all(windows, feature = "colored"))] + set_up_color_terminal(); + + let logger = SimpleLogger { level }; + log::set_boxed_logger(Box::new(logger))?; + log::set_max_level(level.to_level_filter()); + Ok(()) +} + +pub fn init() -> Result<(), SetLoggerError> { + init_with_level(Level::Trace) +} + +pub fn init_by_env() { + match std::env::var("UNIMAP_LOG_LEVEL") { + Ok(x) => match x.to_lowercase().as_str() { + "trace" => init_with_level(log::Level::Trace).unwrap(), + "debug" => init_with_level(log::Level::Debug).unwrap(), + "info" => init_with_level(log::Level::Info).unwrap(), + "warn" => init_with_level(log::Level::Warn).unwrap(), + _ => init_with_level(log::Level::Error).unwrap(), + }, + _ => init_with_level(log::Level::Error).unwrap(), + } +} diff --git a/src/logic.rs b/src/logic.rs new file mode 100644 index 0000000..b01f418 --- /dev/null +++ b/src/logic.rs @@ -0,0 +1,31 @@ +use lazy_static; + +lazy_static! { + static ref SPECIAL_CHARS: Vec = vec![ + '[', ']', '{', '}', '(', ')', '*', '|', ':', '<', '>', '/', '\\', '%', '&', '¿', '?', '¡', + '!', '#', '\'', ' ', ',' + ]; +} + +pub fn validate_target(target: &str) -> bool { + !target.starts_with('.') + && target.contains('.') + && !target.contains(&SPECIAL_CHARS[..]) + && target.chars().all(|c| c.is_ascii()) +} + +pub fn null_ip_checker(ip: &str) -> String { + if ip.is_empty() { + String::from("NULL") + } else { + ip.to_string() + } +} + +pub fn return_ports_string(ports: &Vec) -> String { + if ports.is_empty() { + String::from("NULL") + } else { + ports.join(";") + } +} diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..b0af3f8 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,46 @@ +use { + log::{error, Level}, + std::{collections::HashSet, iter::FromIterator}, + unimap::{args, errors::*, files::return_file_targets, logger, resolver_engine}, +}; + +fn run() -> Result<()> { + if std::env::var("UNIMAP_LOG_LEVEL").is_ok() { + logger::init_by_env() + } else { + logger::init_with_level(Level::Info).unwrap() + } + let mut arguments = args::get_args(); + if !arguments.files.is_empty() { + arguments.targets = + HashSet::from_iter(return_file_targets(&arguments, arguments.files.clone())) + } else { + arguments.targets.insert(arguments.target.clone()); + } + + if arguments.targets.len() < 50 { + arguments.threads = arguments.targets.len() + } + + rayon::ThreadPoolBuilder::new() + .num_threads(arguments.threads) + .build_global() + .unwrap(); + + if !arguments.target.is_empty() || !arguments.files.is_empty() { + resolver_engine::async_resolver_all(&mut arguments) + } else { + error!("Error: Target is empty or invalid!\n"); + std::process::exit(1) + } +} + +fn main() { + if let Err(err) = run() { + error!("Error: {}", err); + for cause in err.iter_chain().skip(1) { + error!("Error description: {}\n", cause); + } + std::process::exit(1); + } +} diff --git a/src/misc.rs b/src/misc.rs new file mode 100644 index 0000000..15ad273 --- /dev/null +++ b/src/misc.rs @@ -0,0 +1,34 @@ +use std::collections::HashSet; + +pub fn sanitize_target_string(target: String) -> String { + target + .replace("www.", "") + .replace("https://", "") + .replace("http://", "") + .replace("/", "") +} + +pub fn return_matches_vec(matches: &clap::ArgMatches, value: &str) -> Vec { + if matches.is_present(value) { + matches + .values_of(value) + .unwrap() + .map(str::to_owned) + .collect() + } else { + Vec::new() + } +} + +#[allow(dead_code)] +pub fn return_matches_hashset(matches: &clap::ArgMatches, value: &str) -> HashSet { + if matches.is_present(value) { + matches + .values_of(value) + .unwrap() + .map(str::to_owned) + .collect() + } else { + HashSet::new() + } +} diff --git a/src/networking.rs b/src/networking.rs new file mode 100644 index 0000000..1527fc2 --- /dev/null +++ b/src/networking.rs @@ -0,0 +1,68 @@ +use { + log::error, + rand::Rng, + std::net::{IpAddr, Ipv4Addr}, + trust_dns_resolver::{ + config::{NameServerConfigGroup, ResolverConfig, ResolverOpts}, + proto::rr::RecordType, + Resolver, + }, +}; + +pub fn get_records(resolver: &Resolver, domain: &str, record_type: RecordType) -> String { + if let Ok(rdata) = resolver.lookup(&domain, record_type) { + let mut record_data: Vec = Vec::new(); + if record_type == RecordType::AAAA { + record_data = rdata + .iter() + .filter_map(|rdata| rdata.as_aaaa()) + .map(|ipv6| ipv6.to_string()) + .collect(); + } else if record_type == RecordType::A { + record_data = rdata + .iter() + .filter_map(|rdata| rdata.as_a()) + .map(|ipv4| ipv4.to_string()) + .collect(); + } else if record_type == RecordType::CNAME { + record_data = rdata + .iter() + .filter_map(|rdata| rdata.as_cname()) + .map(|name| { + let name = name.to_string(); + name[..name.len() - 1].to_owned() + }) + .collect(); + } + record_data + .iter() + .next() + .expect("Failed retrieving records data.") + .to_owned() + } else { + String::new() + } +} + +pub fn get_resolver(resolvers_ips: &[Ipv4Addr], opts: &ResolverOpts) -> Resolver { + match Resolver::new( + ResolverConfig::from_parts( + None, + vec![], + NameServerConfigGroup::from_ips_clear( + &[IpAddr::V4( + resolvers_ips[rand::thread_rng().gen_range(0, resolvers_ips.len())], + )], + 53, + ), + ), + *opts, + ) { + Ok(resolver) => resolver, + + Err(e) => { + error!("Failed to create the resolver. Error: {}\n", e); + std::process::exit(1) + } + } +} diff --git a/src/nmap.rs b/src/nmap.rs new file mode 100644 index 0000000..602b87f --- /dev/null +++ b/src/nmap.rs @@ -0,0 +1,183 @@ +use { + crate::resolver_engine, + log::error, + std::{path::Path, process::Command}, +}; + +lazy_static! { + static ref NMAP_DNS_RESOLVERS: String = resolver_engine::RESOLVERS + .clone() + .iter() + .map(|f| f.to_string()) + .collect::>() + .join(","); +} + +#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct Root { + pub nmaprun: Nmaprun, +} + +#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct Nmaprun { + pub scanner: String, + pub args: String, + pub start: String, + pub startstr: String, + pub version: String, + pub xmloutputversion: String, + pub host: Option, +} + +#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct Host { + pub starttime: String, + pub endtime: String, + pub status: Status, + pub address: Address, + pub hostnames: Hostnames, + pub ports: Option, +} + +#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct Status { + pub state: String, + pub reason: String, + #[serde(rename = "reason_ttl")] + pub reason_ttl: String, +} + +#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct Address { + pub addr: Option, + pub addrtype: Option, +} + +#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct Hostnames { + pub hostname: Option, +} + +#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct Hostname { + pub name: String, + #[serde(rename = "type")] + pub type_field: String, +} + +#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct Ports { + pub port: Vec, +} + +#[derive(Default, Debug, Clone, Eq, PartialEq, Serialize, Deserialize, Hash)] +#[serde(rename_all = "camelCase")] +pub struct Port { + pub protocol: String, + pub portid: String, + pub state: State, + pub service: Option, +} + +#[derive(Default, Debug, Clone, Eq, PartialEq, Serialize, Deserialize, Hash)] +#[serde(rename_all = "camelCase")] +pub struct State { + pub state: String, + pub reason: String, + #[serde(rename = "reason_ttl")] + pub reason_ttl: String, +} + +#[derive(Default, Debug, Clone, Eq, PartialEq, Serialize, Deserialize, Hash)] +#[serde(rename_all = "camelCase")] +pub struct Service { + pub name: String, + pub method: String, + pub conf: String, + pub product: Option, + pub ostype: Option, + pub version: Option, + pub extrainfo: Option, +} + +pub fn get_nmap_data( + filename: &str, + host: &str, + min_rate: usize, + initial_port: usize, + last_port: usize, + fast_scan: bool, +) -> Result { + let _ports_range = format!("{}-{}", initial_port, last_port); + let min_rate = min_rate.to_string(); + let nmap_args = if fast_scan { + vec![ + "nmap", + "-n", + "--dns-servers", + &NMAP_DNS_RESOLVERS, + "-Pn", + "--host-timeout", + "5m", + "--min-rate", + &min_rate, + "-sS", + "--open", + "-dd", + "-T4", + "--max-retries", + "2", + "-oX", + filename, + host, + ] + } else { + vec![ + "nmap", + "-n", + "--dns-servers", + &NMAP_DNS_RESOLVERS, + "-Pn", + "--host-timeout", + "10m", + "-sV", + "--min-rate", + &min_rate, + "-sS", + "-p-", + "--open", + "-dd", + "-T4", + "--max-retries", + "2", + "-oX", + filename, + host, + ] + }; + match Command::new("sudo").args(&nmap_args).output() { + Ok(_) => { + if Path::new(&filename).exists() && Path::new(&filename).is_file() { + serde_xml_rs::from_str(&std::fs::read_to_string(filename).unwrap_or_default()) + } else { + error!("Error executing nmap, you need root permissions. Leaving.\n"); + std::process::exit(1) + } + } + Err(e) => { + error!( + "Error waiting command to finish for {}, continuing with remaining hosts. Description: {}", + host, e + ); + Ok(Nmaprun::default()) + } + } +} diff --git a/src/resolver_engine.rs b/src/resolver_engine.rs new file mode 100644 index 0000000..eb84e93 --- /dev/null +++ b/src/resolver_engine.rs @@ -0,0 +1,234 @@ +use { + crate::{ + args, + errors::*, + files, logic, networking, + nmap::{self, Nmaprun}, + structs::{Args, ResolvData}, + }, + log::{error, info}, + prettytable, + prettytable::Table, + rayon::prelude::*, + std::{ + collections::{HashMap, HashSet}, + net::Ipv4Addr, + time::Duration, + }, + trust_dns_resolver::{config::ResolverOpts, proto::rr::RecordType}, +}; + +lazy_static! { + pub static ref RESOLVERS: Vec = { + let args = args::get_args(); + let mut resolver_ips = Vec::new(); + if args.custom_resolvers { + for r in &files::return_file_targets(&args, args.resolvers.clone()) { + match r.parse::() { + Ok(ip) => resolver_ips.push(ip), + Err(e) => { + error!("Error parsing the {} IP from resolvers file to IP address. Please check and try again. Error: {}\n", r, e); + std::process::exit(1) + } + } + } + } else { + for r in args.resolvers { + match r.parse::() { + Ok(ip) => resolver_ips.push(ip), + Err(e) => { + error!("Error parsing the {} IP from resolvers file to IP address. Please check and try again. Error: {}\n", r, e); + std::process::exit(1) + } + } + } + } + resolver_ips + }; +} + +pub fn async_resolver_all(args: &mut Args) -> Result<()> { + if args.with_output && !args.unique_output_flag && !files::check_full_path(&args.logs_dir) { + error!( + "Error creating the logs folder in the path {}. Leaving...", + &args.logs_dir + ); + std::process::exit(1) + } + + if !args.quiet_flag { + info!( + "Performing asynchronous resolution for {} targets with {} threads, it will take a while...\n", + args.targets.len(), args.threads + ) + } + + let data = async_resolver_engine(&args, args.targets.clone()); + + let mut table = Table::new(); + table.set_titles(row![ + bcFg => "HOST", + "IP", + "OPEN PORTS", + "SERVICES" + ]); + for (target, resolv_data) in &data { + if !resolv_data.ip.is_empty() { + let mut services_table = Table::new(); + for port_data in &resolv_data.ports_data { + services_table + .add_row(row![bc => &format!("PORT => {}", port_data.portid.clone())]); + services_table.add_row( + row![c => &format!("SERVICE: {}", port_data.service.clone().unwrap_or_default().name)], + ); + services_table.add_row(row![c => &format!("VERSION: {}" ,port_data + .service.clone().unwrap_or_default() + .version + .clone() + .unwrap_or_else(|| "NULL".to_string()))]); + services_table.add_row(row![c => &format!("PRODUCT: {}", port_data + .service.clone().unwrap_or_default() + .product + .clone() + .unwrap_or_else(|| "NULL".to_string()))]); + services_table.add_row(row![c => &format!("OS TYPE: {}", port_data + .service.clone().unwrap_or_default() + .ostype + .clone() + .unwrap_or_else(|| "NULL".to_string()))]); + services_table.add_row(row![c => &format!("EXTRA INFO: {}", port_data + .service.clone().unwrap_or_default() + .extrainfo + .clone() + .unwrap_or_else(|| "NULL".to_string()))]); + } + table.add_row(row![ d => + target, + logic::null_ip_checker(&resolv_data.ip), + logic::return_ports_string( + &resolv_data + .ports_data + .iter() + .map(|f| f.portid.clone()) + .collect(), + ), + services_table, + ]); + } + } + + if args.with_output && !args.targets.is_empty() { + if files::table_to_file(&table, files::return_output_file(&args)).is_err() + && !args.quiet_flag + { + error!( + "An error occurred while writing the output file {}.\n", + args.file_name + ) + } + } + if !args.quiet_flag { + table.printstd(); + } + + if ((args.with_output && !args.unique_output_flag) || args.unique_output_flag) + && !args.quiet_flag + { + info!( + "Job finished in {} seconds.\n", + args.time_wasted.elapsed().as_secs() + ); + info!("Logfile saved in {}\n\n", args.file_name); + } + + Ok(()) +} + +fn async_resolver_engine(args: &Args, targets: HashSet) -> HashMap { + let mut opts = ResolverOpts::default(); + opts.timeout = Duration::from_secs(2); + + let resolv_data: HashMap = targets + .par_iter() + .map(|target| { + let fqdn_target = format!("{}.", target); + let mut resolv_data = ResolvData::default(); + resolv_data.ip = networking::get_records( + &networking::get_resolver(&RESOLVERS, &opts), + &fqdn_target, + RecordType::A, + ); + (target.to_owned(), resolv_data) + }) + .collect(); + + let mut nmap_ips: HashSet = resolv_data + .iter() + .map(|(_, resolv_data)| resolv_data.ip.clone()) + .collect(); + + nmap_ips.retain(|ip| !ip.is_empty()); + + let nmap_data: HashMap = nmap_ips + .par_iter() + .map(|ip| { + let filename = format!("{}.xml", &ip); + match nmap::get_nmap_data( + &filename, + &ip, + args.min_rate, + args.initial_port, + args.last_port, + args.fast_scan, + ) { + Ok(nmap_data) => { + nmap_data + .host + .clone() + .unwrap_or_default() + .ports + .unwrap_or_default() + .port + .retain(|f| f.state.state == "open"); + match std::fs::remove_file(&filename) { + Ok(_) => (), + Err(e) => { + error!("Error removing filename {}. Description: {}", &filename, e) + } + }; + (ip.clone(), nmap_data) + } + Err(e) => { + error!("Error scanning the ip {}. Description: {}", &ip, e); + (String::new(), Nmaprun::default()) + } + } + }) + .collect(); + + resolv_data + .iter() + .map(|(target, resolv_data)| { + ( + target.clone(), + ResolvData { + ip: resolv_data.ip.clone(), + ports_data: if resolv_data.ip.is_empty() { + resolv_data.ports_data.clone() + } else { + nmap_data + .get_key_value(&resolv_data.ip) + .unwrap() + .1 + .host + .clone() + .unwrap_or_default() + .ports + .unwrap_or_default() + .port + }, + }, + ) + }) + .collect() +} diff --git a/src/structs.rs b/src/structs.rs new file mode 100644 index 0000000..ff2ca0b --- /dev/null +++ b/src/structs.rs @@ -0,0 +1,41 @@ +use { + crate::nmap::Port, + std::{collections::HashSet, time::Instant}, +}; + +#[derive(Clone, Debug)] +pub struct Args { + pub target: String, + pub file_name: String, + pub version: String, + pub logs_dir: String, + pub threads: usize, + pub initial_port: usize, + pub last_port: usize, + pub with_output: bool, + pub unique_output_flag: bool, + pub min_rate: usize, + pub from_file_flag: bool, + pub quiet_flag: bool, + pub custom_resolvers: bool, + pub custom_ports_range: bool, + pub fast_scan: bool, + pub files: Vec, + pub resolvers: Vec, + pub targets: HashSet, + pub time_wasted: Instant, +} + +#[derive(Clone, Debug, Eq, PartialEq, Hash)] +pub struct ResolvData { + pub ip: String, + pub ports_data: Vec, +} +impl ResolvData { + pub fn default() -> ResolvData { + ResolvData { + ip: String::new(), + ports_data: Vec::new(), + } + } +}