Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Commit

Permalink
Update tpclient.py
Browse files Browse the repository at this point in the history
  • Loading branch information
cziter15 authored Aug 24, 2023
1 parent 31db448 commit c0af21b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/mr6400sms/tpclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ async def encryptCredentials(self, username, password):
if response.status != 200:
raise TPCError("Invalid encryption key request, status: " + str(response.status))
responseText = await response.text()
ee = await self.extract_key_part(self, responseText, r'(?<=ee=")(.{5}(?:\s|.))')
nn = await self.extract_key_part(self, responseText, r'(?<=nn=")(.{255}(?:\s|.))')
ee = await self.extract_key_part(responseText, r'(?<=ee=")(.{5}(?:\s|.))')
nn = await self.extract_key_part(responseText, r'(?<=nn=")(.{255}(?:\s|.))')
self._encryptedUsername = await self.encryptString(username, nn, ee)
self._encryptedPassword = await self.encryptString(password, nn, ee)
except (TimeoutError, ClientError, TPCError):
Expand Down

0 comments on commit c0af21b

Please sign in to comment.