using this code i want you to tell me what the following keywords mean and how they are…
- User
using this code i want you to tell me what the following keywords mean and how they are gotten: bda
import requests import random import time from urllib.parse import urlsplit from requests.packages.urllib3.exceptions import InsecureRequestWarning
For image manipulation
from PIL import Image from io import BytesIO
Modules for encryption and decryption
from Crypto.Cipher import AES import base64 import hashlib import json import string import re import execjs import secrets
Default params
DEFAULT_USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0"
Decides if images should be downloaded over the specified proxy or not
Turning this off improves speed
PROXY_IMAGE_DOWNLOADS = False
Load .js module for murmur3 related functions (used in BDA/fingerprint2 generation)
with open("fp.js") as f: mm3js = execjs.compile(f.read())
Create dict of fields from full token string
def parse_full_token(token): token = "token=" + token assoc = {}
codefor field in token.split("|"): s = field.partition("=") key, value = s[0], s[-1] assoc[key] = value return assocGet random float value
def get_float(): return random.uniform(0, 1)
Get random X,Y click coordinates for button
def get_xy(): start_pos = [117, 248] button_size = [90, 28] new_pos = [ start_pos[0] + random.randint(1, button_size[0]), start_pos[1] + random.randint(1, button_size[1])] return new_pos
CryptoJS AES Encryption
def cryptojs_encrypt(data, key): # Padding data = data + chr(16-len(data)%16)*(16-len(data)%16)
codesalt = b"".join(random.choice(string.ascii_lowercase).encode() for x in range(8)) salted, dx = b"", b"" while len(salted) < 48: dx = hashlib.md5(dx+key.encode()+salt).digest() salted += dx key = salted[:32] iv = salted[32:32+16] aes = AES.new(key, AES.MODE_CBC, iv) encrypted_data = {"ct": base64.b64encode(aes.encrypt(data.encode())).decode("utf-8"), "iv": iv.hex(), "s": salt.hex()} return json.dumps(encrypted_data, separators=(',', ':'))CryptoJS AES Decryption
- Assistant
The keywords in the given code are as follows:
-
bda: This variable stores the browser data for identification, which is used to generate a token for the FunCaptcha challenge.
-
requests: This module is used for sending HTTP requests to the server.
-
random: This module is used to generate random values, such as float values and coordinates for button clicks.
-
time: This module is used for time-related operations, such as generating timestamps.
-
urllib.parse.urlsplit: This function is used to split a URL into its component parts.
-
requests.packages.urllib3.exceptions.InsecureRequestWarning: This is an exception class for warnings related to insecure requests.
-
PIL.Image: This module is used for image manipulation operations.
-
io.BytesIO: This class is used for stream handling of binary data.
-