diff --git a/Cargo.lock b/Cargo.lock index 78c35be..1fa3b33 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -70,32 +70,38 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.82" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "async-trait" -version = "0.1.79" +version = "0.1.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "autocfg" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "17c6a35df3749d2e8bb1b7b21a976d82b15548788d2735b9d82f329268f71a11" dependencies = [ "addr2line", "cc", @@ -108,9 +114,9 @@ dependencies = [ [[package]] name = "base64" -version = "0.22.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bindgen" @@ -131,7 +137,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.60", + "syn 2.0.66", "which", ] @@ -186,9 +192,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" +checksum = "78834c15cb5d5efe3452d58b1e8ba890dd62d21907f867f383358198e56ebca5" [[package]] name = "byteorder" @@ -229,7 +235,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] @@ -240,9 +246,9 @@ checksum = "ade8366b8bd5ba243f0a58f036cc0ca8a2f069cff1a2351ef1cac6b083e16fc0" [[package]] name = "cc" -version = "1.0.95" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b" +checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" [[package]] name = "cesu8" @@ -291,9 +297,9 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" dependencies = [ "glob", "libc", @@ -419,9 +425,9 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] @@ -447,9 +453,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" @@ -457,6 +463,15 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +[[package]] +name = "daemonize" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab8bfdaacb3c887a54d41bdf48d3af8873b3f5566469f8ba21b92057509f116e" +dependencies = [ + "libc", +] + [[package]] name = "darling" version = "0.20.9" @@ -478,7 +493,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] @@ -489,7 +504,7 @@ checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" dependencies = [ "darling_core", "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] @@ -583,9 +598,9 @@ checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" [[package]] name = "either" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" +checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" [[package]] name = "encode_unicode" @@ -604,9 +619,9 @@ dependencies = [ [[package]] name = "enigo" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a4655cdcad61e57cf28922aaa3221b06ce29e644422bba506851a03b8817468" +checksum = "0087a01fc8591217447d28005379fb5a183683cc83f0a4707af28cc6603f70fb" dependencies = [ "core-graphics 0.23.2", "foreign-types-shared 0.3.1", @@ -627,9 +642,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -718,7 +733,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] @@ -817,9 +832,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -838,9 +853,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "glob" @@ -850,15 +865,15 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "h2" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "816ec7294445779408f36fe57bc5b7fc1cf59664059096c65f905c1c61f58069" +checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" dependencies = [ + "atomic-waker", "bytes", "fnv", "futures-core", "futures-sink", - "futures-util", "http", "indexmap", "slab", @@ -980,9 +995,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" +checksum = "7b875924a60b96e5d7b9ae7b066540b1dd1cbd90d1828f54c92e02a283351c56" dependencies = [ "bytes", "futures-channel", @@ -1124,6 +1139,7 @@ dependencies = [ "cached", "cgisf_lib", "chrono", + "daemonize", "dialoguer", "enigo", "lazy_static", @@ -1131,12 +1147,11 @@ dependencies = [ "rand", "regex", "reqwest", - "rsautogui", - "screenshots 0.8.10", + "screenshots", "serde", "time", "tokio", - "toml 0.8.12", + "toml 0.8.13", "tracing", "tts", "windows 0.56.0", @@ -1218,9 +1233,9 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" [[package]] name = "libc" -version = "0.2.154" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libdbus-sys" @@ -1260,9 +1275,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lock_api" @@ -1336,9 +1351,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" dependencies = [ "adler", "simd-adler32", @@ -1357,11 +1372,10 @@ dependencies = [ [[package]] name = "native-tls" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" dependencies = [ - "lazy_static", "libc", "log", "openssl", @@ -1410,9 +1424,9 @@ checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] @@ -1439,15 +1453,15 @@ dependencies = [ [[package]] name = "objc-sys" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da284c198fb9b7b0603f8635185e85fbd5b64ee154b1ed406d489077de2d6d60" +checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" [[package]] name = "objc2" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b25e1034d0e636cd84707ccdaa9f81243d399196b8a773946dcffec0401659" +checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" dependencies = [ "objc-sys", "objc2-encode", @@ -1455,9 +1469,9 @@ dependencies = [ [[package]] name = "objc2-encode" -version = "4.0.1" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88658da63e4cc2c8adb1262902cd6af51094df0488b760d6fd27194269c0950a" +checksum = "7891e71393cd1f227313c9379a26a584ff3d7e6e7159e988851f0934c993f0f8" [[package]] name = "objc_exception" @@ -1470,9 +1484,9 @@ dependencies = [ [[package]] name = "object" -version = "0.32.2" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "b8ec7ab813848ba4522158d5517a6093db1ded27575b070f4177b8d12b41db5e" dependencies = [ "memchr", ] @@ -1506,7 +1520,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] @@ -1538,9 +1552,9 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -1582,7 +1596,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] @@ -1641,19 +1655,19 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "prettyplease" -version = "0.2.19" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ac2cf0f2e4f42b49f5ffd07dae8d746508ef7526c13940e5f524012ae6c6550" +checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] name = "proc-macro2" -version = "1.0.81" +version = "1.0.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" +checksum = "ec96c6a92621310b51366f1e28d05ef11489516e93be030060e5fc12024a49d6" dependencies = [ "unicode-ident", ] @@ -1825,23 +1839,11 @@ dependencies = [ "winreg", ] -[[package]] -name = "rsautogui" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ca204f9a553c6cb3e53d7389d72b829f914439454caea08f31e18619498987d" -dependencies = [ - "image", - "screenshots 0.5.4", - "spin_sleep", - "winput", -] - [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" @@ -1874,15 +1876,15 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.5.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "beb461507cee2c2ff151784c52762cf4d9ff6a61f3e80968600ed24fa837fa54" +checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" [[package]] name = "ryu" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "same-file" @@ -1914,23 +1916,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "screenshots" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436a9fd3ae9c4fb426ceb884a087c39e4b451c7ee2f339a1ea3a66121534b41b" -dependencies = [ - "anyhow", - "core-graphics 0.22.3", - "dbus", - "display-info", - "fxhash", - "png", - "widestring", - "windows 0.48.0", - "xcb", -] - [[package]] name = "screenshots" version = "0.8.10" @@ -1952,11 +1937,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.10.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" +checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.5.0", "core-foundation", "core-foundation-sys", "libc", @@ -1965,9 +1950,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.10.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" +checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" dependencies = [ "core-foundation-sys", "libc", @@ -1975,29 +1960,29 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.199" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9f6e76df036c77cd94996771fb40db98187f096dd0b9af39c6c6e452ba966a" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.199" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11bd257a6541e141e42ca6d24ae26f7714887b47e89aa739099104c7e4d3b7fc" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] name = "serde_json" -version = "1.0.116" +version = "1.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" dependencies = [ "itoa", "ryu", @@ -2006,9 +1991,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" dependencies = [ "serde", ] @@ -2116,15 +2101,6 @@ dependencies = [ "lock_api", ] -[[package]] -name = "spin_sleep" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368a978649eaf70006b082e79c832bd72556ac1393eaf564d686e919dca2347f" -dependencies = [ - "windows-sys 0.52.0", -] - [[package]] name = "strsim" version = "0.11.1" @@ -2144,9 +2120,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.60" +version = "2.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" +checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" dependencies = [ "proc-macro2", "quote", @@ -2194,22 +2170,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.59" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" +checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.59" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" +checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] @@ -2284,7 +2260,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] @@ -2299,16 +2275,15 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", - "tracing", ] [[package]] @@ -2322,9 +2297,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.12" +version = "0.8.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" +checksum = "a4e43f8cc456c9704c851ae29c67e17ef65d2c30017c17a9765b89c382dc8bba" dependencies = [ "serde", "serde_spanned", @@ -2334,18 +2309,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.12" +version = "0.22.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" +checksum = "c127785850e8c20836d49732ae6abfa47616e60bf9d9f57c43c250361a9db96c" dependencies = [ "indexmap", "serde", @@ -2367,7 +2342,6 @@ dependencies = [ "tokio", "tower-layer", "tower-service", - "tracing", ] [[package]] @@ -2388,7 +2362,6 @@ version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -2402,7 +2375,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] @@ -2545,7 +2518,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", "wasm-bindgen-shared", ] @@ -2579,7 +2552,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2729,15 +2702,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" -dependencies = [ - "windows-targets 0.48.5", -] - [[package]] name = "windows" version = "0.51.1" @@ -2806,7 +2770,7 @@ checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] @@ -2817,7 +2781,7 @@ checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] @@ -3036,22 +3000,13 @@ checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winnow" -version = "0.6.7" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14b9415ee827af173ebb3f15f9083df5a122eb93572ec28741fb153356ea2578" +checksum = "86c949fede1d13936a99f14fafd3e76fd642b556dd2ce96287fbe2e0151bfac6" dependencies = [ "memchr", ] -[[package]] -name = "winput" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd4bec39938e0ae68b300e2a4197b6437f13d53d1c146c6e297e346a71d5dde9" -dependencies = [ - "winapi", -] - [[package]] name = "winreg" version = "0.52.0" @@ -3116,14 +3071,14 @@ checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" [[package]] name = "zune-inflate" diff --git a/Cargo.toml b/Cargo.toml index 1c55c48..b067dff 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,14 +8,17 @@ repository = "https://github.com/callmeclover/jerry" build = "build.rs" edition = "2021" +keywords = ["robot", "automation", "malware", "jerry"] +categories = ["robot", "automation", "malware"] + [package.metadata.winres] LegalCopyright = "Copyright © callmeclover 2024" FileDescription = "stupid robot nuisance" [dependencies] -enigo = "0.2.0" +enigo = "0.2.1" screenshots = "0.8.6" -tts = "0.26.0" +tts = { version = "0.26.0", features = ["speech_dispatcher_0_9"], default-features = false } rand = "0.8.4" tokio = { version = "1.35.1", features = ["full"] } serde = { version = "1.0.195", features = ["derive"] } @@ -26,14 +29,13 @@ time = "0.3.31" chrono = "0.4.31" ansi_term = "0.12.1" regex = "1.10.3" -rsautogui = "0.2.2" reqwest = { version = "0.12.3", features = ["blocking"] } cgisf_lib = "0.2.1" ping = "0.5.2" tracing = "0.1.40" cached = { version = "0.51.3", features = ["async"] } -[dependencies.windows] +[target.'cfg(windows)'.dependencies.windows] version = "0.56.0" optional = true features = [ @@ -41,10 +43,14 @@ features = [ "UI_Input_Preview_Injection", ] +[target.'cfg(unix)'.dependencies.daemonize] +version = "0.5.0" +optional = true + [build-dependencies] winres = "0.1" [features] -invisibility = [] +invisibility = ["dep:daemonize"] advanced = ["dep:windows"] #microphone = [] \ No newline at end of file diff --git a/README.md b/README.md index 781c23f..101d481 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,46 @@ # jerry + stupid robot nuisance. i built this to be that though, so... -presses keys and f*cks with your mouse. occasionally talks. +presses keys and f\*cks with your mouse. occasionally talks. ## versions + currently, there are 3 versions (not including crosses of any): - default (basic movement and window) - invisibility (no console window) - advanced (advanced movement feature) -**the `advanced` feature requires administrator privileges. this is why it is seperate from `default`.** +**the `advanced` feature requires administrator privileges. this is why it is seperate from `default`. it also depends on the `windows` crate, so it does not support linux/macos.** **the `invisibility` feature has no console window, so it cannot be regularly exited out of. see [this notice](#other-little-notice) for info on killing a hidden instance.** i will also not be publishing any invisible builds for jerry beyond [v0.3.4](https://github.com/callmeclover/jerry/releases/tag/v0.3.4). build it yourself with `cargo build --features invisible`. ## little notice + i, @callmeclover, hold 0 responsibility over what this thing does, [**especially forks**](#on-the-topic-of-forks). you are on your own if he does anything bad. ## other little notice + the invisible version hides the console window, so you need to kill his process in task manager if he gets out of hand. he doesn't cloak himself, so his process name is `jerry.exe`. ## on the topic of forks -jerry is, technically, considered malware. as the [wiki page](https://wikipedia.com/wiki/Malware) states, *"[Malware] is any software intentionally designed to cause disruption to a computer, server, client, or computer network,"* which is exactly what jerry does. + +jerry is, technically, considered malware. as the [wiki page](https://wikipedia.com/wiki/Malware) states, _"[Malware] is any software intentionally designed to cause disruption to a computer, server, client, or computer network,"_ which is exactly what jerry does. i have no intent to cause any amount of harm with this program. this is purely a passion project to learn more rust, and test my coding abilities. -when you fork this project, or a fork of this project, you take all responsibility for that fork. i, @callmeclover, hold no responsibility over the actions of forks. \ No newline at end of file +when you fork this project, or a fork of this project, you take all responsibility for that fork. i, @callmeclover, hold no responsibility over the actions of forks. + +## developing + +if you're on windows you can already build jerry to boot (`cargo build`). if you are on linux, mac, or pretty much anything other than windows, you can't really run it (probably, no testing has been done) because jerry depends on the `windows` crate. you can, however, use [cross](https://github.com/cross-rs/cross) for cross-compilation. + +multi-platform support will be added in a future update, but this will require a rewrite of some features, including `invisibility` and `advanced`. + +on linux you will need [`libspeechd-dev`](https://github.com/brailcom/speechd), `libclang1`, and `clang`. view the repo for speechd's build instructions, but you can also check your package manager, e.g. `sudo apt install libspeechd-dev libclang1 clang` on a debian/ubuntu based distro. diff --git a/build.rs b/build.rs index 42a1674..a58036a 100644 --- a/build.rs +++ b/build.rs @@ -17,7 +17,7 @@ fn main() { } if let Err(e) = res.compile() { - eprintln!("{}", e); + eprintln!("{e}"); std::process::exit(1); } } diff --git a/src/config.rs b/src/config.rs index 17718ce..3b57d1c 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,17 +1,20 @@ +use cached::proc_macro::cached; #[allow(unused_imports)] use dialoguer::{theme::ColorfulTheme, Confirm}; +use serde::{Deserialize, Serialize}; use std::{fs, path::Path}; use toml::{de::Error, from_str, to_string_pretty}; -use cached::{proc_macro::cached, SizedCache}; -#[derive(Debug, serde::Serialize, serde::Deserialize, Default, Clone, Eq, Hash, PartialEq)] + +#[derive(Debug, Serialize, Deserialize, Default, Clone, Eq, Hash, PartialEq)] pub struct Config { #[allow(dead_code)] // Disable dead code warning for the entire struct basic: Basic, #[allow(dead_code)] // Disable dead code warning for the entire struct - extra: Extra, + pub extra: Extra, } -#[derive(Debug, serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq, Hash)] +#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq, Hash)] +#[allow(clippy::struct_excessive_bools)] struct Basic { #[allow(dead_code)] use_mouse: bool, @@ -29,12 +32,13 @@ struct Basic { do_gen_tts: bool, } -#[derive(Debug, serde::Serialize, serde::Deserialize, Default, Clone, Hash, PartialEq, Eq)] -struct Extra { +#[derive(Debug, Serialize, Deserialize, Default, Clone, Hash, PartialEq, Eq)] +#[allow(clippy::struct_excessive_bools)] +pub struct Extra { #[allow(dead_code)] - do_debugging: bool, + pub do_debugging: bool, #[allow(dead_code)] - enable_debugging_extras: bool, + pub enable_debugging_extras: bool, #[allow(dead_code)] use_external_sentence_api: bool, #[allow(dead_code)] @@ -43,7 +47,7 @@ struct Extra { impl Default for Basic { fn default() -> Self { - Basic { + Self { #[allow(dead_code)] use_mouse: true, #[allow(dead_code)] @@ -62,10 +66,7 @@ impl Default for Basic { } } -#[cached( - ty = "SizedCache", - create = "{ SizedCache::with_size(1) }", -)] +#[cached] pub fn get_config() -> Config { loop { if Path::new("./config.toml").exists() { @@ -128,7 +129,7 @@ pub fn get_config() -> Config { } } -pub async fn get_options(config: Config) -> Vec<(&'static str, usize)> { +pub fn get_options(config: &Config) -> Vec<(&'static str, usize)> { let mut options: Vec<(&'static str, usize)> = vec![]; if config.basic.use_mouse { diff --git a/src/func.rs b/src/func.rs index 8c10b7a..0bb42e8 100644 --- a/src/func.rs +++ b/src/func.rs @@ -1,20 +1,19 @@ -use crate::lists::*; +use crate::{get_config, lists::{ALPHANUMERIC_KEYS, FUNCTION_KEYS, MODIFIER_KEYS, MOUSE_CLICKS, MOUSE_MOVE, MOUSE_SCROLL, QUOTES_NEGATIVE, QUOTES_POSITIVE, QUOTES_QUESTION, QUOTES_STATEMENT, SPECIAL_KEYS}, Speed, SPEED_WEIGHTED_LISTS_SLOW, SPEED_WEIGHTED_LISTS_FAST, SPEED_WEIGHTED_LISTS_NORMAL}; #[cfg(feature = "advanced")] use crate::{GamepadInjector, PenInjector}; use cgisf_lib::{gen_sentence, SentenceConfigBuilder}; use chrono::{prelude::*, DateTime}; -use enigo::*; +use enigo::{Axis, Button, Coordinate, Direction, Enigo, Key, Keyboard, Mouse}; use lazy_static::lazy_static; use rand::{ distributions::{Distribution, WeightedIndex}, thread_rng, Rng, }; use regex::Regex; -use rsautogui::{mouse, mouse::Button, mouse::ScrollAxis, mouse::Speed}; use screenshots::Screen; -use std::{fs::*, str::FromStr, sync::Mutex, thread}; +use std::{fs::File, str::FromStr, sync::Mutex, thread}; use tokio::time::{sleep, Duration}; -use tts::*; +use tts::Tts; lazy_static! { static ref IS_SHIFT_PRESSED: Mutex = Mutex::new(false); @@ -27,7 +26,7 @@ lazy_static! { } fn toggle_key_press(key: Key, enigo: &mut Enigo) { - let kstr = match key { + let kvalue = !*(match key { Key::Shift => IS_SHIFT_PRESSED.lock().unwrap(), Key::Control => IS_CTRL_PRESSED.lock().unwrap(), Key::Alt => IS_ALT_PRESSED.lock().unwrap(), @@ -36,16 +35,58 @@ fn toggle_key_press(key: Key, enigo: &mut Enigo) { Key::RShift => IS_RSHIFT_PRESSED.lock().unwrap(), Key::RControl => IS_RCTRL_PRESSED.lock().unwrap(), _ => return, - }; - let kvalue = *kstr; - let kstr = !kvalue; - if kstr { + }); + if kvalue { let _ = enigo.key(key, Direction::Press); } else { let _ = enigo.key(key, Direction::Release); } } +pub fn drag_mouse_abs(enigo: &mut Enigo, pos: (i32, i32), speed: Speed) { + let (mouse_x, mouse_y) = enigo.location().expect("Unable to locate mouse position."); + + let delta_x = pos.0 - mouse_x; + let delta_y = pos.1 - mouse_y; + + let delta_sum = (delta_x.pow(2) + delta_y.pow(2)) as f32; + let distance = delta_sum.sqrt(); + + let step_x = delta_x as f32 / distance; + let step_y = delta_y as f32 / distance; + + let mut new_x = mouse_x as f32; + let mut new_y = mouse_y as f32; + let sleep_duration = Duration::from_micros(speed as u64); + for _ in 0..distance as usize { + new_x += step_x; + new_y += step_y; + enigo.move_mouse(new_x as i32, new_y as i32, Coordinate::Abs) + .unwrap_or_else(|_| panic!("Unable to move mouse position to ({}, {}).", pos.0, pos.1)); + thread::sleep(sleep_duration); + } +} + +pub fn drag_mouse_rel(enigo: &mut Enigo, pos: (i32, i32), speed: Speed) { + let delta_sum = (pos.0.pow(2) + pos.1.pow(2)) as f32; + let distance = delta_sum.sqrt(); + + let step_x = pos.0 as f32 / distance; + let step_y = pos.1 as f32 / distance; + + let (mouse_x, mouse_y) = enigo.location().expect("Unable to locate mouse position."); + let mut new_x = mouse_x as f32; + let mut new_y = mouse_y as f32; + let sleep_duration = Duration::from_micros(speed as u64); + for _ in 0..distance as usize { + new_x += step_x; + new_y += step_y; + enigo.move_mouse(new_x as i32, new_y as i32, Coordinate::Abs) + .unwrap_or_else(|_| panic!("Unable to move mouse position to ({}, {}).", pos.0, pos.1)); + thread::sleep(sleep_duration); + } +} + fn convert_mouse_action(input: &str) -> Option