From ed711e775740fcda19ad83f7d74c005a7e504cb8 Mon Sep 17 00:00:00 2001 From: raphckrman <41128238+raphckrman@users.noreply.github.com> Date: Sun, 3 Nov 2024 23:54:33 +0100 Subject: [PATCH] fix(auth): LiterateInk/PawRD is blocked, challenge is required --- src/models/Authenticator.ts | 2 +- src/utils/constants.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/models/Authenticator.ts b/src/models/Authenticator.ts index 619df4b..e981928 100644 --- a/src/models/Authenticator.ts +++ b/src/models/Authenticator.ts @@ -23,7 +23,7 @@ export class Authenticator { params.set("user", username); const pid = findValueBetween(html, ""); - const challenge = "69".repeat(16); + const challenge = findValueBetween(html, ""); let hashed_password = md5(password); hashed_password = md5(username + ":" + hashed_password + ":" + challenge); diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 9d7f1ce..edba5de 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -1,4 +1,4 @@ export const ARD_HOST = "https://services.ard.fr"; export const ARD_BASE_ENDPOINT = "/fr/espaces-clients/etablissements"; export const ARD_BASE_ENDPOINT_WITH_HOST = ARD_HOST + ARD_BASE_ENDPOINT; -export const USER_AGENT = "LiterateInk/PawRD"; +export const USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36";