Guess Follow Invitation Code#
Organizer: No
Guess the invitation code by replacing zero*width with possible characters (including a-z, A-Z, and 0-9) to generate all possibilities.
Python code:
# 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_invitation_code.py
'''
import requests
import itertools
import string
import json
CSRFTOKEN = ""
COOKIE = ""
code = 'zero*width'
code_list = []
characters = string.ascii_letters + string.digits # including a-z, A-Z, and 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) # convert string to list for modification
for pos, char in zip(asterisk_positions, combination):
new_code[pos] = char # replace '*'
code_list.append(''.join(new_code))
print('Total number of combinations:', 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, 'returned:', r.json())
Print result
Total number of combinations: 62
zeroawidth returned: {'code': 5003, 'message': 'Invitation code does not exist.'}
zerobwidth returned: {'code': 5003, 'message': 'Invitation code does not exist.'}
zerocwidth returned: {'code': 5003, 'message': 'Invitation code does not exist.'}
zerodwidth returned: {'code': 5003, 'message': 'Invitation code does not exist.'}
zeroewidth returned: {'code': 5003, 'message': 'Invitation code does not exist.'}
zerofwidth returned: {'code': 5003, 'message': 'Invitation code does not exist.'}