fix ms17010 legacy packet decoding
测试构建 / 代码检查 (push) Has been cancelled
测试构建 / 单元测试和构建 (push) Has been cancelled
测试构建 / 构建验证 (push) Has been cancelled

This commit is contained in:
ZacharyZcR
2026-05-09 11:08:32 +08:00
parent ad32568857
commit 63c899f465
2 changed files with 30 additions and 4 deletions
+1 -4
View File
@@ -184,10 +184,7 @@ func aesDecrypt(crypted string, key string) (string, error) {
return "", fmt.Errorf("密文长度过短")
}
iv := cryptedBytes[:aes.BlockSize]
cryptedBytes = cryptedBytes[aes.BlockSize:]
mode := cipher.NewCBCDecrypter(block, iv)
mode := cipher.NewCBCDecrypter(block, keyBytes[:aes.BlockSize])
mode.CryptBlocks(cryptedBytes, cryptedBytes)
// 移除PKCS7填充