Open rOY369 opened 2 years ago
Hey @rOY369, That's the first time I read about this issue. It does not look really good. I think your guess about a firmware version difference might be right.
Sorry, I am not able to make improvements on this project and I have no hardware to test on.
This parameter sequence is only used during authentication.
In the project's README, there's a code to debug the encryption of the protocol while using your browser on the web ui
$.Iencryptor.AESDecrypt_backup = $.Iencryptor.AESDecrypt;
$.Iencryptor.AESEncrypt_backup = $.Iencryptor.AESEncrypt;
$.Iencryptor.AESDecrypt = function(data) {
let decrypted = $.Iencryptor.AESDecrypt_backup(data);
console.log("RECV:\n" + decrypted);
return decrypted;
}
$.Iencryptor.AESEncrypt = function(data) {
console.log("SEND:\n" + data);
return $.Iencryptor.AESEncrypt_backup(data);
}
This code won't help you because it only works to log the protocol after the authentication is etablished. The authentication uses RSA. There should be in "$.Iencryptor" some RSA fonctions, even maybe getSignature. If you could log getSignature and all rsa functions like AESEncrypt/Decrypt, and see if the parameter sequence is dropped that would be a good hint to fix it. If that's the only change. I have no idea how difficult it is to log what getSignature does.
If you manage to read what getSignature produces, you might be able to fix this function https://github.com/plewin/tp-link-modem-router/blob/master/src/routerEncryption.mjs#L168
Best regards,
Hi @plewin
First of all, thank you for this tool. I have a use case to send SMS and was testing the script
sms-send.js
.Router Model:
Archer MR200
Issue : The response of
fetchEncryptionParams
does not haveseq
which is leading to the error below.Does this mean that the router's encryption is configured in a different way? Can this happen due to a different router's firmware version? What method can you suggest to debug and resolve the authentication problem?