Compare commits
49 commits
56fe4beb2a
...
26084bfdf2
Author | SHA1 | Date | |
---|---|---|---|
26084bfdf2 | |||
3b3869fff1 | |||
5dff8f562e | |||
e6a098417d | |||
96e5185f68 | |||
b0830f60e8 | |||
abf269f601 | |||
bb2865bbe5 | |||
8506c1a21a | |||
a5d608b925 | |||
9af44d3f2a | |||
10e212705a | |||
737a355c72 | |||
d0eb110037 | |||
4ce8592179 | |||
ddb5989ad1 | |||
10f26161ed | |||
47537111fc | |||
59d5053b55 | |||
12835c6615 | |||
a07de828fa | |||
81ee06be1c | |||
9e380f7fae | |||
84c90f0abf | |||
0bd60bc277 | |||
b157de6881 | |||
ea4fbb3512 | |||
1b47274b89 | |||
d064a2e1ee | |||
8b6b896297 | |||
ceb896cece | |||
8c37a4cc8f | |||
0d6e62d4e5 | |||
68b5891f43 | |||
ff1888538d | |||
c5eb1b5eff | |||
405b750482 | |||
e9df623c3b | |||
6dab56ba02 | |||
9a2df58f5c | |||
33ea4ab4b6 | |||
88d511daa3 | |||
14a6cd23c6 | |||
f7709686e1 | |||
b824f76995 | |||
3db9029d00 | |||
3f595f5c3b | |||
8ea4fc1aef | |||
f8fa859c29 |
5 changed files with 28 additions and 20 deletions
22
Cargo.toml
22
Cargo.toml
|
@ -6,23 +6,23 @@ edition = "2021"
|
|||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
anyhow = { version = "1.0.75", features = ["backtrace"] }
|
||||
if-addrs = "0.10.2"
|
||||
anyhow = { version = "1.0.79", features = ["backtrace"] }
|
||||
if-addrs = "0.11.0"
|
||||
rand = "0.8.5"
|
||||
chrono = "0.4.31"
|
||||
chrono = "0.4.33"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0.107"
|
||||
reqwest = "0.11.22"
|
||||
tokio = { version = "1.32.0", features=["macros", "rt-multi-thread"] }
|
||||
futures = "0.3.28"
|
||||
serial_test = "2.0.0"
|
||||
num-traits = "0.2.17"
|
||||
num-derive = "0.4.0"
|
||||
serde_json = "1.0.113"
|
||||
reqwest = "0.11.24"
|
||||
tokio = { version = "1.36.0", features=["macros", "rt-multi-thread"] }
|
||||
futures = "0.3.30"
|
||||
serial_test = "3.0.0"
|
||||
num-traits = "0.2.18"
|
||||
num-derive = "0.4.2"
|
||||
|
||||
#crypto
|
||||
cbc = { version = "0.1.2", features = ["alloc"] }
|
||||
md5 = "0.7.0"
|
||||
base64 = "0.21.4"
|
||||
base64 = "0.21.7"
|
||||
hmac = "0.12.1"
|
||||
sha2 = "0.10.8"
|
||||
aes = "0.8.3"
|
||||
|
|
14
src/cloud.rs
14
src/cloud.rs
|
@ -40,13 +40,13 @@ struct Input {
|
|||
}
|
||||
|
||||
impl Cloud {
|
||||
pub const APP_ID: &str = "1010";
|
||||
pub const APP_KEY: &str = "ac21b9f9cbfe4ca5a88562ef25e2b768";
|
||||
pub const API_URL: &str = "https://mp-prod.appsmb.com/mas/v5/app/proxy?alias=";
|
||||
pub const APP_VERSION: &str = "3.0.2";
|
||||
pub const SRC: &str = "10";
|
||||
pub const IOT_KEY: &str = "meicloud";
|
||||
pub const HMAC_KEY: &str = "PROD_VnoClJI9aikS8dyy";
|
||||
pub const APP_ID: &'static str = "1010";
|
||||
pub const APP_KEY: &'static str = "ac21b9f9cbfe4ca5a88562ef25e2b768";
|
||||
pub const API_URL: &'static str = "https://mp-prod.appsmb.com/mas/v5/app/proxy?alias=";
|
||||
pub const APP_VERSION: &'static str = "3.0.2";
|
||||
pub const SRC: &'static str = "10";
|
||||
pub const IOT_KEY: &'static str = "meicloud";
|
||||
pub const HMAC_KEY: &'static str = "PROD_VnoClJI9aikS8dyy";
|
||||
|
||||
pub fn new(account: impl ToString, password: impl ToString) -> Result<Self> {
|
||||
let account = account.to_string();
|
||||
|
|
|
@ -39,6 +39,7 @@ impl CommandRequest {
|
|||
body,
|
||||
},
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
name,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -148,7 +148,14 @@ impl CommandE1Base {
|
|||
#[cfg(debug_assertions)] name: &'static str,
|
||||
) -> Self {
|
||||
Self {
|
||||
command: CommandRequest::new(device_protocol_version, 0xE1, message_type, body, name),
|
||||
command: CommandRequest::new(
|
||||
device_protocol_version,
|
||||
0xE1,
|
||||
message_type,
|
||||
body,
|
||||
#[cfg(debug_assertions)]
|
||||
name,
|
||||
),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ impl Security {
|
|||
const N: u128 = 141661095494369103254425781617665632877;
|
||||
const KEY: [u8; 16] = Self::N.to_be_bytes();
|
||||
const IV: [u8; 16] = [b'\0'; 16];
|
||||
const SALT: &[u8] = b"xhdiwjnchekd4d512chdjx5d8e4c394D2D7S";
|
||||
const SALT: &'static [u8] = b"xhdiwjnchekd4d512chdjx5d8e4c394D2D7S";
|
||||
|
||||
pub fn encode32_data(data: &[u8]) -> Vec<u8> {
|
||||
md5::compute([data, Self::SALT].concat()).to_vec()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue