From 25106c1b4aff93dfde925a13dfd3fe784f626f34 Mon Sep 17 00:00:00 2001 From: Steven B <51370195+sdb9696@users.noreply.github.com> Date: Fri, 13 Dec 2024 14:40:42 +0000 Subject: [PATCH] experiment- unique referrer url --- kasa/transports/sslaestransport.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kasa/transports/sslaestransport.py b/kasa/transports/sslaestransport.py index a76e6489..50b83145 100644 --- a/kasa/transports/sslaestransport.py +++ b/kasa/transports/sslaestransport.py @@ -8,6 +8,7 @@ import hashlib import logging import secrets import ssl +import uuid from enum import Enum, auto from typing import TYPE_CHECKING, Any, cast @@ -120,7 +121,7 @@ class SslAesTransport(BaseTransport): self._headers = { **self.COMMON_HEADERS, "Host": self._host, - "Referer": f"https://{self._host_port}", + "Referer": f"https://{self._host_port}?id={_md5_hash(uuid.uuid4().bytes)}", } self._seq: int | None = None self._pwd_hash: str | None = None