plewin / tp-link-modem-router

Goodies for TP-Link modem routers
GNU General Public License v3.0
82 stars 17 forks source link

IP Refreshing #22

Closed sukhcha-in closed 2 years ago

sukhcha-in commented 2 years ago

First of all thanks for all the hard work you've done with this project. I'm trying to turn off mobile data then turning it on again, so ISP assigns me new IP address.

In network tab request goes to cgi_gdpr path with payload of data and sign, and some other headers which are already used in this project to send SMS.

Now how can I decrypt the data from payload so I can know what payload is actually being sent?

Thanks again.

plewin commented 2 years ago

Hello,

In the project Readme at the section "development and debugging the router's protocol" I left a code snippet you can paste in the Console tab of your browser. Paste it in your console tab and the decrypted protocol with appear in Console and not the Network tab.

Kind regards,

On Fri, Mar 11, 2022, 17:52 Sukhchain Singh @.***> wrote:

First of all thanks for all the hard work you've done with this project. I'm trying to turn off mobile data then turning it on again, so ISP assigns me new IP address.

https://camo.githubusercontent.com/002fcac9b2b3906b5349b2596219e1891aad5e4171fa1586b136ec7d743205e8/68747470733a2f2f692e696d6775722e636f6d2f656d573766326f2e706e67

In network tab request goes to cgi_gdpr path with payload of data and sign, and some other headers which are already used in this project to send SMS.

Now how can I decrypt the data from payload so I can know what payload is actually being sent?

Thanks again.

— Reply to this email directly, view it on GitHub https://github.com/plewin/tp-link-modem-router/issues/22, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFMVLL7WVO47INTWH4YNGDU7N26BANCNFSM5QQENXGQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

sukhcha-in commented 2 years ago

@plewin thank you so much :)

amen160 commented 1 year ago

Hi, @sukhcha-in @plewin can you share me code to "Turn off mobile data then turn on again"? Please help me.

sukhcha-in commented 1 year ago

@amen160 Login into the router's UI, open developer options on the browser and run this code in the console. Turn off data and you can see requests. You can easily replicate them afterwards programmatically.

$.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);
}