MCPcopy Create free account

hub / github.com/Cialle/RedCrack / functions

Functions147 in github.com/Cialle/RedCrack

↓ 59 callersMethodget
获取配置项的通用方法
request/web/encrypt/config.py:9
↓ 24 callersMethodrequest
统一请求方法 - 确保资源正确管理
request/web/xhs_session.py:280
↓ 9 callersFunction_wbits
(d, p, v)
request/web/encrypt/header/x_rap_param_helper/fflate_py.py:94
↓ 8 callersMethod__js_left_rotate
JavaScript风格的左移
request/web/encrypt/header/X_S.py:33
↓ 7 callersMethod__u32_add
(self, a, b)
request/web/encrypt/header/X_S.py:30
↓ 7 callersMethod__weighted_random_choice
根据权重随机选择一个候选项 Args: options (list): 候选项列表 weights (list): 对应的权重列表(无需归一化) Returns: any:
request/web/encrypt/other/XhsFpGenerator.py:12
↓ 6 callersFunctionw
(v)
request/web/encrypt/header/x_rap_param_helper/fflate_py.py:191
↓ 5 callersFunction_clen
(cf, cl)
request/web/encrypt/header/x_rap_param_helper/fflate_py.py:223
↓ 5 callersFunction_hmap
(cd, mb, r)
request/web/encrypt/header/x_rap_param_helper/fflate_py.py:45
↓ 5 callersFunction_wbits16
(d, p, v)
request/web/encrypt/header/x_rap_param_helper/fflate_py.py:101
↓ 4 callersFunction_u32
(value: int)
request/web/encrypt/header/x_rap_param_helper/fixed_block_cipher.py:8
↓ 4 callersFunctionb64_encode
(a, CUSTOM_BASE64_ALPHABET)
request/web/encrypt/xhs_diy_encode.py:11
↓ 4 callersFunctionunsigned_right_shift
无符号右移
units/fuck_reverse_crypto/bitwise_operations.py:7
↓ 4 callersFunctionxxh32
(data: bytes | str, seed: int = 0)
request/web/encrypt/header/x_rap_param_helper/serialize_fingerprint_payload.py:112
↓ 3 callersFunction_htree
(freq, mb)
request/web/encrypt/header/x_rap_param_helper/fflate_py.py:116
↓ 3 callersFunction_to_bytes
(data: bytes | bytearray | str | Iterable[int])
request/web/encrypt/header/x_rap_param_helper/fixed_block_cipher.py:12
↓ 3 callersFunctionget
(idx)
request/web/encrypt/header/x_rap_param_helper/fflate_py.py:326
↓ 2 callersFunction_freb
(eb, start)
request/web/encrypt/header/x_rap_param_helper/fflate_py.py:19
↓ 2 callersFunction_lc
(c)
request/web/encrypt/header/x_rap_param_helper/fflate_py.py:181
↓ 2 callersMethod_rand_str
(length: int)
request/web/encrypt/header/X_Rap_Param.py:26
↓ 2 callersFunction_shft
(p)
request/web/encrypt/header/x_rap_param_helper/fflate_py.py:90
↓ 2 callersFunction_wblk
(dat, out, final, syms, lf, df, eb, li, bs, bl, p)
request/web/encrypt/header/x_rap_param_helper/fflate_py.py:238
↓ 2 callersFunction_wfblk
(out, pos, dat)
request/web/encrypt/header/x_rap_param_helper/fflate_py.py:227
↓ 2 callersMethodclose_session
安全关闭会话和连接器
request/web/xhs_session.py:390
↓ 2 callersFunctioncreate_xhs_session
创建XHS_Session实例
request/web/xhs_session.py:416
↓ 2 callersFunctionencode_utf8
(a)
request/web/encrypt/xhs_diy_encode.py:34
↓ 2 callersFunctionencrypt_bytes_with_length
(data: bytes | bytearray | str | Iterable[int])
request/web/encrypt/header/x_rap_param_helper/fixed_block_cipher.py:47
↓ 2 callersMethodencrypt_headers_xrap_param
(self, url:str, data:dict = None)
request/web/encrypt/header/X_Rap_Param.py:184
↓ 2 callersMethodget_self_simple_info
获取当前登录用户简要信息 Returns: Dict: 用户信息
request/web/apis/auth.py:145
↓ 2 callersFunctionhsh
(idx)
request/web/encrypt/header/x_rap_param_helper/fflate_py.py:329
↓ 1 callersMethod__decode_jsvmp_to_logic_list
Base64 解码并转为逻辑列表
request/web/encrypt/cookie/websectiga.py:22
↓ 1 callersMethod__diy_hasher
自定义哈希函数
request/web/encrypt/header/X_S.py:38
↓ 1 callersMethod__diy_mrc
私有方法:计算自定义 mrc
request/web/encrypt/header/X_S_Common.py:26
↓ 1 callersMethod__encrypt_b1
私有方法:加密b1 args: fp: fp字典 returns: str: 生成的b1
request/web/encrypt/header/X_S_Common.py:48
↓ 1 callersMethod__encrypt_headers_x3
(self, cookie_a1: str, cookie_loadts: int, uri: str="", params: dict = None, data: dict = None)
request/web/encrypt/header/X_S.py:85
↓ 1 callersMethod__encrypt_profileData
加密 profileData 字段
request/web/encrypt/cookie/gid_webprofile_data.py:25
↓ 1 callersMethod__get_jsvmpdata
提取 b 和 d 字段
request/web/encrypt/cookie/websectiga.py:15
↓ 1 callersMethod__get_renderer_info
()
request/web/encrypt/other/XhsFpGenerator.py:26
↓ 1 callersMethod__get_seq
获取 seq
request/web/encrypt/header/X_Xray.py:20
↓ 1 callersMethod__get_width_and_height
()
request/web/encrypt/other/XhsFpGenerator.py:119
↓ 1 callersMethod__handle_xhs_response_exceptions
异常处理
request/web/xhs_session.py:190
↓ 1 callersMethod__init__
(self, details)
request/web/exceptions/session_exceptions.py:23
↓ 1 callersMethod__init_cookies
(self)
request/web/xhs_session.py:53
↓ 1 callersMethod__init_headers
(self)
request/web/xhs_session.py:46
↓ 1 callersMethod__request_encrypt
加密请求
request/web/xhs_session.py:158
↓ 1 callersMethod__set_gid_and_acw_tc
注意:xhs两个acw_tc, 他们的域不一样,一个是www.xiaohongshu.com 一个是 edith.xiaohongshu.com 但由于同名会引发异常,所以不要轻易的访问www.xiaohongshu.com API协议请求通常只需
request/web/xhs_session.py:137
↓ 1 callersMethod__set_web_session
(self)
request/web/xhs_session.py:149
↓ 1 callersMethod__set_websectiga_and_secPoisonId
(self)
request/web/xhs_session.py:121
↓ 1 callersMethod__xb3_random
生成随机数 e为指数
request/web/encrypt/header/X_Xray.py:16
↓ 1 callersMethod_build_fingerprint_payload
构建指纹数据的序列化载荷
request/web/encrypt/header/X_Rap_Param.py:30
↓ 1 callersMethod_build_header
(self, meta: dict)
request/web/encrypt/header/X_Rap_Param.py:165
↓ 1 callersMethod_create_proxy_connector
代理连接器创建
request/web/xhs_session.py:106
↓ 1 callersFunction_dflt
(dat, lvl=6, plvl=None, pre=0, post=0)
request/web/encrypt/header/x_rap_param_helper/fflate_py.py:309
↓ 1 callersMethod_initialize
初始化会话
request/web/xhs_session.py:84
↓ 1 callersFunction_ln
(n, lengths, depth)
request/web/encrypt/header/x_rap_param_helper/fflate_py.py:109
↓ 1 callersFunction_load_fixed_cipher_tables
()
request/web/encrypt/header/x_rap_param_helper/fixed_block_cipher.py:22
↓ 1 callersFunctionb64_decode
解码自定义Base64字符串
request/web/encrypt/decrypt_xs_xsc.py:24
↓ 1 callersFunctionbase36encode
(number, alphabet='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ')
request/web/apis/note.py:12
↓ 1 callersFunctionbase64_to_triplet
将4个Base64字符解码为3字节的数值
request/web/encrypt/decrypt_xs_xsc.py:7
↓ 1 callersFunctionbuild_record
(name: str, value: Any)
request/web/encrypt/header/x_rap_param_helper/serialize_fingerprint_payload.py:136
↓ 1 callersFunctioncrc32_encode
(data: str)
units/fuck_reverse_crypto/hash_functions.py:17
↓ 1 callersFunctiondecode_p
完整的解密函数
request/web/encrypt/decrypt_xs_xsc.py:67
↓ 1 callersFunctiondecode_utf8
将字节数组解码为URL编码的字符串
request/web/encrypt/decrypt_xs_xsc.py:54
↓ 1 callersFunctionencode_chunk
(a, e, r, c)
request/web/encrypt/xhs_diy_encode.py:4
↓ 1 callersMethodencrypt_cookie_a1_and_webId
生成 a1 & webId 加密字符串 整个加密过程包括以下步骤: 1. 取当前时间戳,转换为 16 进制字符串 2. 从指定字符串随机取 30 个字符 3. 将时间戳和随机字符串拼接 4. 计算拼接字
request/web/encrypt/cookie/a1_and_webId.py:19
↓ 1 callersMethodencrypt_header_xb3
生成 x-b3-traceid 加密字符串
request/web/encrypt/header/X_B3.py:18
↓ 1 callersMethodencrypt_headers_xray
生成x-xray加密字符串 注意这个方法要在x-t之前调用 整个加密过程包括以下步骤: 1. 时间戳左移23位 2. 与一个随机数异或,这个随机数第一次调用即确定,每次调用get_seq()会加1 3. 将结果转换为16
request/web/encrypt/header/X_Xray.py:25
↓ 1 callersMethodencrypt_headers_xs
Args: cookie_a1: Cookie中的a1值 cookie_loadts: Cookie中的loadts(请求网页的时间戳) uri: 请求的url路径,例如 "/api/sns/web/v1/ho
request/web/encrypt/header/X_S.py:153
↓ 1 callersMethodencrypt_headers_xsc
生成x-s-common加密字符串 整个加密过程包括以下步骤: 1. 组合字典 2. 将字典转换为json字符串 3. 将json字符串进行魔改base64编码 Args: c
request/web/encrypt/header/X_S_Common.py:89
↓ 1 callersMethodenter_metrics_report
进入笔记 Args: note_id: 笔记ID note_type: 笔记类型 1 普通笔记 2 视频笔记 request_id: 请求ID (UUID4) viewer_id: 观看
request/web/apis/note.py:159
↓ 1 callersMethodexit_metrics_report
退出笔记 Args: note_id: 笔记ID note_type: 笔记类型 1 普通笔记 2 视频笔记 request_id: 请求ID (UUID4) viewer_id: 观看
request/web/apis/note.py:204
↓ 1 callersMethodgen_gid_webprofile_data
生成获取gid所需要的data参数 Args: fp (dict): 指纹数据 Returns: tuple[str, dict]: (请求地址, 请求参数)
request/web/encrypt/cookie/gid_webprofile_data.py:33
↓ 1 callersMethodgen_websectiga
Args: js_text (str): 请求 Post https://as.xiaohongshu.com/api/sec/v1/scripting -> json[data][data] 中提取 Returns:
request/web/encrypt/cookie/websectiga.py:40
↓ 1 callersMethodget_comments
获取笔记评论列表 Args: note_id: 笔记ID xsec_token: xsec_token cursor: 分页游标 top_comment_id: ""
request/web/apis/comments.py:17
↓ 1 callersMethodget_fingerprint
(cookies: dict, user_agent: str)
request/web/encrypt/other/XhsFpGenerator.py:131
↓ 1 callersMethodget_homefeed
刷推荐页 Args: category(HomeFeedCategory): 分类 cursor_score(str): 类似游标, 在上一页返回结果中 note_index(int): 笔记索引, 不知道怎么
request/web/apis/note.py:283
↓ 1 callersFunctionget_search_id
()
request/web/apis/note.py:32
↓ 1 callersFunctionguest_demo
()
demo.py:5
↓ 1 callersFunctiongzip_sync
(data, level=6, mtime=None)
request/web/encrypt/header/x_rap_param_helper/fflate_py.py:416
↓ 1 callersFunctionlogin_demo
()
demo.py:11
↓ 1 callersFunctionmain
()
demo.py:27
↓ 1 callersFunctionmd5_encode
(data: str)
units/fuck_reverse_crypto/hash_functions.py:5
↓ 1 callersFunctionnormalize_xorkey
(xorkey: str | bytes | int | None, timestamp: Any)
request/web/encrypt/header/x_rap_param_helper/serialize_fingerprint_payload.py:122
↓ 1 callersMethodnote_detail
获取笔记详情 Args: note_id: 笔记ID xsec_token: xsec_token Returns: 笔记详情结果
request/web/apis/note.py:87
↓ 1 callersFunctionpack_bytes_field
按字段名转换 bytes 类型字段;特殊结构字段走专用编码,其他字段走普通转换。
request/web/encrypt/header/x_rap_param_helper/serialize_fingerprint_payload.py:106
↓ 1 callersMethodpass_scan_124
扫码登录 Args: did: 设备ID 如果不填将自动使用扫码登录的did sid: 会话ID 如果不填将自动使用扫码登录的sid verifyType: 验证类型 verifyBiz:
request/web/apis/auth.py:70
↓ 1 callersMethodscan_login
扫码登录 Args: did: 设备ID sid: 会话ID Returns: Dict: 登录结果
request/web/apis/auth.py:20
↓ 1 callersFunctionserialize_payload_from_dict
( values: dict[str, Any], *, xorkey: str | bytes | int | None = None, mtime: int = 0, comp
request/web/encrypt/header/x_rap_param_helper/serialize_fingerprint_payload.py:155
↓ 1 callersFunctionto_bytes
普通 bytes 字段转换:空值、bytes、list[int]、hex 字符串、普通字符串。
request/web/encrypt/header/x_rap_param_helper/serialize_fingerprint_payload.py:56
↓ 1 callersFunctiontriplet_to_base64
(a, c)
request/web/encrypt/xhs_diy_encode.py:1
↓ 1 callersMethodupdate_fingerprint
(fp: dict, cookies: dict, url: str)
request/web/encrypt/other/XhsFpGenerator.py:245
↓ 1 callersFunctionvalidate_full_dict
(values: dict[str, Any])
request/web/encrypt/header/x_rap_param_helper/serialize_fingerprint_payload.py:148
↓ 1 callersFunctionxor_repeating
(data: bytes | bytearray | str | Iterable[int], key: bytes | bytearray | str | Iterable[int])
request/web/encrypt/header/x_rap_param_helper/fixed_block_cipher.py:35
↓ 1 callersFunctionxor_repeating
(data: bytes, key: bytes)
request/web/encrypt/header/x_rap_param_helper/serialize_fingerprint_payload.py:132
↓ 1 callersFunctionxorkey_from_timestamp
(timestamp: Any)
request/web/encrypt/header/x_rap_param_helper/serialize_fingerprint_payload.py:117
↓ 1 callersMethodzero_pad
使用零填充到块大小的倍数
request/web/encrypt/cookie/gid_webprofile_data.py:20
Method__getitem__
(self, key)
request/web/exceptions/session_exceptions.py:27
Method__getitem__
(self, key)
request/web/exceptions/session_exceptions.py:36
Method__init__
(self, web_session: str = None, proxy_url: str = "", did: str = None, sid: str = None, *args, **kwargs)
request/web/xhs_session.py:18
Method__init__
(self, details)
request/web/exceptions/session_exceptions.py:32
next →1–100 of 147, ranked by callers