猜Follow邀请码

猜 Follow 邀请码

整理: No

猜邀请码 把 zero*width 替换成可能的字符 (包含 a-z, A-Z 和 0-9), 生成所有可能

python 代码:

Copy
# coding=utf-8
'''
Author: courageux_san WX
Date: 2024-10-10 20:09:39
LastEditors: courageux_san WX
LastEditTime: 2024-10-10 20:37:58
FilePath: /script/follow邀请码.py
'''
import requests
import itertools
import string
import json

CSRFTOKEN = ""
COOKIE = ""

code = 'zero*width'

code_list = []
characters = string.ascii_letters + string.digits # 包含 a-z, A-Z 和 0-9
asterisk_positions = [i for i, char in enumerate(code) if char == '*']
for combination in itertools.product(characters, repeat=len(asterisk_positions)):
new_code = list(code) # 将字符串转换为列表以便修改
for pos, char in zip(asterisk_positions, combination):
new_code[pos] = char # 替换 '*'
code_list.append(''.join(new_code))
print('所有组合的数量:', len(code_list))

for c in code_list:
data = {
"code": c,
"csrfToken": CSRFTOKEN
}
headers = {
"Access-Control-Allow-Credentials": "true",
"Access-Control-Allow-Origin": "https://app.follow.is",
"Alt-Svc": 'h3=":443"; ma=86400',
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Encoding": "gzip, deflate, br, zstd",
"Accept-Language": "zh-CN,zh;q=0.9",
"Cookie": COOKIE,
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36",
"X-App-Dev": "0",
"X-App-Version": "0.0.1-alpha.19",
}
r = requests.post(url='https://api.follow.is/invitations/use', json=data, headers=headers)
print(c, '返回:', r.json())

打印结果

Copy
所有组合的数量: 62
zeroawidth 返回: {'code': 5003, 'message': 'Invitation code does not exist.'}
zerobwidth 返回: {'code': 5003, 'message': 'Invitation code does not exist.'}
zerocwidth 返回: {'code': 5003, 'message': 'Invitation code does not exist.'}
zerodwidth 返回: {'code': 5003, 'message': 'Invitation code does not exist.'}
zeroewidth 返回: {'code': 5003, 'message': 'Invitation code does not exist.'}
zerofwidth 返回: {'code': 5003, 'message': 'Invitation code does not exist.'}