Skip to content

Commit

Permalink
feat: add amazon waf task support
Browse files Browse the repository at this point in the history
  • Loading branch information
alperensert committed Apr 27, 2024
1 parent d5ab335 commit c78ff56
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions capmonster_python/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
from .datadome import DataDomeTask
from .turnstile import TurnstileTask
from .tendi import TenDITask
from .aws_waf import AmazonWafTask
22 changes: 22 additions & 0 deletions capmonster_python/aws_waf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from .capmonster import Capmonster

class AmazonWafTask(Capmonster):
def __init__(self, client_key):
super(AmazonWafTask, self).__init__(client_key)

def create_task(self, website_url: str, website_key: str, challenge_script: str, captcha_script: str,
context: str, iv: str, cookieSolution: bool = False):
data = {
"clientKey": self._client_key,
"task": {
"type": "AmazonTaskProxyless",
"websiteURL": website_url,
"websiteKey": website_key,
"challengeScript": challenge_script,
"captchaScript": captcha_script,
"context": context,
"iv": iv,
"cookieSolution": cookieSolution
}
}
return self._make_request("createTask", data).get("taskId")

0 comments on commit c78ff56

Please sign in to comment.