Guest User

Untitled

a guest
Mar 24th, 2021
35
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Device ID as user name
  2. const username = declare("DeviceID.ID", {value: 1}).value[0]
  3.  
  4. // Password will be fixed a given device because Math.random() is seeded with devcie ID by default.
  5. const password = Math.trunc(Math.random() * Number.MAX_SAFE_INTEGER).toString(36);
  6.  
  7. const informInterval = 30;
  8.  
  9. // Refresh values daily
  10. const daily = Date.now(86400000);
  11.  
  12. // Unique inform offset per device for better load distribution
  13. const informTime = daily % 86400000;
  14.  
  15. declare("InternetGatewayDevice.ManagementServer.ConnectionRequestUsername", {value: daily}, {value: username});
  16. declare("InternetGatewayDevice.ManagementServer.ConnectionRequestPassword", {value: daily}, {value: password});
  17. declare("InternetGatewayDevice.ManagementServer.PeriodicInformEnable", {value: daily}, {value: true});
  18. declare("InternetGatewayDevice.ManagementServer.PeriodicInformInterval", {value: daily}, {value: informInterval});
  19. declare("InternetGatewayDevice.ManagementServer.PeriodicInformTime", {value: daily}, {value: informTime});
  20.  
  21.  
  22. declare("Device.ManagementServer.ConnectionRequestUsername", {value: daily}, {value: username});
  23. declare("Device.ManagementServer.ConnectionRequestPassword", {value: daily}, {value: password});
  24. declare("Device.ManagementServer.PeriodicInformEnable", {value: daily}, {value: true});
  25. declare("Device.ManagementServer.PeriodicInformInterval", {value: daily}, {value: informInterval});
  26. declare("Device.ManagementServer.PeriodicInformTime", {value: daily}, {value: informTime});
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×