Skip to content

Commit

Permalink
fix(auth): LiterateInk/PawRD is blocked, challenge is required
Browse files Browse the repository at this point in the history
  • Loading branch information
raphckrman committed Nov 3, 2024
1 parent 57c5ac0 commit ed711e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/models/Authenticator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class Authenticator {
params.set("user", username);

const pid = findValueBetween(html, "<input type=\"hidden\" name=\"pid\" value=\"", "\" />");
const challenge = "69".repeat(16);
const challenge = findValueBetween(html, "<input type=\"hidden\" name=\"challenge\" value=\"", "\" />");

let hashed_password = md5(password);
hashed_password = md5(username + ":" + hashed_password + ":" + challenge);
Expand Down
2 changes: 1 addition & 1 deletion src/utils/constants.ts
Original file line number Diff line number Diff line change
@@ -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";

0 comments on commit ed711e7

Please sign in to comment.