[ADD]: Random ID patch #21

pavlinux
commented 2021-08-31 09:32:12 +01:00
(Migrated from github.com)
```diff
--- a/grmn/updateserver.py
+++ b/grmn/updateserver.py
@@ -9,7 +9,10 @@ from . import devices
from .proto import GetAllUnitSoftwareUpdates_pb2
from xml.dom.minidom import getDOMImplementation, parseString
from urllib.parse import unquote
+import random
+import string
import requests
+import cloudscraper
PROTO_API_GETALLUNITSOFTWAREUPDATES_URL = "http://omt.garmin.com/Rce/ProtobufApi/SoftwareUpdateService/GetAllUnitSoftwareUpdates"
WEBUPDATER_SOFTWAREUPDATE_URL = "https://www.garmin.com/support/WUSoftwareUpdate.jsp"
@@ -109,7 +112,8 @@ class UpdateInfo:
class UpdateServer:
def __init__(self):
- self.device_id = "2345678910"
+ rnd_id = ''.join(random.choice(string.digits) for i in range(10))
+ self.device_id = rnd_id
self.unlock_codes = []
self.debug = False
```
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?