Compare commits

..

No commits in common. "26084bfdf292c104b8bc0797c7f6ae12fc0496de" and "56fe4beb2a02c2f37a2a913bbd39b15cc4bb0c8c" have entirely different histories.

5 changed files with 20 additions and 28 deletions

View file

@ -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.79", features = ["backtrace"] }
if-addrs = "0.11.0"
anyhow = { version = "1.0.75", features = ["backtrace"] }
if-addrs = "0.10.2"
rand = "0.8.5"
chrono = "0.4.33"
chrono = "0.4.31"
serde = { version = "1.0", features = ["derive"] }
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"
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"
#crypto
cbc = { version = "0.1.2", features = ["alloc"] }
md5 = "0.7.0"
base64 = "0.21.7"
base64 = "0.21.4"
hmac = "0.12.1"
sha2 = "0.10.8"
aes = "0.8.3"

View file

@ -40,13 +40,13 @@ struct Input {
}
impl Cloud {
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 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 fn new(account: impl ToString, password: impl ToString) -> Result<Self> {
let account = account.to_string();

View file

@ -39,7 +39,6 @@ impl CommandRequest {
body,
},
#[cfg(debug_assertions)]
name,
}
}

View file

@ -148,14 +148,7 @@ impl CommandE1Base {
#[cfg(debug_assertions)] name: &'static str,
) -> Self {
Self {
command: CommandRequest::new(
device_protocol_version,
0xE1,
message_type,
body,
#[cfg(debug_assertions)]
name,
),
command: CommandRequest::new(device_protocol_version, 0xE1, message_type, body, name),
}
}
}

View file

@ -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: &'static [u8] = b"xhdiwjnchekd4d512chdjx5d8e4c394D2D7S";
const SALT: &[u8] = b"xhdiwjnchekd4d512chdjx5d8e4c394D2D7S";
pub fn encode32_data(data: &[u8]) -> Vec<u8> {
md5::compute([data, Self::SALT].concat()).to_vec()