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

Commit

Permalink
Merge pull request #149 from pro-src/patch-1
Browse files Browse the repository at this point in the history
Update for latest challenge
  • Loading branch information
codemanki committed Mar 20, 2019
2 parents 077bbaf + 42d2a69 commit ff0fffd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,17 @@ function solveChallenge (options, response, body) {
// The JS challenge to be evaluated for answer/response.
var challenge;
// The query string to send back to Cloudflare
// var payload = { jschl_vc, jschl_answer, pass };
// var payload = { s, jschl_vc, jschl_answer, pass };
var payload = {};

var match;
var cause;

match = body.match(/name="s" value="(.+?)"/);

if (match) {
payload.s = match[1];
}

match = body.match(/name="jschl_vc" value="(\w+)"/);

Expand Down

0 comments on commit ff0fffd

Please sign in to comment.