diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..45fd06f --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,9 @@ +# Version 0.1.6 + +## features + - define x/y ratio + - stdin support + - Much more error handeling + - timeout option + - Refactored codesbase a lot + diff --git a/Cargo.lock b/Cargo.lock index fe6073b..8c81d4b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -623,7 +623,7 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hxn" -version = "0.1.5" +version = "0.1.6" dependencies = [ "chromiumoxide", "clap", @@ -659,6 +659,20 @@ dependencies = [ "want", ] +[[package]] +name = "hyper-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" +dependencies = [ + "futures-util", + "http", + "hyper", + "rustls", + "tokio", + "tokio-rustls", +] + [[package]] name = "hyper-tls" version = "0.5.0" @@ -1031,6 +1045,7 @@ dependencies = [ "http", "http-body", "hyper", + "hyper-rustls", "hyper-tls", "ipnet", "js-sys", @@ -1040,19 +1055,38 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", + "rustls", + "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", "tokio", "tokio-native-tls", + "tokio-rustls", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", + "webpki-roots", "winreg", ] +[[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-demangle" version = "0.1.23" @@ -1072,6 +1106,37 @@ dependencies = [ "windows-sys", ] +[[package]] +name = "rustls" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" +dependencies = [ + "log", + "ring", + "rustls-webpki", + "sct", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" +dependencies = [ + "base64", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45a27e3b59326c16e23d30aeb7a36a24cc0d29e71d68ff611cdfb4a01d013bed" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "ryu" version = "1.0.15" @@ -1093,6 +1158,16 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "sct" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "security-framework" version = "2.9.2" @@ -1214,6 +1289,12 @@ dependencies = [ "windows-sys", ] +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + [[package]] name = "strsim" version = "0.10.0" @@ -1319,6 +1400,16 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls", + "tokio", +] + [[package]] name = "tokio-util" version = "0.7.8" @@ -1423,6 +1514,12 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + [[package]] name = "url" version = "2.4.0" @@ -1549,6 +1646,12 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "webpki-roots" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" + [[package]] name = "which" version = "4.4.0" diff --git a/Cargo.toml b/Cargo.toml index 074a019..95bb746 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hxn" -version = "0.1.5" +version = "0.1.6" edition = "2021" authors = [ "PwnWriter < hey@pwnwriter.xyz >" ] description = "Blazingly fast tool to grab screenshots of url/webpages from terminal." @@ -15,7 +15,7 @@ categories = ["accessibility", "web-programming", "command-line" ] [dependencies] url = "2.3.1" -reqwest = "0.11.16" +reqwest = { version = "0.11.16", features = ["rustls-tls"] } tokio = { version = "1.27.0", features = ["full"] } chromiumoxide = { version = "0.5.0", features = ["tokio-runtime"], default-features = false } futures = "0.3.28" diff --git a/src/cli/ascii.rs b/src/cli/ascii.rs index 864aae0..c74bf38 100644 --- a/src/cli/ascii.rs +++ b/src/cli/ascii.rs @@ -9,7 +9,7 @@ pub fn splash() -> String { let logo = r" ╦ ╦╔═╗╦ ╦╦ ╔═╗╔╗╔ ╠═╣╠═╣╚╦╝║ 𝖃║ ║║║║ - ╩ ╩╩ ╩ ╩ ╩═╝ ╚═╝╝╚╝v0.1.5 + ╩ ╩╩ ╩ ╩ ╩═╝ ╚═╝╝╚╝v0.1.6 by @PwnWriter " .purple();