From 1672dadd491a3d9119d10198dea5ebabf83480e5 Mon Sep 17 00:00:00 2001 From: SirGankalot <73303677+SirGankalot@users.noreply.github.com> Date: Wed, 1 May 2024 15:27:22 +0200 Subject: [PATCH] Deletion of unused checkers --- checker-rs/.dockerignore | 1 - checker-rs/.gitignore | 2 - checker-rs/Cargo.lock | 2413 ----------------- checker-rs/Cargo.toml | 16 - checker-rs/Dockerfile | 15 - checker-rs/docker-compose.yml | 16 - checker-rs/src/main.rs | 340 --- checker-rs/src/notebook_client.rs | 295 -- checker2/.dockerignore | 6 - checker2/.gitignore | 1 - checker2/Dockerfile | 17 - checker2/docker-compose.yml | 23 - checker2/src/checker.py | 432 --- checker2/src/gunicorn.conf.py | 7 - checker2/src/requirements.txt | 23 - checker_cs/.dockerignore | 7 - checker_cs/.gitignore | 364 --- checker_cs/Dockerfile | 17 - checker_cs/N0t3b00kChecker.sln | 25 - checker_cs/N0t3b00kChecker/Checker.cs | 276 -- .../N0t3b00kChecker/CheckerInitializer.cs | 28 - checker_cs/N0t3b00kChecker/Db/CheckerDb.cs | 53 - checker_cs/N0t3b00kChecker/Db/NotebookUser.cs | 27 - .../N0t3b00kChecker/N0t3b00kChecker.csproj | 14 - checker_cs/N0t3b00kChecker/NotebookClient.cs | 175 -- checker_cs/README.md | 70 - checker_cs/docker-compose.yml | 12 - 27 files changed, 4675 deletions(-) delete mode 100644 checker-rs/.dockerignore delete mode 100644 checker-rs/.gitignore delete mode 100644 checker-rs/Cargo.lock delete mode 100644 checker-rs/Cargo.toml delete mode 100644 checker-rs/Dockerfile delete mode 100644 checker-rs/docker-compose.yml delete mode 100644 checker-rs/src/main.rs delete mode 100644 checker-rs/src/notebook_client.rs delete mode 100644 checker2/.dockerignore delete mode 100644 checker2/.gitignore delete mode 100644 checker2/Dockerfile delete mode 100644 checker2/docker-compose.yml delete mode 100644 checker2/src/checker.py delete mode 100644 checker2/src/gunicorn.conf.py delete mode 100644 checker2/src/requirements.txt delete mode 100644 checker_cs/.dockerignore delete mode 100644 checker_cs/.gitignore delete mode 100644 checker_cs/Dockerfile delete mode 100644 checker_cs/N0t3b00kChecker.sln delete mode 100644 checker_cs/N0t3b00kChecker/Checker.cs delete mode 100644 checker_cs/N0t3b00kChecker/CheckerInitializer.cs delete mode 100644 checker_cs/N0t3b00kChecker/Db/CheckerDb.cs delete mode 100644 checker_cs/N0t3b00kChecker/Db/NotebookUser.cs delete mode 100644 checker_cs/N0t3b00kChecker/N0t3b00kChecker.csproj delete mode 100644 checker_cs/N0t3b00kChecker/NotebookClient.cs delete mode 100644 checker_cs/README.md delete mode 100644 checker_cs/docker-compose.yml diff --git a/checker-rs/.dockerignore b/checker-rs/.dockerignore deleted file mode 100644 index eb5a316..0000000 --- a/checker-rs/.dockerignore +++ /dev/null @@ -1 +0,0 @@ -target diff --git a/checker-rs/.gitignore b/checker-rs/.gitignore deleted file mode 100644 index 80ddbfc..0000000 --- a/checker-rs/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -target -data diff --git a/checker-rs/Cargo.lock b/checker-rs/Cargo.lock deleted file mode 100644 index 4fce494..0000000 --- a/checker-rs/Cargo.lock +++ /dev/null @@ -1,2413 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "actix-codec" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d5dbeb2d9e51344cb83ca7cc170f1217f9fe25bfc50160e6e200b5c31c1019a" -dependencies = [ - "bitflags", - "bytes", - "futures-core", - "futures-sink", - "log", - "pin-project-lite", - "tokio", - "tokio-util", -] - -[[package]] -name = "actix-http" -version = "3.0.0-beta.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59d51c2ba06062e698a5d212d860e9fb2afc931c285ede687aaae896c8150347" -dependencies = [ - "actix-codec", - "actix-rt", - "actix-service", - "actix-tls", - "actix-utils", - "ahash", - "base64", - "bitflags", - "brotli2", - "bytes", - "bytestring", - "derive_more", - "encoding_rs", - "flate2", - "futures-core", - "futures-util", - "h2", - "http", - "httparse", - "itoa", - "language-tags", - "local-channel", - "log", - "mime", - "once_cell", - "paste", - "percent-encoding", - "pin-project", - "pin-project-lite", - "rand 0.8.3", - "regex", - "serde", - "sha-1", - "smallvec", - "time 0.2.26", - "tokio", -] - -[[package]] -name = "actix-macros" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbcb2b608f0accc2f5bcf3dd872194ce13d94ee45b571487035864cf966b04ef" -dependencies = [ - "quote", - "syn", -] - -[[package]] -name = "actix-router" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ad299af73649e1fc893e333ccf86f377751eb95ff875d095131574c6f43452c" -dependencies = [ - "bytestring", - "http", - "log", - "regex", - "serde", -] - -[[package]] -name = "actix-rt" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc7d7cd957c9ed92288a7c3c96af81fa5291f65247a76a34dac7b6af74e52ba0" -dependencies = [ - "actix-macros", - "futures-core", - "tokio", -] - -[[package]] -name = "actix-server" -version = "2.0.0-beta.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26369215fcc3b0176018b3b68756a8bcc275bb000e6212e454944913a1f9bf87" -dependencies = [ - "actix-rt", - "actix-service", - "actix-utils", - "futures-core", - "log", - "mio", - "num_cpus", - "slab", - "tokio", -] - -[[package]] -name = "actix-service" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77f5f9d66a8730d0fae62c26f3424f5751e5518086628a40b7ab6fca4a705034" -dependencies = [ - "futures-core", - "paste", - "pin-project-lite", -] - -[[package]] -name = "actix-tls" -version = "3.0.0-beta.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65b7bb60840962ef0332f7ea01a57d73a24d2cb663708511ff800250bbfef569" -dependencies = [ - "actix-codec", - "actix-rt", - "actix-service", - "actix-utils", - "derive_more", - "futures-core", - "http", - "log", - "tokio-util", -] - -[[package]] -name = "actix-utils" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e491cbaac2e7fc788dfff99ff48ef317e23b3cf63dbaf7aaab6418f40f92aa94" -dependencies = [ - "local-waker", - "pin-project-lite", -] - -[[package]] -name = "actix-web" -version = "4.0.0-beta.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff12e933051557d700b0fcad20fe25b9ca38395cc87bbc5aeaddaef17b937a2f" -dependencies = [ - "actix-codec", - "actix-http", - "actix-macros", - "actix-router", - "actix-rt", - "actix-server", - "actix-service", - "actix-utils", - "actix-web-codegen", - "ahash", - "bytes", - "cookie", - "derive_more", - "either", - "encoding_rs", - "futures-core", - "futures-util", - "itoa", - "language-tags", - "log", - "mime", - "once_cell", - "pin-project", - "regex", - "serde", - "serde_json", - "serde_urlencoded", - "smallvec", - "socket2 0.4.0", - "time 0.2.26", - "url", -] - -[[package]] -name = "actix-web-codegen" -version = "0.5.0-beta.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f138ac357a674c3b480ddb7bbd894b13c1b6e8927d728bc9ea5e17eee2f8fc9" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "ahash" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f200cbb1e856866d9eade941cf3aa0c5d7dd36f74311c4273b494f4ef036957" -dependencies = [ - "getrandom 0.2.2", - "once_cell", - "version_check", -] - -[[package]] -name = "aho-corasick" -version = "0.7.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" -dependencies = [ - "memchr", -] - -[[package]] -name = "ansi_term" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi", -] - -[[package]] -name = "async-trait" -version = "0.1.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b98e84bbb4cbcdd97da190ba0c58a1bb0de2c1fdf67d159e192ed766aeca722" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "autocfg" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" - -[[package]] -name = "base-x" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4521f3e3d031370679b3b140beb36dfe4801b09ac77e30c61941f97df3ef28b" - -[[package]] -name = "base64" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" - -[[package]] -name = "bitflags" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", -] - -[[package]] -name = "brotli-sys" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4445dea95f4c2b41cde57cc9fee236ae4dbae88d8fcbdb4750fc1bb5d86aaecd" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "brotli2" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cb036c3eade309815c15ddbacec5b22c4d1f3983a774ab2eac2e3e9ea85568e" -dependencies = [ - "brotli-sys", - "libc", -] - -[[package]] -name = "bson" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b6553abdb9d2d8f262f0b5bccf807321d5b7d1a12796bcede8e1f150e85f2e" -dependencies = [ - "base64", - "chrono", - "hex", - "lazy_static", - "linked-hash-map", - "rand 0.7.3", - "serde", - "serde_json", - "uuid", -] - -[[package]] -name = "bumpalo" -version = "3.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63396b8a4b9de3f4fdfb320ab6080762242f66a8ef174c49d8e19b674db4cdbe" - -[[package]] -name = "byteorder" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" - -[[package]] -name = "bytes" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040" - -[[package]] -name = "bytestring" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90706ba19e97b90786e19dc0d5e2abd80008d99d4c0c5d1ad0b5e72cec7c494d" -dependencies = [ - "bytes", -] - -[[package]] -name = "cc" -version = "1.0.67" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3c69b077ad434294d3ce9f1f6143a2a4b89a8a2d54ef813d85003a4fd1137fd" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "checker-rs" -version = "0.1.0" -dependencies = [ - "actix-web", - "enochecker", - "fake", - "mongodb", - "rand 0.8.3", - "regex", - "serde", - "tracing", -] - -[[package]] -name = "chrono" -version = "0.4.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" -dependencies = [ - "libc", - "num-integer", - "num-traits", - "time 0.1.43", - "winapi", -] - -[[package]] -name = "const_fn" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "402da840495de3f976eaefc3485b7f5eb5b0bf9761f9a47be27fe975b3b8c2ec" - -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - -[[package]] -name = "cookie" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffdf8865bac3d9a3bde5bde9088ca431b11f5d37c7a578b8086af77248b76627" -dependencies = [ - "percent-encoding", - "time 0.2.26", - "version_check", -] - -[[package]] -name = "cpuid-bool" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634" - -[[package]] -name = "crc32fast" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" -dependencies = [ - "cfg-if", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7e9d99fa91428effe99c5c6d4634cdeba32b8cf784fc428a2a687f61a952c49" -dependencies = [ - "autocfg", - "cfg-if", - "lazy_static", -] - -[[package]] -name = "crypto-mac" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4857fd85a0c34b3c3297875b747c1e02e06b6a0ea32dd892d8192b9ce0813ea6" -dependencies = [ - "generic-array", - "subtle", -] - -[[package]] -name = "darling" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" -dependencies = [ - "darling_core 0.10.2", - "darling_macro 0.10.2", -] - -[[package]] -name = "darling" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f2c43f534ea4b0b049015d00269734195e6d3f0f6635cb692251aca6f9f8b3c" -dependencies = [ - "darling_core 0.12.4", - "darling_macro 0.12.4", -] - -[[package]] -name = "darling_core" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.9.3", - "syn", -] - -[[package]] -name = "darling_core" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e91455b86830a1c21799d94524df0845183fa55bafd9aa137b01c7d1065fa36" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.10.0", - "syn", -] - -[[package]] -name = "darling_macro" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" -dependencies = [ - "darling_core 0.10.2", - "quote", - "syn", -] - -[[package]] -name = "darling_macro" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29b5acf0dea37a7f66f7b25d2c5e93fd46f8f6968b1a5d7a3e02e97768afc95a" -dependencies = [ - "darling_core 0.12.4", - "quote", - "syn", -] - -[[package]] -name = "data-encoding" -version = "2.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ee2393c4a91429dffb4bedf19f4d6abf27d8a732c8ce4980305d782e5426d57" - -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "derive_more" -version = "0.99.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f82b1b72f1263f214c0f823371768776c4f5841b942c9883aa8e5ec584fd0ba6" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - -[[package]] -name = "discard" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" - -[[package]] -name = "dummy" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0444a1bba051be9becd18b5c1b66945c95fb84fe72048e43dcd5ac9366443990" -dependencies = [ - "darling 0.10.2", - "quote", - "syn", -] - -[[package]] -name = "either" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" - -[[package]] -name = "encoding_rs" -version = "0.8.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80df024fbc5ac80f87dfef0d9f5209a252f2a497f7f42944cff24d8253cac065" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "enochecker" -version = "0.1.0" -source = "git+https://github.com/enowars/enochecker-rs?branch=main#f5e61262c9a34a5bd656aea1184f46535d971305" -dependencies = [ - "actix-web", - "async-trait", - "futures", - "serde", - "serde_json", - "tokio", - "tracing", - "tracing-appender", - "tracing-core", - "tracing-subscriber", -] - -[[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", - "quote", - "syn", -] - -[[package]] -name = "fake" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "704749d52f737f28d7a632d4608db4005822efbb5a1c673c159f1193c9e63832" -dependencies = [ - "dummy", - "rand 0.8.3", -] - -[[package]] -name = "flate2" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd3aec53de10fe96d7d8c565eb17f2c687bb5518a2ec453b5b1252964526abe0" -dependencies = [ - "cfg-if", - "crc32fast", - "libc", - "miniz_oxide", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "form_urlencoded" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" -dependencies = [ - "matches", - "percent-encoding", -] - -[[package]] -name = "futures" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9d5813545e459ad3ca1bff9915e9ad7f1a47dc6a91b627ce321d5863b7dd253" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce79c6a52a299137a6013061e0cf0e688fce5d7f1bc60125f520912fdb29ec25" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "098cd1c6dda6ca01650f1a37a794245eb73181d0d4d4e955e2f3c37db7af1815" - -[[package]] -name = "futures-executor" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f6cb7042eda00f0049b1d2080aa4b93442997ee507eb3828e8bd7577f94c9d" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "365a1a1fb30ea1c03a830fdb2158f5236833ac81fa0ad12fe35b29cddc35cb04" - -[[package]] -name = "futures-macro" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668c6733a182cd7deb4f1de7ba3bf2120823835b3bcfbeacf7d2c4a773c1bb8b" -dependencies = [ - "proc-macro-hack", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "futures-sink" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5629433c555de3d82861a7a4e3794a4c40040390907cfbfd7143a92a426c23" - -[[package]] -name = "futures-task" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba7aa51095076f3ba6d9a1f702f74bd05ec65f555d70d2033d55ba8d69f581bc" - -[[package]] -name = "futures-util" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c144ad54d60f23927f0a6b6d816e4271278b64f005ad65e4e35291d2de9c025" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "proc-macro-hack", - "proc-macro-nested", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - -[[package]] -name = "getrandom" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.10.2+wasi-snapshot-preview1", -] - -[[package]] -name = "h2" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc018e188373e2777d0ef2467ebff62a08e66c3f5857b23c8fbec3018210dc00" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "hashbrown" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" - -[[package]] -name = "heck" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cbf45460356b7deeb5e3415b5563308c0a9b057c85e12b06ad551f98d0a6ac" -dependencies = [ - "unicode-segmentation", -] - -[[package]] -name = "hermit-abi" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c" -dependencies = [ - "libc", -] - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "hmac" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15" -dependencies = [ - "crypto-mac", - "digest", -] - -[[package]] -name = "hostname" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" -dependencies = [ - "libc", - "match_cfg", - "winapi", -] - -[[package]] -name = "http" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "527e8c9ac747e28542699a951517aa9a6945af506cd1f2e1b53a576c17b6cc11" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfb77c123b4e2f72a2069aeae0b4b4949cc7e966df277813fc16347e7549737" -dependencies = [ - "bytes", - "http", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a1ce40d6fc9764887c2fdc7305c3dcc429ba11ff981c1509416afd5697e4437" - -[[package]] -name = "httpdate" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05842d0d43232b23ccb7060ecb0f0626922c21f30012e97b767b30afd4a5d4b9" - -[[package]] -name = "hyper" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e5f105c494081baa3bf9e200b279e27ec1623895cd504c7dbef8d0b080fcf54" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project", - "socket2 0.4.0", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper-rustls" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" -dependencies = [ - "futures-util", - "hyper", - "log", - "rustls", - "tokio", - "tokio-rustls", - "webpki", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "idna" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "indexmap" -version = "1.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "824845a0bf897a9042383849b02c1bc219c2383772efcd5c6f9766fa4b81aef3" -dependencies = [ - "autocfg", - "hashbrown", -] - -[[package]] -name = "instant" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "ipconfig" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7e2f18aece9709094573a9f24f483c4f65caa4298e2f7ae1b71cc65d853fad7" -dependencies = [ - "socket2 0.3.19", - "widestring", - "winapi", - "winreg 0.6.2", -] - -[[package]] -name = "ipnet" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135" - -[[package]] -name = "itoa" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" - -[[package]] -name = "js-sys" -version = "0.3.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d99f9e3e84b8f67f846ef5b4cbbc3b1c29f6c759fcbce6f01aa0e73d932a24c" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "language-tags" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "libc" -version = "0.2.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18794a8ad5b29321f790b55d93dfba91e125cb1a9edbd4f8e3150acc771c1a5e" - -[[package]] -name = "linked-hash-map" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" - -[[package]] -name = "local-channel" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6246c68cf195087205a0512559c97e15eaf95198bf0e206d662092cdcb03fe9f" -dependencies = [ - "futures-core", - "futures-sink", - "futures-util", - "local-waker", -] - -[[package]] -name = "local-waker" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84f9a2d3e27ce99ce2c3aad0b09b1a7b916293ea9b2bf624c13fe646fadd8da4" - -[[package]] -name = "lock_api" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3c91c24eae6777794bb1997ad98bbb87daf92890acab859f7eaa4320333176" -dependencies = [ - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" -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", -] - -[[package]] -name = "match_cfg" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" - -[[package]] -name = "matchers" -version = "0.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1" -dependencies = [ - "regex-automata", -] - -[[package]] -name = "matches" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" - -[[package]] -name = "md-5" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5a279bb9607f9f53c22d496eade00d138d1bdcccd07d74650387cf94942a15" -dependencies = [ - "block-buffer", - "digest", - "opaque-debug", -] - -[[package]] -name = "memchr" -version = "2.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" - -[[package]] -name = "mime" -version = "0.3.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" - -[[package]] -name = "miniz_oxide" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" -dependencies = [ - "adler", - "autocfg", -] - -[[package]] -name = "mio" -version = "0.7.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf80d3e903b34e0bd7282b218398aec54e082c840d9baf8339e0080a0c542956" -dependencies = [ - "libc", - "log", - "miow", - "ntapi", - "winapi", -] - -[[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" -dependencies = [ - "winapi", -] - -[[package]] -name = "mongodb" -version = "2.0.0-alpha.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1264c64d5469f05c0201b939f971138bd385e7eb87eacdfd79f0c18b9eae7940" -dependencies = [ - "async-trait", - "base64", - "bitflags", - "bson", - "chrono", - "derivative", - "futures", - "hex", - "hmac", - "lazy_static", - "md-5", - "os_info", - "pbkdf2", - "percent-encoding", - "rand 0.8.3", - "reqwest", - "rustls", - "serde", - "serde_bytes", - "serde_with", - "sha-1", - "sha2", - "socket2 0.4.0", - "stringprep", - "strsim 0.10.0", - "take_mut", - "thiserror", - "tokio", - "tokio-rustls", - "tokio-util", - "trust-dns-proto", - "trust-dns-resolver", - "typed-builder", - "uuid", - "version_check", - "webpki", - "webpki-roots", -] - -[[package]] -name = "ntapi" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" -dependencies = [ - "winapi", -] - -[[package]] -name = "num-integer" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" -dependencies = [ - "autocfg", -] - -[[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 = "once_cell" -version = "1.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af8b08b04175473088b46763e51ee54da5f9a164bc162f615b91bc179dbf15a3" - -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - -[[package]] -name = "os_info" -version = "3.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afaa687e89d04fcd3573987b14965578e54434a120c9477500e24b95b6fe79ee" -dependencies = [ - "log", - "winapi", -] - -[[package]] -name = "parking_lot" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall", - "smallvec", - "winapi", -] - -[[package]] -name = "paste" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf547ad0c65e31259204bd90935776d1c693cec2f4ff7abb7a1bbbd40dfe58" - -[[package]] -name = "pbkdf2" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf916dd32dd26297907890d99dc2740e33f6bd9073965af4ccff2967962f5508" -dependencies = [ - "crypto-mac", -] - -[[package]] -name = "percent-encoding" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" - -[[package]] -name = "pin-project" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7509cc106041c40a4518d2af7a61530e1eed0e6285296a3d8c5472806ccc4a4" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c950132583b500556b1efd71d45b319029f2b71518d979fcc208e16b42426f" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc0e1f259c92177c30a4c9d177246edd0a3568b25756a977d0632cf8fa37e905" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "ppv-lite86" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" - -[[package]] -name = "proc-macro-hack" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" - -[[package]] -name = "proc-macro-nested" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" - -[[package]] -name = "proc-macro2" -version = "1.0.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152013215dca273577e18d2bf00fa862b89b24169fb78c4c95aeb07992c9cec" -dependencies = [ - "unicode-xid", -] - -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - -[[package]] -name = "quote" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc 0.2.0", -] - -[[package]] -name = "rand" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e" -dependencies = [ - "libc", - "rand_chacha 0.3.0", - "rand_core 0.6.2", - "rand_hc 0.3.0", -] - -[[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_chacha" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.2", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - -[[package]] -name = "rand_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" -dependencies = [ - "getrandom 0.2.2", -] - -[[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_hc" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73" -dependencies = [ - "rand_core 0.6.2", -] - -[[package]] -name = "redox_syscall" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8270314b5ccceb518e7e578952f0b72b88222d02e8f77f5ecf7abbb673539041" -dependencies = [ - "bitflags", -] - -[[package]] -name = "regex" -version = "1.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a26af418b574bd56588335b3a3659a65725d4e636eb1016c2f9e3b38c7cc759" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1ded71d66a4a97f5e961fd0cb25a5f366a42a41570d16a763a69c092c26ae4" -dependencies = [ - "byteorder", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.6.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5f089152e60f62d28b835fbff2cd2e8dc0baf1ac13343bef92ab7eed84548" - -[[package]] -name = "reqwest" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2296f2fac53979e8ccbc4a1136b25dcefd37be9ed7e4a1f6b05a6029c84ff124" -dependencies = [ - "base64", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "http", - "http-body", - "hyper", - "hyper-rustls", - "ipnet", - "js-sys", - "lazy_static", - "log", - "mime", - "percent-encoding", - "pin-project-lite", - "rustls", - "serde", - "serde_json", - "serde_urlencoded", - "tokio", - "tokio-rustls", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "webpki-roots", - "winreg 0.7.0", -] - -[[package]] -name = "resolv-conf" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00" -dependencies = [ - "hostname", - "quick-error", -] - -[[package]] -name = "ring" -version = "0.16.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" -dependencies = [ - "cc", - "libc", - "once_cell", - "spin", - "untrusted", - "web-sys", - "winapi", -] - -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver", -] - -[[package]] -name = "rustls" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" -dependencies = [ - "base64", - "log", - "ring", - "sct", - "webpki", -] - -[[package]] -name = "rustversion" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb5d2a036dc6d2d8fd16fde3498b04306e29bd193bf306a57427019b823d5acd" - -[[package]] -name = "ryu" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" - -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "sct" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" - -[[package]] -name = "serde" -version = "1.0.125" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "558dc50e1a5a5fa7112ca2ce4effcb321b0300c0d4ccf0776a9f60cd89031171" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_bytes" -version = "0.11.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_derive" -version = "1.0.125" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b093b7a2bb58203b5da3056c05b4ec1fed827dcfdb37347a8841695263b3d06d" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79" -dependencies = [ - "indexmap", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_with" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b0b98f61935da47683bf5c46b965ce1642ef1db78860b8a1defb68bf1b5b43" -dependencies = [ - "rustversion", - "serde", - "serde_with_macros", -] - -[[package]] -name = "serde_with_macros" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48b35457e9d855d3dc05ef32a73e0df1e2c0fd72c38796a4ee909160c8eeec2" -dependencies = [ - "darling 0.12.4", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "sha-1" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfebf75d25bd900fd1e7d11501efab59bc846dbc76196839663e6637bba9f25f" -dependencies = [ - "block-buffer", - "cfg-if", - "cpuid-bool", - "digest", - "opaque-debug", -] - -[[package]] -name = "sha1" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" - -[[package]] -name = "sha2" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa827a14b29ab7f44778d14a88d3cb76e949c45083f7dbfa507d0cb699dc12de" -dependencies = [ - "block-buffer", - "cfg-if", - "cpuid-bool", - "digest", - "opaque-debug", -] - -[[package]] -name = "sharded-slab" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79c719719ee05df97490f80a45acfc99e5a30ce98a1e4fb67aee422745ae14e3" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "signal-hook-registry" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f1d0fef1604ba8f7a073c7e701f213e056707210e9020af4528e0101ce11a6" -dependencies = [ - "libc", -] - -[[package]] -name = "slab" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f173ac3d1a7e3b28003f40de0b5ce7fe2710f9b9dc3fc38664cebee46b3b6527" - -[[package]] -name = "smallvec" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" - -[[package]] -name = "socket2" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" -dependencies = [ - "cfg-if", - "libc", - "winapi", -] - -[[package]] -name = "socket2" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3dfc207c526015c632472a77be09cf1b6e46866581aecae5cc38fb4235dea2" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] -name = "standback" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" -dependencies = [ - "version_check", -] - -[[package]] -name = "stdweb" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" -dependencies = [ - "discard", - "rustc_version", - "stdweb-derive", - "stdweb-internal-macros", - "stdweb-internal-runtime", - "wasm-bindgen", -] - -[[package]] -name = "stdweb-derive" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" -dependencies = [ - "proc-macro2", - "quote", - "serde", - "serde_derive", - "syn", -] - -[[package]] -name = "stdweb-internal-macros" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" -dependencies = [ - "base-x", - "proc-macro2", - "quote", - "serde", - "serde_derive", - "serde_json", - "sha1", - "syn", -] - -[[package]] -name = "stdweb-internal-runtime" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" - -[[package]] -name = "stringprep" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ee348cb74b87454fff4b551cbf727025810a004f88aeacae7f85b87f4e9a1c1" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "strsim" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" - -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[package]] -name = "subtle" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" - -[[package]] -name = "syn" -version = "1.0.71" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad184cc9470f9117b2ac6817bfe297307418819ba40552f9b3846f05c33d5373" -dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", -] - -[[package]] -name = "take_mut" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" - -[[package]] -name = "thiserror" -version = "1.0.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0f4a65597094d4483ddaed134f409b2cb7c1beccf25201a9f73c719254fa98e" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7765189610d8241a44529806d6fd1f2e0a08734313a35d5b3a556f92b381f3c0" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "thread_local" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" -dependencies = [ - "once_cell", -] - -[[package]] -name = "time" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "time" -version = "0.2.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08a8cbfbf47955132d0202d1662f49b2423ae35862aee471f3ba4b133358f372" -dependencies = [ - "const_fn", - "libc", - "standback", - "stdweb", - "time-macros", - "version_check", - "winapi", -] - -[[package]] -name = "time-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1" -dependencies = [ - "proc-macro-hack", - "time-macros-impl", -] - -[[package]] -name = "time-macros-impl" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5c3be1edfad6027c69f5491cf4cb310d1a71ecd6af742788c6ff8bced86b8fa" -dependencies = [ - "proc-macro-hack", - "proc-macro2", - "quote", - "standback", - "syn", -] - -[[package]] -name = "tinyvec" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b5220f05bb7de7f3f53c7c065e1199b3172696fe2db9f9c4d8ad9b4ee74c342" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" - -[[package]] -name = "tokio" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83f0c8e7c0addab50b663055baf787d0af7f413a46e6e7fb9559a4e4db7137a5" -dependencies = [ - "autocfg", - "bytes", - "libc", - "memchr", - "mio", - "num_cpus", - "once_cell", - "parking_lot", - "pin-project-lite", - "signal-hook-registry", - "tokio-macros", - "winapi", -] - -[[package]] -name = "tokio-macros" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caf7b11a536f46a809a8a9f0bb4237020f70ecbf115b842360afb127ea2fda57" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tokio-rustls" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" -dependencies = [ - "rustls", - "tokio", - "webpki", -] - -[[package]] -name = "tokio-util" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "940a12c99365c31ea8dd9ba04ec1be183ffe4920102bb7122c2f515437601e8e" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "log", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "tower-service" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" - -[[package]] -name = "tracing" -version = "0.1.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ebdc2bb4498ab1ab5f5b73c5803825e60199229ccba0698170e3be0e7f959f" -dependencies = [ - "cfg-if", - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-appender" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9965507e507f12c8901432a33e31131222abac31edd90cabbcf85cf544b7127a" -dependencies = [ - "chrono", - "crossbeam-channel", - "tracing-subscriber", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42e6fa53307c8a17e4ccd4dc81cf5ec38db9209f59b222210375b54ee40d1e2" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tracing-core" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "tracing-log" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6923477a48e41c1951f1999ef8bb5a3023eb723ceadafe78ffb65dc366761e3" -dependencies = [ - "lazy_static", - "log", - "tracing-core", -] - -[[package]] -name = "tracing-serde" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb65ea441fbb84f9f6748fd496cf7f63ec9af5bca94dd86456978d055e8eb28b" -dependencies = [ - "serde", - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "705096c6f83bf68ea5d357a6aa01829ddbdac531b357b45abeca842938085baa" -dependencies = [ - "ansi_term", - "chrono", - "lazy_static", - "matchers", - "regex", - "serde", - "serde_json", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log", - "tracing-serde", -] - -[[package]] -name = "trust-dns-proto" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "952a078337565ba39007de99b151770f41039253a31846f0a3d5cd5a4ac8eedf" -dependencies = [ - "async-trait", - "cfg-if", - "data-encoding", - "enum-as-inner", - "futures-channel", - "futures-io", - "futures-util", - "idna", - "ipnet", - "lazy_static", - "log", - "rand 0.8.3", - "smallvec", - "thiserror", - "tinyvec", - "tokio", - "url", -] - -[[package]] -name = "trust-dns-resolver" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da9c97f7d103e0f94dbe384a57908833505ae5870126492f166821b7cf685589" -dependencies = [ - "cfg-if", - "futures-util", - "ipconfig", - "lazy_static", - "log", - "lru-cache", - "parking_lot", - "resolv-conf", - "smallvec", - "thiserror", - "tokio", - "trust-dns-proto", -] - -[[package]] -name = "try-lock" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" - -[[package]] -name = "typed-builder" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc955f27acc7a547f328f52f4a5a568986a31efec2fc6de865279f3995787b9" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "typenum" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06" - -[[package]] -name = "unicode-bidi" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeb8be209bb1c96b7c177c7420d26e04eccacb0eeae6b980e35fcb74678107e0" -dependencies = [ - "matches", -] - -[[package]] -name = "unicode-normalization" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07fbfce1c8a97d547e8b5334978438d9d6ec8c20e38f56d4a4374d181493eaef" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-segmentation" -version = "1.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796" - -[[package]] -name = "unicode-xid" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" - -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - -[[package]] -name = "url" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ccd964113622c8e9322cfac19eb1004a07e636c545f325da085d5cdde6f1f8b" -dependencies = [ - "form_urlencoded", - "idna", - "matches", - "percent-encoding", -] - -[[package]] -name = "uuid" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" -dependencies = [ - "getrandom 0.2.2", -] - -[[package]] -name = "version_check" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" - -[[package]] -name = "want" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" -dependencies = [ - "log", - "try-lock", -] - -[[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.2+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" - -[[package]] -name = "wasm-bindgen" -version = "0.2.73" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83240549659d187488f91f33c0f8547cbfef0b2088bc470c116d1d260ef623d9" -dependencies = [ - "cfg-if", - "serde", - "serde_json", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.73" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae70622411ca953215ca6d06d3ebeb1e915f0f6613e3b495122878d7ebec7dae" -dependencies = [ - "bumpalo", - "lazy_static", - "log", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81b8b767af23de6ac18bf2168b690bed2902743ddf0fb39252e36f9e2bfc63ea" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.73" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e734d91443f177bfdb41969de821e15c516931c3c3db3d318fa1b68975d0f6f" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.73" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53739ff08c8a68b0fdbcd54c372b8ab800b1449ab3c9d706503bc7dd1621b2c" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.73" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9a543ae66aa233d14bb765ed9af4a33e81b8b58d1584cf1b47ff8cd0b9e4489" - -[[package]] -name = "web-sys" -version = "0.3.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a905d57e488fec8861446d3393670fb50d27a262344013181c2cdf9fff5481be" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webpki" -version = "0.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "webpki-roots" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" -dependencies = [ - "webpki", -] - -[[package]] -name = "widestring" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c168940144dd21fd8046987c16a46a33d5fc84eec29ef9dcddc2ac9e31526b7c" - -[[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-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", -] - -[[package]] -name = "winreg" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" -dependencies = [ - "winapi", -] diff --git a/checker-rs/Cargo.toml b/checker-rs/Cargo.toml deleted file mode 100644 index b29e909..0000000 --- a/checker-rs/Cargo.toml +++ /dev/null @@ -1,16 +0,0 @@ -[package] -name = "checker-rs" -version = "0.1.0" -edition = "2018" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -enochecker = { git = "https://github.com/enowars/enochecker-rs", branch="main" } -actix-web = "^4.0.0-beta.6" -fake = { version = "*", features=['derive'] } -mongodb = "^2.0.0-alpha.1" -rand = "*" -regex = "*" -serde = "*" -tracing = "*" diff --git a/checker-rs/Dockerfile b/checker-rs/Dockerfile deleted file mode 100644 index 1a4cb8e..0000000 --- a/checker-rs/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM rust:latest - -WORKDIR /checker - -# Copy, fetch and prebuild dependencies in the container -RUN cargo init -COPY Cargo.* ./ -RUN cargo build --release - -# Copy all files into the container. -COPY ./src/ /checker/src/ -RUN touch /checker/src/main.rs - -RUN cargo build --release -ENTRYPOINT [ "cargo", "run", "--release"] diff --git a/checker-rs/docker-compose.yml b/checker-rs/docker-compose.yml deleted file mode 100644 index aae4d3d..0000000 --- a/checker-rs/docker-compose.yml +++ /dev/null @@ -1,16 +0,0 @@ -version: '3' - -services: - n0t3b00k-checker: - build: . - # The checker runs a HTTP interface, so we need to map port 5499 to the outside (port 8000). - ports: - - 8000:5499 - environment: - - MONGO_HOST=mongo - - MONGO_PORT=27017 - - mongo: - image: mongo - volumes: - - ./data:/data/db diff --git a/checker-rs/src/main.rs b/checker-rs/src/main.rs deleted file mode 100644 index f6dc094..0000000 --- a/checker-rs/src/main.rs +++ /dev/null @@ -1,340 +0,0 @@ -use enochecker::result::{CheckerError, CheckerResult}; -use enochecker::{ - async_trait, run_checker, - tokio::{spawn, try_join}, - Checker, CheckerRequest, -}; - -use std::env; - -use fake::{ - faker::internet::en::{FreeEmail, Password, SafeEmail, Username}, - Fake, -}; -use mongodb::{ - bson::doc, - options::{ClientOptions, StreamAddress}, - Client, -}; -use rand::random; -use serde::{Deserialize, Serialize}; -use tracing::{error, info, warn, Instrument}; - -mod notebook_client; -use notebook_client::NotebookClient; - -const DB_NAME: &str = "N0t3b00kCheckerDB"; - -const HELP_TEXT: &str = " -This is a notebook service. Commands: -reg USER PW - Register new account -log USER PW - Login to account -set TEXT..... - Set a note -user - List all users -list - List all notes -exit - Exit! -dump - Dump the database -get ID"; - -#[derive(Debug, Clone, Deserialize, Serialize)] -pub struct NotebookUser { - username: String, - password: String, - note_id: Option, - note: Option, - task_chain_id: String, -} - -impl NotebookUser { - fn gen_random(id: String) -> Self { - let username: String = if rand::random() { - if rand::random() { - FreeEmail().fake() - } else { - SafeEmail().fake() - } - } else { - Username().fake() - }; - - Self { - username, - password: Password(12..24).fake::(), - note_id: None, - note: None, - task_chain_id: id, - } - } -} - -struct NotebookChecker { - db: Client, -} - -impl NotebookChecker { - async fn new() -> Self { - let client = Client::with_options( - ClientOptions::builder() - .hosts(vec![StreamAddress { - hostname: env::var("MONGO_HOST").unwrap_or("mongo".to_string()), - port: Some( - env::var("MONGO_PORT") - .unwrap_or("27017".to_string()) - .parse() - .expect("MONGO_PORT is not valid!"), - ), - }]) - .build(), - ) - .expect("Failed to establish mongo-client"); - - //TODO: insert index - let index_creation_result = client - .database(DB_NAME) - .run_command( - doc! { - "createIndexes": "users", - "indexes": [{"key": {"task_chain_id": "hashed"}, "name": "ChainIndex" }] - }, - None, - ) - .await - .expect("Failed to create MongoDB Index"); - - // No Logger is created yet so we'll just use println! - println!("Mongo index created: {}", index_creation_result); - - for db_name in client - .list_database_names(None, None) - .await - .expect("Mongo conn failed") - { - println!("{}", db_name); - } - - NotebookChecker { db: client } - } - - async fn store_user(&self, user: NotebookUser) -> CheckerResult<()> { - self.db - .database(DB_NAME) - .collection("users") - .insert_one(user, None) - .await - .map_err(|e| { - error!("DB-Insert failed {:?}", e); - CheckerError::InternalError("Checker-DB insert failed") - })?; - - Ok(()) - } - - async fn find_user(&self, id: &str) -> CheckerResult> { - self.db - .database(DB_NAME) - .collection("users") - .find_one( - doc! { - "task_chain_id": id, - }, - None, - ) - .await - .map_err(|e| { - error!("DB-Find failed {:?}", e); - CheckerError::InternalError("Checker-DB find failed") - }) - } - - async fn deploy_flag_to_note(&self, checker_request: &CheckerRequest) -> CheckerResult<()> { - let mut client = NotebookClient::connect(checker_request).await?; - let user = NotebookUser::gen_random(checker_request.task_chain_id.clone()); - - client.register(&user).await?; - client.login(user).await?; - client - .set_note(checker_request.flag.as_ref().unwrap()) - .await?; - - self.store_user(client.user.clone().unwrap()).await?; - Ok(()) - } - - async fn check_flag_note(&self, checker_request: &CheckerRequest) -> CheckerResult<()> { - let user = self - .find_user(&checker_request.task_chain_id) - .await? - .ok_or(CheckerError::Mumble("Could not find old user"))?; - let mut client = NotebookClient::connect(checker_request).await?; - - client.login(user.clone()).await?; - let note_id = user.note_id.as_ref().unwrap(); - - let notes = client.get_notes().await?; - if !notes.contains(note_id) { - warn!("Flag-Id '{}' was not in list", note_id); - return Err(CheckerError::Mumble("Flag note is not in list")); - } - - let flag = client.get_note().await?; - if flag != checker_request.flag.as_ref().unwrap().as_str() { - warn!( - "Expected flag: '{}', got '{}'", - checker_request.flag.as_ref().unwrap(), - &flag - ); - return Err(CheckerError::Mumble("Note did not contain correct flag")); - } - - Ok(()) - } - - async fn deploy_noise_to_note(&self, checker_request: &CheckerRequest) -> CheckerResult<()> { - let mut client = NotebookClient::connect(checker_request).await?; - let user = NotebookUser::gen_random(checker_request.task_chain_id.clone()); - - client.register(&user).await?; - client.login(user).await?; - - client.set_note("sjgorisdr").await?; - - self.store_user(client.user.unwrap()).await - } - - async fn check_noise_note(&self, checker_request: &CheckerRequest) -> CheckerResult<()> { - let user = self - .find_user(&checker_request.task_chain_id) - .await? - .ok_or(CheckerError::Mumble("Could not find old user"))?; - let mut client = NotebookClient::connect(checker_request).await?; - - client.login(user).await?; - let noise = client.get_note().await?; - - if &noise != client.user.as_ref().unwrap().note.as_ref().unwrap() { - warn!( - "Expected noise note with content {}, instead got {}", - client.user.unwrap().note.unwrap(), - noise - ); - return Err(CheckerError::Mumble("Invalid note retrieved")); - } - Ok(()) - } - - async fn havoc_help(&self, checker_request: &CheckerRequest) -> CheckerResult<()> { - // Well this will mean that not all service-details will get test-coverage, - // however both lines are way too similar to warrant separete variants - let help_text = if random() { - info!("Getting help in an authenticated state"); - let user = NotebookUser::gen_random(checker_request.task_chain_id.clone()); - let mut client = NotebookClient::connect(checker_request).await?; - client.register(&user).await?; - client.login(user).await?; - client.get_help().await? - } else { - info!("Getting help immediately"); - let mut client = NotebookClient::connect(checker_request).await?; - client.get_help().await? - }; - - if help_text.as_str() != HELP_TEXT { - return Err(CheckerError::Mumble("Invalid Help")); - } - - Ok(()) - } - - async fn havoc_user(&self, checker_request: &CheckerRequest) -> CheckerResult<()> { - info!("Getting userlist immediately"); - let user = NotebookUser::gen_random(checker_request.task_chain_id.clone()); - let mut client = NotebookClient::connect(checker_request).await?; - client.register(&user).await?; - - let user1 = user.clone(); - let request2 = (*checker_request).clone(); - - // Test the userlist as the user itself - let future_auth = async move { - info!("Trying to get user list"); - client.login(user1).await?; - client.get_users().await - }; - - // And as any other connected user - let future_unauth = async move { - info!("Trying to get user list"); - let mut client = NotebookClient::connect(&request2).await?; - client.get_users().await - }; - - // Launch both tasks in parralel - // without spawn both would be still on the same thread and as such unable to run simultaneously - // but still execute concurrently - // Downside are some lifetime issues which need to be resolved - // Usually this can be done by giving ownership of necessary structs into the closure (meaning clone (or leak :P)) - let user_lists: (CheckerResult<_>, CheckerResult<_>) = try_join!( - spawn(future_auth.instrument(tracing::trace_span!("USERS-Authenticated"))), - spawn(future_unauth.instrument(tracing::trace_span!("USERS-Immediately"))), - ) - .map_err(|e| { - error!("Failed to run tasks in parallel {:?}", e); - CheckerError::InternalError("Join Failed") - })?; - - if !user_lists.0?.contains(&user.username) | !user_lists.1?.contains(&user.username) { - return Err(CheckerError::Mumble("User missing from list")); - } - Ok(()) - } -} - -#[async_trait] -impl Checker for NotebookChecker { - const SERVICE_NAME: &'static str = "n0t3b00k"; - const FLAG_VARIANTS: u64 = 1; - const NOISE_VARIANTS: u64 = 1; - const HAVOC_VARIANTS: u64 = 2; - - async fn putflag(&self, checker_request: &CheckerRequest) -> CheckerResult<()> { - match checker_request.variant_id { - 0 => self.deploy_flag_to_note(checker_request).await, - _ => Err(CheckerError::InternalError("Invalid variantId")), - } - } - - async fn getflag(&self, checker_request: &CheckerRequest) -> CheckerResult<()> { - match checker_request.variant_id { - 0 => self.check_flag_note(checker_request).await, - _ => Err(CheckerError::InternalError("Invalid variantId")), - } - } - - async fn putnoise(&self, checker_request: &CheckerRequest) -> CheckerResult<()> { - // Tracing information https://docs.rs/tracing/ - match checker_request.variant_id { - 0 => self.deploy_noise_to_note(checker_request).await, - _ => Err(CheckerError::InternalError("Invalid variantId")), - } - } - - async fn getnoise(&self, checker_request: &CheckerRequest) -> CheckerResult<()> { - match checker_request.variant_id { - 0 => self.check_noise_note(checker_request).await, - _ => Err(CheckerError::InternalError("Invalid variantId")), - } - } - - async fn havoc(&self, checker_request: &CheckerRequest) -> CheckerResult<()> { - match checker_request.variant_id { - 0 => self.havoc_help(checker_request).await, - 1 => self.havoc_user(checker_request).await, - _ => Err(CheckerError::InternalError("Invalid variantId")), - } - } -} - -#[actix_web::main] -async fn main() -> std::io::Result<()> { - run_checker(NotebookChecker::new().await, 5499).await -} diff --git a/checker-rs/src/notebook_client.rs b/checker-rs/src/notebook_client.rs deleted file mode 100644 index 686da5e..0000000 --- a/checker-rs/src/notebook_client.rs +++ /dev/null @@ -1,295 +0,0 @@ -use crate::NotebookUser; - -use std::io; - -use enochecker::{ - result::{CheckerError, CheckerResult, CheckerfromIOResult, IntoCheckerResult}, - tokio::{ - io::{AsyncBufRead, AsyncBufReadExt, AsyncReadExt, AsyncWriteExt, BufStream}, - net::TcpStream, - }, - CheckerRequest, -}; - -use tracing::{debug, info, instrument, warn}; -/// reads until the delimiter given in delim is found or EOF if found or another Error occurs -/// -/// # Return -/// Number of bytes read - -const PROMPT: &[u8] = b"\n> "; -const WELCOME_BANNER: &[u8] = b"Welcome to the 1337 n0t3b00k!\n> "; -const REGISTRATION_SUCCESS: &[u8] = b"User successfully registered"; -const LOGIN_SUCCESS: &[u8] = b"Successfully logged in!"; - -pub async fn read_until_slice<'a, T: AsyncBufRead + Unpin>( - stream: &'a mut T, - delim: &'a [u8], - buf: &'a mut Vec, -) -> io::Result { - let mut bytes_read: usize = 0; - let mut inc_read; - - let delim_end = *delim.last().ok_or_else(|| { - io::Error::new( - io::ErrorKind::InvalidInput, - "read_until_slice recieved empty delimiter", - ) - })?; - - loop { - inc_read = stream.read_until(delim_end, buf).await?; - if inc_read == 0 { - return Err(io::Error::new( - io::ErrorKind::UnexpectedEof, - "Delimiter could not be found before EOF was hit", - )); - } - bytes_read += inc_read; - if buf.ends_with(delim) { - buf.truncate(buf.len() - delim.len()); - return Ok(bytes_read); - } - } -} - -pub fn bytes_debug_repr(bytes: &[u8]) -> String { - let mut bytes_repr = "b'".to_owned(); - for b in bytes { - let b_escaped: Vec<_> = std::ascii::escape_default(*b).collect(); - bytes_repr.push_str(std::str::from_utf8(&b_escaped).unwrap()); - } - bytes_repr.push('\''); - bytes_repr -} - -#[derive(Debug)] -pub struct NotebookClient { - pub conn: BufStream, - pub user: Option, -} - -impl NotebookClient { - const SERVICE_PORT: u16 = 2323; - - #[instrument("CONNECT")] - pub async fn connect(request: &CheckerRequest) -> CheckerResult { - info!("Connecting to service"); - let mut conn = - match TcpStream::connect((request.address.as_str(), Self::SERVICE_PORT)).await { - Ok(conn) => BufStream::new(conn), - Err(e) => { - info!("Failed to connect to service!, {:?}", e); - return Err(CheckerError::Offline("Connection to service failed")); - } - }; - - debug!("Fetching Welcome Banner"); - let mut welcome_banner = [0; WELCOME_BANNER.len()]; - conn.read_exact(&mut welcome_banner) - .await - .into_checker_result("Connection error on login")?; - - if &welcome_banner != WELCOME_BANNER { - warn!( - "Welcome Banner fetching failed, response {}", - bytes_debug_repr(&welcome_banner) - ); - return Err(CheckerError::Mumble("Failed to fetch Welcome Banner")); - } - - Ok(Self { conn, user: None }) - } - - #[instrument("REGISTER")] - pub async fn register(&mut self, user: &NotebookUser) -> CheckerResult<()> { - info!("Registering User: {:?}", user); - - let login_str = format!("reg {} {}\n", user.username, user.password); - self.conn - .write_all(login_str.as_bytes()) - .await - .map_err(|_| { - warn!("User registration failed {:?}", user); - CheckerError::Mumble("Failed to register user") - })?; - self.conn.flush().await.map_err(|e| { - info!("Flush failed -- {}", e); - CheckerError::Mumble("Falied to register user") - })?; - - debug!("Waiting for registration to complete"); - let mut response = Vec::with_capacity(100); - read_until_slice(&mut self.conn, PROMPT, &mut response) - .await - .into_checker_result("Registration closed connection")?; - - if response != REGISTRATION_SUCCESS { - info!("Unexpected response: {}", bytes_debug_repr(&response)); - return Err(CheckerError::Mumble("Registration Failed")); - } - - Ok(()) - } - - #[instrument("LOGIN")] - pub async fn login(&mut self, user: NotebookUser) -> CheckerResult<()> { - info!("Logging in as {:?}", &user); - self.user = Some(user); - let user_ref = self.user.as_ref().unwrap(); - let conn = &mut self.conn; - - let mut response_buf = Vec::with_capacity(64); - async { - let login_str = format!("log {} {}\n", user_ref.username, user_ref.password); - conn.write_all(login_str.as_bytes()).await?; - conn.flush().await?; - - debug!("Waiting for login"); - read_until_slice(conn, PROMPT, &mut response_buf).await - } - .await - .into_checker_result("Login failed")?; - - if response_buf != LOGIN_SUCCESS { - info!("Unexpected response: {}", bytes_debug_repr(&response_buf)); - return Err(CheckerError::Mumble("Login failed")); - } - - Ok(()) - } - - #[instrument("SET_NOTE")] - pub async fn set_note(&mut self, note: &str) -> CheckerResult<()> { - info!("Deploying Note {}", note); - - let conn = &mut self.conn; - - let mut response_buf = Vec::with_capacity(64); - async { - let request = format!("set {}\n", note); - debug!("running: '{}'", request); - conn.write_all(request.as_bytes()).await?; - conn.flush().await?; - - read_until_slice(conn, PROMPT, &mut response_buf).await - } - .await - .into_checker_result("Set-Note connection error")?; - - let response = String::from_utf8(response_buf).into_mumble("Response is invalid UTF8")?; - let note_id = response - .split("Note saved! ID is ") - .nth(1) - .and_then(|substr| substr.split('!').next()) - .ok_or(CheckerError::Mumble("Failed to set note"))?; - - self.user.as_mut().unwrap().note = Some(note.to_string()); - self.user.as_mut().unwrap().note_id = Some(note_id.to_string()); - - Ok(()) - } - - #[instrument("GET_NOTE")] - pub async fn get_note(&mut self) -> CheckerResult { - info!( - "Retirieving Note for user {:?}", - self.user.as_ref().expect("Getting note of NONE-User") - ); - - let conn = &mut self.conn; - let note_id = self - .user - .as_ref() - .unwrap() - .note_id - .as_ref() - .expect("No NoteId for saved user"); - - let mut response_buf = Vec::with_capacity(256); - async { - let request = format!("get {}\n", note_id); - debug!("request: '{}'", request); - conn.write_all(request.as_bytes()).await?; - conn.flush().await?; - - read_until_slice(conn, PROMPT, &mut response_buf).await - } - .await - .into_checker_result("Connection error upon fetching note")?; - - Ok(String::from_utf8(response_buf).into_mumble("Response contains invalid UTF8")?) - } - - #[instrument("GET_HELP")] - pub async fn get_help(&mut self) -> CheckerResult { - info!("Getting help"); - - let conn = &mut self.conn; - let mut response_buf = Vec::with_capacity(512); - async { - conn.write_all(b"help\n").await?; - conn.flush().await?; - - read_until_slice(conn, PROMPT, &mut response_buf).await - } - .await - .into_checker_result("Connection error upon getting help")?; - - Ok(String::from_utf8(response_buf).into_mumble("Response contains invalid UTF8")?) - } - - #[instrument("GET_USERS")] - pub async fn get_users(&mut self) -> CheckerResult> { - info!("Listing users"); - - let conn = &mut self.conn; - let mut response_buf = Vec::with_capacity(512); - async { - conn.write_all(b"user\n").await?; - conn.flush().await?; - - read_until_slice(conn, PROMPT, &mut response_buf).await - } - .await - .into_checker_result("Connection error trying to get user list")?; - - let users = String::from_utf8(response_buf).into_mumble("Response is invalid UTF8")?; - - let user_arr: Vec = users - .split('\n') - .filter_map(|line| { - line.split(": ") - .nth(1) - .map(std::string::ToString::to_string) - }) - .collect(); - - Ok(user_arr) - } - - #[instrument("GET_NOTES")] - pub async fn get_notes(&mut self) -> CheckerResult> { - info!("Getting Note List"); - - let conn = &mut self.conn; - let mut response_buf = Vec::with_capacity(512); - async { - conn.write_all(b"list\n").await?; - conn.flush().await?; - - read_until_slice(conn, PROMPT, &mut response_buf).await - } - .await - .into_checker_result("Connection error upon getting note listing")?; - - let notes = String::from_utf8(response_buf).into_mumble("Response is invalid UTF8")?; - - let note_arr: Vec = notes - .split('\n') - .filter_map(|line| line.split(": ").nth(1).map(ToString::to_string)) - .collect(); - - Ok(note_arr) - } -} diff --git a/checker2/.dockerignore b/checker2/.dockerignore deleted file mode 100644 index c003e83..0000000 --- a/checker2/.dockerignore +++ /dev/null @@ -1,6 +0,0 @@ -data/ -Dockerfile -docker-compose.yml -.dockerignore -.gitignore -.env \ No newline at end of file diff --git a/checker2/.gitignore b/checker2/.gitignore deleted file mode 100644 index 8fce603..0000000 --- a/checker2/.gitignore +++ /dev/null @@ -1 +0,0 @@ -data/ diff --git a/checker2/Dockerfile b/checker2/Dockerfile deleted file mode 100644 index fc36fdd..0000000 --- a/checker2/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM python:3.9 - -# Create user -RUN useradd -ms /bin/bash -u 1000 checker - -USER checker -WORKDIR /checker - -# Install all required dependencies for the checker. -COPY ./src/requirements.txt /checker/requirements.txt -RUN pip3 install -r requirements.txt - -# Copy all files into the container. -COPY ./src/ /checker/ - - -ENTRYPOINT [ "/home/checker/.local/bin/gunicorn", "-c", "gunicorn.conf.py", "checker:app" ] diff --git a/checker2/docker-compose.yml b/checker2/docker-compose.yml deleted file mode 100644 index 6a12111..0000000 --- a/checker2/docker-compose.yml +++ /dev/null @@ -1,23 +0,0 @@ -version: '3' -services: - # Give your container proper names! - n0t3b00k-checker: - build: . - # The checker runs a HTTP interfaces, so we need to map port 3031 to the outside (port 8000). - ports: - - 8000:3031 - environment: - - MONGO_ENABLED=1 - - MONGO_HOST=n0t3b00k-mongo - - MONGO_PORT=27017 - - MONGO_USER=n0t3b00k_checker - - MONGO_PASSWORD=n0t3b00k_checker - - # The python checkerlib requires a mongo db! - n0t3b00k-mongo: - image: mongo - volumes: - - ./data:/data/db - environment: - MONGO_INITDB_ROOT_USERNAME: n0t3b00k_checker - MONGO_INITDB_ROOT_PASSWORD: n0t3b00k_checker \ No newline at end of file diff --git a/checker2/src/checker.py b/checker2/src/checker.py deleted file mode 100644 index dd92fd3..0000000 --- a/checker2/src/checker.py +++ /dev/null @@ -1,432 +0,0 @@ -#!/usr/bin/env python3 -from enochecker import BaseChecker, BrokenServiceException, EnoException, run -from enochecker.utils import SimpleSocket, assert_equals, assert_in -import random -import string - -#### Checker Tenets -# A checker SHOULD not be easily identified by the examination of network traffic => This one is not satisfied, because our usernames and notes are simple too random and easily identifiable. -# A checker SHOULD use unusual, incorrect or pseudomalicious input to detect network filters => This tenet is not satisfied, because we do not send common attack strings (i.e. for SQL injection, RCE, etc.) in our notes or usernames. -#### - - -class N0t3b00kChecker(BaseChecker): - """ - Change the methods given here, then simply create the class and .run() it. - Magic. - A few convenient methods and helpers are provided in the BaseChecker. - ensure_bytes ans ensure_unicode to make sure strings are always equal. - As well as methods: - self.connect() connects to the remote server. - self.get and self.post request from http. - self.chain_db is a dict that stores its contents to a mongodb or filesystem. - conn.readline_expect(): fails if it's not read correctly - To read the whole docu and find more goodies, run python -m pydoc enochecker - (Or read the source, Luke) - """ - - ##### EDIT YOUR CHECKER PARAMETERS - flag_variants = 1 - noise_variants = 1 - havoc_variants = 3 - exploit_variants = 3 - service_name = "n0t3b00k" - port = 2323 # The port will automatically be picked up as default by self.connect and self.http. - ##### END CHECKER PARAMETERS - - def register_user(self, conn: SimpleSocket, username: str, password: str): - self.debug( - f"Sending command to register user: {username} with password: {password}" - ) - conn.write(f"reg {username} {password}\n") - conn.readline_expect( - b"User successfully registered", - read_until=b">", - exception_message="Failed to register user", - ) - - def login_user(self, conn: SimpleSocket, username: str, password: str): - self.debug(f"Sending command to login.") - conn.write(f"log {username} {password}\n") - conn.readline_expect( - b"Successfully logged in!", - read_until=b">", - exception_message="Failed to log in", - ) - - def putflag(self): # type: () -> None - """ - This method stores a flag in the service. - In case multiple flags are provided, self.variant_id gives the appropriate index. - The flag itself can be retrieved from self.flag. - On error, raise an Eno Exception. - :raises EnoException on error - :return this function can return a result if it wants - if nothing is returned, the service status is considered okay. - the preferred way to report errors in the service is by raising an appropriate enoexception - """ - if self.variant_id == 0: - # First we need to register a user. So let's create some random strings. (Your real checker should use some funny usernames or so) - username: str = "".join( - random.choices(string.ascii_uppercase + string.digits, k=12) - ) - password: str = "".join( - random.choices(string.ascii_uppercase + string.digits, k=12) - ) - - # Log a message before any critical action that could raise an error. - self.debug(f"Connecting to service") - # Create a TCP connection to the service. - conn = self.connect() - welcome = conn.read_until(">") - - # Register a new user - self.register_user(conn, username, password) - - # Now we need to login - self.login_user(conn, username, password) - - # Finally, we can post our note! - self.debug(f"Sending command to set the flag") - conn.write(f"set {self.flag}\n") - conn.read_until(b"Note saved! ID is ") - - try: - # Try to retrieve the resulting noteId. Using rstrip() is hacky, you should probably want to use regular expressions or something more robust. - noteId = conn.read_until(b"!\n>").rstrip(b"!\n>").decode() - except Exception as ex: - self.debug(f"Failed to retrieve note: {ex}") - raise BrokenServiceException("Could not retrieve NoteId") - - assert_equals(len(noteId) > 0, True, message="Empty noteId received") - - self.debug(f"Got noteId {noteId}") - - # Exit! - self.debug(f"Sending exit command") - conn.write(f"exit\n") - conn.close() - - # Save the generated values for the associated getflag() call. - # This is not a real dictionary! You cannot update it (i.e., self.chain_db["foo"] = bar) and some types are converted (i.e., bool -> str.). See: https://github.com/enowars/enochecker/issues/27 - self.chain_db = { - "username": username, - "password": password, - "noteId": noteId, - } - - else: - raise EnoException("Wrong variant_id provided") - - def getflag(self): # type: () -> None - """ - This method retrieves a flag from the service. - Use self.flag to get the flag that needs to be recovered and self.round to get the round the flag was placed in. - On error, raise an EnoException. - :raises EnoException on error - :return this function can return a result if it wants - if nothing is returned, the service status is considered okay. - the preferred way to report errors in the service is by raising an appropriate enoexception - """ - if self.variant_id == 0: - # First we check if the previous putflag succeeded! - try: - username: str = self.chain_db["username"] - password: str = self.chain_db["password"] - noteId: str = self.chain_db["noteId"] - except Exception as ex: - self.debug(f"error getting notes from db: {ex}") - raise BrokenServiceException("Previous putflag failed.") - - self.debug(f"Connecting to the service") - conn = self.connect() - welcome = conn.read_until(">") - - # Let's login to the service - self.login_user(conn, username, password) - - # Let´s obtain our note. - self.debug(f"Sending command to retrieve note: {noteId}") - conn.write(f"get {noteId}\n") - note = conn.read_until(">") - assert_in( - self.flag.encode(), note, "Resulting flag was found to be incorrect" - ) - - # Exit! - self.debug(f"Sending exit command") - conn.write(f"exit\n") - conn.close() - else: - raise EnoException("Wrong variant_id provided") - - - def putnoise(self): # type: () -> None - """ - This method stores noise in the service. The noise should later be recoverable. - The difference between noise and flag is, that noise does not have to remain secret for other teams. - This method can be called many times per round. Check how often using self.variant_id. - On error, raise an EnoException. - :raises EnoException on error - :return this function can return a result if it wants - if nothing is returned, the service status is considered okay. - the preferred way to report errors in the service is by raising an appropriate enoexception - """ - if self.variant_id == 0: - self.debug(f"Connecting to the service") - conn = self.connect() - welcome = conn.read_until(">") - - # First we need to register a user. So let's create some random strings. (Your real checker should use some better usernames or so [i.e., use the "faker¨ lib]) - username = "".join( - random.choices(string.ascii_uppercase + string.digits, k=12) - ) - password = "".join( - random.choices(string.ascii_uppercase + string.digits, k=12) - ) - randomNote = "".join( - random.choices(string.ascii_uppercase + string.digits, k=36) - ) - - # Register another user - self.register_user(conn, username, password) - - # Now we need to login - self.login_user(conn, username, password) - - # Finally, we can post our note! - self.debug(f"Sending command to save a note") - conn.write(f"set {randomNote}\n") - conn.read_until(b"Note saved! ID is ") - - try: - noteId = conn.read_until(b"!\n>").rstrip(b"!\n>").decode() - except Exception as ex: - self.debug(f"Failed to retrieve note: {ex}") - raise BrokenServiceException("Could not retrieve NoteId") - - assert_equals(len(noteId) > 0, True, message="Empty noteId received") - - self.debug(f"{noteId}") - - # Exit! - self.debug(f"Sending exit command") - conn.write(f"exit\n") - conn.close() - - self.chain_db = { - "username": username, - "password": password, - "noteId": noteId, - "note": randomNote, - } - else: - raise EnoException("Wrong variant_id provided") - - def getnoise(self): # type: () -> None - """ - This method retrieves noise in the service. - The noise to be retrieved is inside self.flag - The difference between noise and flag is, that noise does not have to remain secret for other teams. - This method can be called many times per round. Check how often using variant_id. - On error, raise an EnoException. - :raises EnoException on error - :return this function can return a result if it wants - if nothing is returned, the service status is considered okay. - the preferred way to report errors in the service is by raising an appropriate enoexception - """ - if self.variant_id == 0: - try: - username: str = self.chain_db["username"] - password: str = self.chain_db["password"] - noteId: str = self.chain_db["noteId"] - randomNote: str = self.chain_db["note"] - except Exception as ex: - self.debug("Failed to read db {ex}") - raise BrokenServiceException("Previous putnoise failed.") - - self.debug(f"Connecting to service") - conn = self.connect() - welcome = conn.read_until(">") - - # Let's login to the service - self.login_user(conn, username, password) - - # Let´s obtain our note. - self.debug(f"Sending command to retrieve note: {noteId}") - conn.write(f"get {noteId}\n") - conn.readline_expect( - randomNote.encode(), - read_until=b">", - exception_message="Resulting flag was found to be incorrect" - ) - - # Exit! - self.debug(f"Sending exit command") - conn.write(f"exit\n") - conn.close() - else: - raise EnoException("Wrong variant_id provided") - - def havoc(self): # type: () -> None - """ - This method unleashes havoc on the app -> Do whatever you must to prove the service still works. Or not. - On error, raise an EnoException. - :raises EnoException on Error - :return This function can return a result if it wants - If nothing is returned, the service status is considered okay. - The preferred way to report Errors in the service is by raising an appropriate EnoException - """ - self.debug(f"Connecting to service") - conn = self.connect() - welcome = conn.read_until(">") - - if self.variant_id == 0: - # In variant 1, we'll check if the help text is available - self.debug(f"Sending help command") - conn.write(f"help\n") - is_ok = conn.read_until(">") - - for line in [ - "This is a notebook service. Commands:", - "reg USER PW - Register new account", - "log USER PW - Login to account", - "set TEXT..... - Set a note", - "user - List all users", - "list - List all notes", - "exit - Exit!", - "dump - Dump the database", - "get ID", - ]: - assert_in(line.encode(), is_ok, "Received incomplete response.") - - elif self.variant_id == 1: - # In variant 2, we'll check if the `user` command still works. - username = "".join( - random.choices(string.ascii_uppercase + string.digits, k=12) - ) - password = "".join( - random.choices(string.ascii_uppercase + string.digits, k=12) - ) - - # Register and login a dummy user - self.register_user(conn, username, password) - self.login_user(conn, username, password) - - self.debug(f"Sending user command") - conn.write(f"user\n") - ret = conn.readline_expect( - "User 0: ", - read_until=b">", - exception_message="User command does not return any users", - ) - - if username: - assert_in(username.encode(), ret, "Flag username not in user output") - - elif self.variant_id == 2: - # In variant 2, we'll check if the `list` command still works. - username = "".join( - random.choices(string.ascii_uppercase + string.digits, k=12) - ) - password = "".join( - random.choices(string.ascii_uppercase + string.digits, k=12) - ) - randomNote = "".join( - random.choices(string.ascii_uppercase + string.digits, k=36) - ) - - # Register and login a dummy user - self.register_user(conn, username, password) - self.login_user(conn, username, password) - - self.debug(f"Sending command to save a note") - conn.write(f"set {randomNote}\n") - conn.read_until(b"Note saved! ID is ") - - try: - noteId = conn.read_until(b"!\n>").rstrip(b"!\n>").decode() - except Exception as ex: - self.debug(f"Failed to retrieve note: {ex}") - raise BrokenServiceException("Could not retrieve NoteId") - - assert_equals(len(noteId) > 0, True, message="Empty noteId received") - - self.debug(f"{noteId}") - - self.debug(f"Sending list command") - conn.write(f"list\n") - conn.readline_expect( - noteId.encode(), - read_until=b'>', - exception_message="List command does not work as intended" - ) - - else: - raise EnoException("Wrong variant_id provided") - - # Exit! - self.debug(f"Sending exit command") - conn.write(f"exit\n") - conn.close() - - def exploit(self): - """ - This method was added for CI purposes for exploits to be tested. - Will (hopefully) not be called during actual CTF. - :raises EnoException on Error - :return This function can return a result if it wants - If nothing is returned, the service status is considered okay. - The preferred way to report Errors in the service is by raising an appropriate EnoException - """ - if self.variant_id == 0: - conn = self.connect() - welcome = conn.read_until(">") - conn.write(b"dump\nexit\n") - data = conn.read_all() - if flag := self.search_flag_bytes(data): - return flag - raise BrokenServiceException("flag not found") - elif self.variant_id == 1: - conn = self.connect() - welcome = conn.read_until(">") - conn.write(b"user\n") - user_list = conn.read_until(b">").split(b"\n")[:-1] - for user in user_list: - user_name = user.split()[-1] - conn.write(b"reg %s foo\nlog %s foo\n list\n" % (user_name, user_name)) - conn.read_until(b">") # successfully registered - conn.read_until(b">") # successfully logged in - notes_list = conn.read_until(b">").split(b"\n")[:-1] - for note in notes_list: - note_id = note.split()[-1] - conn.write(b"get %s\n" % note_id) - data = conn.read_until(b">") - if flag := self.search_flag_bytes(data): - return flag - raise BrokenServiceException("flag not found") - elif self.variant_id == 2: - conn = self.connect() - welcome = conn.read_until(">") - conn.write(b"user\n") - user_list = conn.read_until(b">").split(b"\n")[:-1] - for user in user_list: - user_name = user.split()[-1] - conn.write(b"reg ../users/%s foo\nlog %s foo\n list\n" % (user_name, user_name)) - conn.read_until(b">") # successfully registered - conn.read_until(b">") # successfully logged in - notes_list = conn.read_until(b">").split(b"\n")[:-1] - for note in notes_list: - note_id = note.split()[-1] - conn.write(b"get %s\n" % note_id) - data = conn.read_until(b">") - if flag := self.search_flag_bytes(data): - return flag - raise BrokenServiceException("flag not found") - - raise EnoException("wrong variant_id provided") - - -app = N0t3b00kChecker.service # This can be used for uswgi. -if __name__ == "__main__": - run(N0t3b00kChecker) diff --git a/checker2/src/gunicorn.conf.py b/checker2/src/gunicorn.conf.py deleted file mode 100644 index a382951..0000000 --- a/checker2/src/gunicorn.conf.py +++ /dev/null @@ -1,7 +0,0 @@ -# This is a configuration file required by the checker. -import multiprocessing -worker_class = "eventlet" -workers = multiprocessing.cpu_count()*2+1 -bind = "0.0.0.0:3031" -timeout = 90 -keepalive = 3600 \ No newline at end of file diff --git a/checker2/src/requirements.txt b/checker2/src/requirements.txt deleted file mode 100644 index eb7bc30..0000000 --- a/checker2/src/requirements.txt +++ /dev/null @@ -1,23 +0,0 @@ -certifi==2020.12.5 -chardet==4.0.0 -click==7.1.2 -dnspython==1.16.0 -enochecker==0.4.2 -enochecker-cli==0.7.0 -enochecker-core==0.10.0 -eventlet==0.30.2 -Flask==1.1.2 -greenlet==1.0.0 -gunicorn==20.1.0 -idna==2.10 -itsdangerous==1.1.0 -Jinja2==2.11.3 -jsons==1.4.2 -MarkupSafe==1.1.1 -pycryptodome==3.10.1 -pymongo==3.11.3 -requests==2.25.1 -six==1.15.0 -typish==1.9.2 -urllib3==1.26.4 -Werkzeug==1.0.1 diff --git a/checker_cs/.dockerignore b/checker_cs/.dockerignore deleted file mode 100644 index dba0748..0000000 --- a/checker_cs/.dockerignore +++ /dev/null @@ -1,7 +0,0 @@ -.dockerignore -Dockerfile -docker-compose.yml -bin/ -obj/ -.vs -.vs-code diff --git a/checker_cs/.gitignore b/checker_cs/.gitignore deleted file mode 100644 index c940330..0000000 --- a/checker_cs/.gitignore +++ /dev/null @@ -1,364 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*[.json, .xml, .info] - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -Gamemaster/wwwroot -Gamemaster/Frontend/assets -Gamemaster/Frontend/**/*.js -Gamemaster/Frontend/**/*.map -Gamemaster/Gamemaster.db* -.vscode/ diff --git a/checker_cs/Dockerfile b/checker_cs/Dockerfile deleted file mode 100644 index 495350a..0000000 --- a/checker_cs/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build -WORKDIR /src - -# Fetch dependencies -COPY N0t3b00kChecker.sln . -COPY N0t3b00kChecker/N0t3b00kChecker.csproj N0t3b00kChecker/N0t3b00kChecker.csproj -RUN dotnet restore - -# Publish -COPY . . -RUN dotnet publish -c Release --self-contained true -o /build - -# Copy to runtime container -FROM ghcr.io/enowars/enochecker-dotnet:latest -COPY --from=build /build /N0t3b00kChecker - -CMD ["/N0t3b00kChecker/N0t3b00kChecker.dll"] diff --git a/checker_cs/N0t3b00kChecker.sln b/checker_cs/N0t3b00kChecker.sln deleted file mode 100644 index cd1e4cf..0000000 --- a/checker_cs/N0t3b00kChecker.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31129.286 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "N0t3b00kChecker", "N0t3b00kChecker\N0t3b00kChecker.csproj", "{EBF4952C-188D-4BDC-B5E2-07BECFB9C32B}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {EBF4952C-188D-4BDC-B5E2-07BECFB9C32B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EBF4952C-188D-4BDC-B5E2-07BECFB9C32B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EBF4952C-188D-4BDC-B5E2-07BECFB9C32B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EBF4952C-188D-4BDC-B5E2-07BECFB9C32B}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {7080A991-5811-48E5-82F5-E885E77EDDD7} - EndGlobalSection -EndGlobal diff --git a/checker_cs/N0t3b00kChecker/Checker.cs b/checker_cs/N0t3b00kChecker/Checker.cs deleted file mode 100644 index 89abebe..0000000 --- a/checker_cs/N0t3b00kChecker/Checker.cs +++ /dev/null @@ -1,276 +0,0 @@ -using Bogus; -using EnoCore.Checker; -using EnoCore.Models; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Logging; -using N0t3b00kChecker.Db; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading; -using System.Threading.Tasks; - -namespace N0t3b00kChecker -{ - public class Checker : IChecker - { - public static int SERVICE_PORT = 2323; - private static readonly string HELP = "\nThis is a notebook service. Commands:\n" + - "reg USER PW - Register new account\n" + - "log USER PW - Login to account\n" + - "set TEXT..... - Set a note\n" + - "user - List all users\n" + - "list - List all notes\n" + - "exit - Exit!\n" + - "dump - Dump the database\n" + - "get ID"; - private readonly static Faker faker = new Faker("de"); - private readonly IServiceProvider serviceProvider; - private readonly ILogger logger; - private readonly CheckerDb checkerDb; - - - public Checker(ILogger logger, CheckerDb checkerDb, IServiceProvider serviceProvider) - { - this.logger = logger; - this.checkerDb = checkerDb; - this.serviceProvider = serviceProvider; - } - - public async Task HandleGetFlag(CheckerTaskMessage task, CancellationToken token) - { - switch (task.VariantId) - { - case 0: - await CheckFlagInNote(task, token); - break; - default: - throw new InvalidOperationException(); - } - } - - public async Task HandleGetNoise(CheckerTaskMessage task, CancellationToken token) - { - switch (task.VariantId) - { - case 0: - await CheckNoiseInNote(task, token); - break; - default: - throw new InvalidOperationException(); - } - } - - public async Task HandleHavoc(CheckerTaskMessage task, CancellationToken token) - { - switch (task.VariantId) - { - case 0: - await HavocHelp(task, token); - break; - case 1: - await HavocUser(task, token); - break; - case 2: - await HavocNotesList(task, token); - break; - default: - throw new InvalidOperationException(); - } - } - - public async Task HandlePutFlag(CheckerTaskMessage task, CancellationToken token) - { - switch (task.VariantId) - { - case 0: - await DeployFlagToNote(task, token); - break; - default: - throw new InvalidOperationException(); - } - } - - public async Task HandlePutNoise(CheckerTaskMessage task, CancellationToken token) - { - switch (task.VariantId) - { - case 0: - await DeployNoiseToNote(task, token); - break; - default: - throw new InvalidOperationException(); - } - } - - private async Task DeployFlagToNote(CheckerTaskMessage task, CancellationToken token) - { - using var client = this.serviceProvider.GetRequiredService(); - - // Connect - await client.Connect(task, token); - - // Register - var user = new NotebookUser() - { - Username = faker.Internet.UserName() + DateTime.UtcNow.Millisecond, - Password = faker.Internet.Password(), - Note = task.Flag, - TaskChainId = task.TaskChainId - }; - await client.Register(user, token); - await client.Login(user, token); - - // Deploy flag to note - user.NoteId = await client.SetNote(task.Flag!, token); - - // Save creds - await checkerDb.InsertNotebookUser(user, token); - - // Exit TODO - } - - private async Task CheckFlagInNote(CheckerTaskMessage task, CancellationToken token) - { - using var client = this.serviceProvider.GetRequiredService(); - var user = await this.checkerDb.FindNotebookUser(task.TaskChainId, token); - await client.Connect(task, token); - - // Login - await client.Login(user, token); - - var note = await client.GetNote(user.NoteId!, token); - - if (note != task.Flag) - { - this.logger.LogWarning($"Expected flag, got {note}"); - throw new MumbleException($"Flag is no longer in note"); - } - - // Exit TODO - } - - private async Task DeployNoiseToNote(CheckerTaskMessage task, CancellationToken token) - { - using var client = this.serviceProvider.GetRequiredService(); - - // Connect - await client.Connect(task, token); - - // Register - var user = new NotebookUser() - { - Username = faker.Internet.UserName() + DateTime.UtcNow.Millisecond, - Password = faker.Internet.Password(), - Note = faker.Company.Bs(), - TaskChainId = task.TaskChainId - }; - await client.Register(user, token); - await client.Login(user, token); - - // Deploy flag to note - user.NoteId = await client.SetNote(user.Note, token); - - // Save creds - await checkerDb.InsertNotebookUser(user, token); - - // Exit TODO - } - - - private async Task CheckNoiseInNote(CheckerTaskMessage task, CancellationToken token) - { - using var client = this.serviceProvider.GetRequiredService(); - var user = await this.checkerDb.FindNotebookUser(task.TaskChainId, token); - await client.Connect(task, token); - - // Login - await client.Login(user, token); - - var note = await client.GetNote(user.NoteId!, token); - - if (note != user.Note) - { - this.logger.LogWarning($"Expected flag, got {note}"); - throw new MumbleException($"Flag is no longer in note"); - } - - // Exit TODO - } - - private async Task HavocHelp(CheckerTaskMessage task, CancellationToken token) - { - this.logger.LogInformation("Testing the help menu"); - using var client = this.serviceProvider.GetRequiredService(); - await client.Connect(task, token); - - var help = await client.GetHelp(token); - if (help != HELP) - { - this.logger.LogInformation($"Unexpected help menu:{BitConverter.ToString(Encoding.Default.GetBytes(help))}\nvs\n{BitConverter.ToString(Encoding.Default.GetBytes(HELP))}"); - throw new MumbleException("Could not get help menu"); - } - } - - private async Task HavocUser(CheckerTaskMessage task, CancellationToken token) - { - this.logger.LogInformation("Testing the user list"); - using var client = this.serviceProvider.GetRequiredService(); - await client.Connect(task, token); - - var user = new NotebookUser() - { - Username = faker.Internet.UserName() + DateTime.UtcNow.Millisecond, - Password = faker.Internet.Password(), - Note = null, - TaskChainId = task.TaskChainId - }; - await client.Register(user, token); - - var foundUsers = await client.GetUsers(token); - foreach (var foundUser in foundUsers) - { - if (user.Username == foundUser) - { - return; - } - } - - throw new MumbleException("User missing from user list"); - } - - private async Task HavocNotesList(CheckerTaskMessage task, CancellationToken token) - { - using var client = this.serviceProvider.GetRequiredService(); - - // Connect - await client.Connect(task, token); - - // Register - var user = new NotebookUser() - { - Username = faker.Internet.UserName() + DateTime.UtcNow.Millisecond, - Password = faker.Internet.Password(), - Note = faker.Company.Bs(), - TaskChainId = task.TaskChainId - }; - await client.Register(user, token); - await client.Login(user, token); - - // Deploy flag to note - user.NoteId = await client.SetNote(user.Note, token); - - var foundNotes = await client.GetNotes(token); - foreach (var foundNote in foundNotes) - { - if (foundNote == user.NoteId) - { - return; - } - } - - throw new MumbleException("Note missing from user list"); - } - } -} diff --git a/checker_cs/N0t3b00kChecker/CheckerInitializer.cs b/checker_cs/N0t3b00kChecker/CheckerInitializer.cs deleted file mode 100644 index be9cad6..0000000 --- a/checker_cs/N0t3b00kChecker/CheckerInitializer.cs +++ /dev/null @@ -1,28 +0,0 @@ -using EnoCore.Checker; -using Microsoft.Extensions.DependencyInjection; -using N0t3b00kChecker.Db; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace N0t3b00kChecker -{ - public class CheckerInitializer : ICheckerInitializer - { - public int FlagVariants => 1; - - public int NoiseVariants => 1; - - public int HavocVariants => 3; - - public string ServiceName => "n0t3b00k"; - - public void Initialize(IServiceCollection collection) - { - collection.AddSingleton(typeof(CheckerDb)); - collection.AddTransient(typeof(NotebookClient)); - } - } -} diff --git a/checker_cs/N0t3b00kChecker/Db/CheckerDb.cs b/checker_cs/N0t3b00kChecker/Db/CheckerDb.cs deleted file mode 100644 index 1cfde0b..0000000 --- a/checker_cs/N0t3b00kChecker/Db/CheckerDb.cs +++ /dev/null @@ -1,53 +0,0 @@ -using EnoCore.Checker; -using Microsoft.Extensions.Logging; -using MongoDB.Driver; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading; -using System.Threading.Tasks; - -namespace N0t3b00kChecker.Db -{ - public class CheckerDb - { - private readonly ILogger logger; - private readonly IMongoCollection users; - private readonly InsertOneOptions insertOneOptions = new() { BypassDocumentValidation = false }; - - public CheckerDb(ILogger logger) - { - this.logger = logger; - this.logger.LogDebug($"CheckerDb() via {MongoConnection})"); - var mongo = new MongoClient(MongoConnection); - var db = mongo.GetDatabase("N0t3b00kCheckerDatabase"); - this.users = db.GetCollection("Users"); - this.users.Indexes.CreateOne(new CreateIndexModel(Builders.IndexKeys - .Ascending(nu => nu.TaskChainId))); - } - - public static string MongoHost => Environment.GetEnvironmentVariable("MONGO_HOST") ?? "localhost"; - - public static string MongoPort => Environment.GetEnvironmentVariable("MONGO_PORT") ?? "27017"; - - public static string MongoConnection => $"mongodb://{MongoHost}:{MongoPort}"; - - public async Task InsertNotebookUser(NotebookUser user, CancellationToken token) - { - await this.users.InsertOneAsync(user, this.insertOneOptions, token); - } - - public async Task FindNotebookUser(string taskChainId, CancellationToken token) - { - var cursor = await this.users.FindAsync(u => u.TaskChainId == taskChainId, cancellationToken: token); - var user = await cursor.FirstOrDefaultAsync(token); - if (user == null) - { - throw new MumbleException("Could not find old user"); - } - - return user; - } - } -} diff --git a/checker_cs/N0t3b00kChecker/Db/NotebookUser.cs b/checker_cs/N0t3b00kChecker/Db/NotebookUser.cs deleted file mode 100644 index 60c7f6d..0000000 --- a/checker_cs/N0t3b00kChecker/Db/NotebookUser.cs +++ /dev/null @@ -1,27 +0,0 @@ -using MongoDB.Bson; -using MongoDB.Bson.Serialization.Attributes; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace N0t3b00kChecker.Db -{ - public class NotebookUser - { - [BsonId] - [BsonRepresentation(BsonType.ObjectId)] - public string? Id { get; set; } - - public string? Username { get; set; } - - public string? Password { get; set; } - - public string? NoteId { get; set; } - - public string? Note { get; set; } - - public string? TaskChainId { get; set; } - } -} diff --git a/checker_cs/N0t3b00kChecker/N0t3b00kChecker.csproj b/checker_cs/N0t3b00kChecker/N0t3b00kChecker.csproj deleted file mode 100644 index e34e972..0000000 --- a/checker_cs/N0t3b00kChecker/N0t3b00kChecker.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - net5.0 - enable - - - - - - - - - diff --git a/checker_cs/N0t3b00kChecker/NotebookClient.cs b/checker_cs/N0t3b00kChecker/NotebookClient.cs deleted file mode 100644 index 0a2d564..0000000 --- a/checker_cs/N0t3b00kChecker/NotebookClient.cs +++ /dev/null @@ -1,175 +0,0 @@ -using EnoCore.Checker; -using EnoCore.CheckerUtil; -using EnoCore.Models; -using Microsoft.Extensions.Logging; -using N0t3b00kChecker.Db; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Net.Sockets; -using System.Text; -using System.Threading; -using System.Threading.Tasks; - -namespace N0t3b00kChecker -{ - class NotebookClient : IDisposable - { - private static readonly string welcomeMessage = "Welcome to the 1337 n0t3b00k!"; - private readonly ILogger logger; - private NotebookUser? user; - private EnoCheckerTcpConnection? tcpConnection; - - public NotebookClient(ILogger logger) - { - this.logger = logger; - } - - public async Task Connect(CheckerTaskMessage task, CancellationToken token) - { - this.logger.LogInformation("Connecting to service"); - this.tcpConnection = await EnoCheckerTcpConnection.Connect(task.Address, Checker.SERVICE_PORT, this.logger, token); - - this.logger.LogDebug("Wait for welcome message"); - var response = await this.tcpConnection.ReceiveUntilAsync(Encoding.ASCII.GetBytes("\n> "), logger, token, errorMessage: "No welcome message received"); - string responseString = Encoding.ASCII.GetString(response); - - if (responseString != welcomeMessage) - { - this.logger.LogWarning($"Received no welcome message: {response}"); - throw new MumbleException("No welcome message received"); - } - } - - public async Task Register(NotebookUser user, CancellationToken token) - { - this.logger.LogInformation($"Registering user {user.Username}"); - this.user = user; - this.logger.LogDebug($"reg {this.user.Username} {this.user.Password}"); - await this.tcpConnection!.SendAsync(Encoding.ASCII.GetBytes($"reg {this.user.Username} {this.user.Password}\n"), logger, token, errorMessage: "Connection error during registration"); - - var responseBytes = await this.tcpConnection.ReceiveUntilAsync(Encoding.ASCII.GetBytes("\n> "), logger, token, errorMessage: "Connection error during registration"); - string response = Encoding.ASCII.GetString(responseBytes); - - if (response != "User successfully registered") - { - this.logger.LogWarning($"Unexpected response: {response}"); - throw new MumbleException("Registration failed"); - } - } - - public async Task Login(NotebookUser user, CancellationToken token) - { - this.user = user; - - this.logger.LogDebug($"log {this.user.Username} {this.user.Password}"); - await this.tcpConnection!.SendAsync(Encoding.ASCII.GetBytes($"log {this.user.Username} {this.user.Password}\n"), this.logger, token, errorMessage: "Connection error during login"); - - var responseBytes = await this.tcpConnection.ReceiveUntilAsync(Encoding.ASCII.GetBytes("\n> "), logger, token, errorMessage: "Connection error during login"); - string response = Encoding.ASCII.GetString(responseBytes); - - if (response != "Successfully logged in!") - { - this.logger.LogWarning($"Unexpected response: {response}"); - throw new MumbleException("Login failed"); - } - } - - public async Task SetNote(string note, CancellationToken token) - { - this.logger.LogDebug($"set {note}"); - await this.tcpConnection!.SendAsync(Encoding.ASCII.GetBytes($"set {note}\n"), this.logger, token, errorMessage: "Connection error during set note"); - - var responseBytes = await this.tcpConnection.ReceiveUntilAsync(Encoding.ASCII.GetBytes("\n> "), logger, token, errorMessage: "Connection error during set note"); - string response = Encoding.ASCII.GetString(responseBytes); - - try - { - var split = response?.Split("Note saved! ID is "); - return split![1].Substring(0, 32); - } - catch (Exception e) - { - this.logger.LogWarning($"Unexpected response: {response} {e.Message}\n{e.StackTrace}"); - throw new MumbleException("Set note failed"); - } - } - - public async Task GetNote(string noteId, CancellationToken token) - { - this.logger.LogDebug($"get {noteId}"); - await this.tcpConnection!.SendAsync(Encoding.ASCII.GetBytes($"get {noteId}\n"), this.logger, token, errorMessage: "Connection error during get note"); - - var responseBytes = await this.tcpConnection.ReceiveUntilAsync(Encoding.ASCII.GetBytes("\n> "), logger, token, errorMessage: "Connection error during set note"); - string response = Encoding.ASCII.GetString(responseBytes); - - if (response == null) - { - throw new MumbleException("Did not receive note"); - } - - return response; - } - - public async Task GetHelp(CancellationToken token) - { - this.logger.LogDebug($"GetHelp"); - await this.tcpConnection!.SendAsync(Encoding.ASCII.GetBytes($"help\n"), this.logger, token, errorMessage: "Connection error during help"); - - var responseBytes = await this.tcpConnection.ReceiveUntilAsync(Encoding.ASCII.GetBytes("\n> "), logger, token, errorMessage: "Connection error during set note"); - return Encoding.ASCII.GetString(responseBytes); - } - - public async Task> GetUsers(CancellationToken token) - { - this.logger.LogDebug($"GetUsers"); - await this.tcpConnection!.SendAsync(Encoding.ASCII.GetBytes($"user\n"), this.logger, token, errorMessage: "Connection error during help"); - - var responseBytes = await this.tcpConnection.ReceiveUntilAsync(Encoding.ASCII.GetBytes("\n> "), logger, token, errorMessage: "Connection error during set note"); - var response = Encoding.ASCII.GetString(responseBytes); - var users = new List(); - try - { - foreach (var userEntry in response.Split('\n')) - { - users.Add(userEntry.Split(": ")[1]); - } - } - catch (Exception e) - { - this.logger.LogWarning($"Get note failed: {e.Message}\n{e.StackTrace}"); - throw new MumbleException("Invalid user list"); - } - return users; - } - - public async Task> GetNotes(CancellationToken token) - { - this.logger.LogDebug($"GetList"); - await this.tcpConnection!.SendAsync(Encoding.ASCII.GetBytes($"list\n"), this.logger, token, errorMessage: "Connection error during help"); - - var responseBytes = await this.tcpConnection.ReceiveUntilAsync(Encoding.ASCII.GetBytes("\n> "), logger, token, errorMessage: "Connection error during set note"); - var response = Encoding.ASCII.GetString(responseBytes); - var notes = new List(); - try - { - foreach (var noteEntry in response.Split('\n')) - { - notes.Add(noteEntry.Split(": ")[1]); - } - } - catch (Exception e) - { - this.logger.LogWarning($"Get note failed: {e.Message}\n{e.StackTrace}"); - throw new OfflineException("Connection error during set note"); - } - return notes; - } - - public void Dispose() - { - this.tcpConnection?.Dispose(); - } - } -} diff --git a/checker_cs/README.md b/checker_cs/README.md deleted file mode 100644 index e3f48d2..0000000 --- a/checker_cs/README.md +++ /dev/null @@ -1,70 +0,0 @@ -# n0t3b00k Checker (C#) - -This is our example n0t3b00k checker implementation in C#. -A C# checker is a dotnet library, which is dynamically loaded and called when checker tasks arrive. - -## Exported Interface -The library must export an classes that implement `ICheckerInitializer` and `IChecker`. -The implementation of `ICheckerInitializer` declares how many flag, noise and havoc variants the checker supports, specifies the service name which is used in log aggregations, and can add services to the the [service collection](https://docs.microsoft.com/en-ca/dotnet/core/extensions/dependency-injection). -This checker uses dependency injection to create database and notebook client objects, so it adds these types to the collection. -```c# -public int FlagVariants => 1; -public int NoiseVariants => 1; -public int HavocVariants => 3; -public string ServiceName => "n0t3b00k"; -public void Initialize(IServiceCollection collection) -{ - collection.AddSingleton(typeof(CheckerDb)); - collection.AddTransient(typeof(NotebookClient)); -} -``` - -The `IChecker` interface implementation handles the put and get methods. -The `CancellationToken` is canceled when the method takes too long, so we pass it to every asynchronous function call. -```c# -public async Task HandlePutFlag(CheckerTaskMessage task, CancellationToken token) -{ - switch (task.VariantId) - { - case 0: - await DeployFlagToNote(task, token); - break; - default: - throw new InvalidOperationException(); - } -} -``` - -## Persistent Storage -The `CheckerDb` class manages the MongoDb connection. -Since the checker creates many users during a CTF, the `CheckerDb` creates an index over the `TaskChainId`, which is used to find users during the getflag methods. -```c# -public CheckerDb(ILogger logger) -{ - this.logger = logger; - this.logger.LogDebug($"CheckerDb() via {MongoConnection})"); - var mongo = new MongoClient(MongoConnection); - var db = mongo.GetDatabase("N0t3b00kCheckerDatabase"); - this.users = db.GetCollection("Users"); - this.users.Indexes.CreateOne(new CreateIndexModel(Builders.IndexKeys - .Ascending(nu => nu.TaskChainId))); -} -``` -```c# -public async Task FindNotebookUser(string taskChainId, CancellationToken token) -{ - var cursor = await this.users.FindAsync(u => u.TaskChainId == taskChainId, cancellationToken: token); - var user = await cursor.FirstOrDefaultAsync(token); - if (user == null) - { - throw new MumbleException("Could not find old user"); - } - - return user; -} -``` - -## EnoCore CheckerUtil -The `EnoCheckerTcpConnection` class is a wrapper around a TCP socket, which only throws Mumble- or OfflineExceptions. -Therefore, no try-catch blocks are required when calling methods of the class. -The receive functions are **not** thread-safe, do not call receive functions simultaneously on the same `EnoCheckerTcpConnection` object. diff --git a/checker_cs/docker-compose.yml b/checker_cs/docker-compose.yml deleted file mode 100644 index 79c6222..0000000 --- a/checker_cs/docker-compose.yml +++ /dev/null @@ -1,12 +0,0 @@ -version: '3' -services: - n0t3b00k-checker: - build: . - environment: - - MONGO_HOST=mongodb - - MONGO_PORT=27017 - #- USE_ELK=true - ports: - - "8000:80" - mongodb: - image: mongo