hertzg/node-tplink-api

TP-Link Archer VR900v

buschhardt opened this issue · 6 comments

with a little modify the 'fetchPublicKey.js' I can run your script. Thank You
But You wrote in Readme
"You can login into your router and hook into data encrypt and decrypt methods with the following snippet."
How can I do this?

Greetings Thomas

hertzg commented

with a little modify the 'fetchPublicKey.js' I can run your script.

What modification did you need to do?

"You can login into your router and hook into data encrypt and decrypt methods with the following snippet."

Login with a browser and copy & paste the code snippet into the console.

Oh cool it works. Here is my small modification:

const [userSettings, eeLine, nnLine, seqLine, ] = js.split("\n").map((s) => s.trim());

and here is my info-Line:

info: {"authTimes":0,"forbidTime":0,"modelName":"Archer VR900v","modelDesc":"AC1900 WLAN Telefon DSL Router","locale_language":"de_DE","hasMobile":"1"}

Thank you - Danke

hertzg commented

You are welcome - Bitte,

Seems like the output from POST cgi/getParm call differs from TL-MR6400.
Could you share the full output please, masking the values of ee & nn?

  const res = await fetch(new URL("cgi/getParm", baseUrl).href, {
    method: "POST",
    headers: { Referer: new URL("/", baseUrl).href },
  });

  console.log(await res.text());

Of course:

var userSetting=1;
var ee="010XXX";
var nn="A13E598CFXXXEC3FB8D9812C5581F2EDBAA939E8D912F9F75F15779CE0D67CA5479974AA417DC80EE087AA7305C7F512187ADDF41EDC636A6AE0E6XXXXXXXX";
var seq="657450562";
$.ret=0;
hertzg commented

Should be fixed by #2 , can you install the latest (v0.0.5) and try without your patches?

It's running fine.