└── lv_bypass.py /lv_bypass.py: -------------------------------------------------------------------------------- 1 | import re 2 | import time 3 | import json 4 | import base64 5 | import requests 6 | 7 | # ------------------------------------------- 8 | 9 | def lv_bypass(url): 10 | client = requests.Session() 11 | 12 | headers = { 13 | "User-Agent": "AppleTV6,2/11.1", 14 | "Content-Type": "application/json", 15 | "Accept": "application/json", 16 | } 17 | 18 | client.headers.update(headers) 19 | 20 | url = url.replace("%3D", " ").replace("&o=sharing", "").replace("?o=sharing", "").replace("dynamic?r=", "dynamic/?r=") 21 | 22 | id_name = re.search(r"\/\d+\/[^\/]+", url) 23 | 24 | if not id_name: return None 25 | 26 | paths = [ 27 | "/captcha", 28 | "/countdown_impression?trafficOrigin=network", 29 | "/todo_impression?mobile=true&trafficOrigin=network" 30 | ] 31 | 32 | for path in paths: 33 | url = f"https://publisher.linkvertise.com/api/v1/redirect/link{id_name[0]}{path}" 34 | response = client.get(url).json() 35 | if response["success"]: break 36 | 37 | data = client.get(f"https://publisher.linkvertise.com/api/v1/redirect/link/static{id_name[0]}").json() 38 | 39 | out = { 40 | 'timestamp':int(str(time.time_ns())[0:13]), 41 | 'random':"6548307", 42 | 'link_id':data["data"]["link"]["id"] 43 | } 44 | 45 | options = { 46 | 'serial': base64.b64encode(json.dumps(out).encode()).decode() 47 | } 48 | 49 | data = client.get("https://publisher.linkvertise.com/api/v1/account").json() 50 | user_token = data["user_token"] if "user_token" in data.keys() else None 51 | 52 | url_submit = f"https://publisher.linkvertise.com/api/v1/redirect/link{id_name[0]}/target?X-Linkvertise-UT={user_token}" 53 | 54 | data = client.post(url_submit, json=options).json() 55 | 56 | return data["data"]["target"] 57 | 58 | # ------------------------------------------- 59 | 60 | # Add URL 61 | url = "https://domain.tld/XXXXXX/XXX" 62 | bypassed = lv_bypass(url) 63 | 64 | print(bypassed) 65 | --------------------------------------------------------------------------------