Last active
July 29, 2023 08:51
-
-
Save Xnuvers007/f6e309c8a882ffa98e532ea00e4cab0d to your computer and use it in GitHub Desktop.
Let me tracking your fake url with my very safe code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
try: | |
import requests | |
from bs4 import BeautifulSoup | |
except ImportError: | |
print("Required packages not found. Attempting to install them.") | |
try: | |
os.system("pip install requests beautifulsoup4") | |
print("Packages installed successfully.") | |
import requests | |
from bs4 import BeautifulSoup | |
except Exception as e: | |
print(f"Error installing packages: {e}") | |
exit(1) | |
import html | |
from urllib.parse import urlparse | |
def get_valid_url(): | |
while True: | |
url = input("Enter the URL: ") | |
# If the URL doesn't start with 'http://' or 'https://', add 'https://' | |
if not url.startswith(('http://', 'https://')): | |
url = "https://" + url | |
# Escape HTML characters (this line isn't necessary for URL validation) | |
url = html.escape(url) | |
# Use urlparse to check if the URL is well-formed | |
parsed_url = urlparse(url) | |
if parsed_url.scheme and parsed_url.netloc: | |
return url | |
else: | |
print("Error: Please enter a valid URL.") | |
# Get a valid URL from the user | |
url = get_valid_url() | |
cookies = { | |
'__gads': 'ID=00720bce886a9733:T=1690611573:RT=1690611573:S=ALNI_MZLwKpcxtezRm7b0x_2B1qM8lk4yQ', | |
'__gpi': 'UID=00000c2512115916:T=1690611573:RT=1690611573:S=ALNI_Ma-rSqxwvVnINbr_I76alxZ52JdkA', | |
'_cc_id': '9ee99805d96d8bd43d8301b622feaa0c', | |
'panoramaId_expiry': '1690697973421', | |
'cto_bundle': 'NGhXVl9rZjI2UiUyRnMxYXdhVkl3V0lndUU3dzZxRSUyRlMzQ2c5dHRoZXg2Vk9Ib2RiRFFsSkJoJTJCdFFKbDFwTnFCNk1OZ2dZNzlGa2FlS0xQaGJ6Y3hjNENuRjhUb29WbExHVFY2ZUVUUVhUc2FENEQ2MFgyVXprQ1VzbTVvWHZST3pNb3JTTktrV0ZGMFZWMiUyQjVFcEQ1MktpNUx4dyUzRCUzRA', | |
} | |
headers = { | |
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0', | |
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', | |
'Accept-Language': 'id,en-US;q=0.7,en;q=0.3', | |
# 'Accept-Encoding': 'gzip, deflate, br', | |
'Content-Type': 'application/x-www-form-urlencoded', | |
'Origin': 'https://wheregoes.com', | |
'Connection': 'keep-alive', | |
'Referer': 'https://wheregoes.com/trace/20233463691/', | |
# 'Cookie': '__gads=ID=00720bce886a9733:T=1690611573:RT=1690611573:S=ALNI_MZLwKpcxtezRm7b0x_2B1qM8lk4yQ; __gpi=UID=00000c2512115916:T=1690611573:RT=1690611573:S=ALNI_Ma-rSqxwvVnINbr_I76alxZ52JdkA; _cc_id=9ee99805d96d8bd43d8301b622feaa0c; panoramaId_expiry=1690697973421; cto_bundle=NGhXVl9rZjI2UiUyRnMxYXdhVkl3V0lndUU3dzZxRSUyRlMzQ2c5dHRoZXg2Vk9Ib2RiRFFsSkJoJTJCdFFKbDFwTnFCNk1OZ2dZNzlGa2FlS0xQaGJ6Y3hjNENuRjhUb29WbExHVFY2ZUVUUVhUc2FENEQ2MFgyVXprQ1VzbTVvWHZST3pNb3JTTktrV0ZGMFZWMiUyQjVFcEQ1MktpNUx4dyUzRCUzRA', | |
'Upgrade-Insecure-Requests': '1', | |
'Sec-Fetch-Dest': 'document', | |
'Sec-Fetch-Mode': 'navigate', | |
'Sec-Fetch-Site': 'same-origin', | |
'Sec-Fetch-User': '?1', | |
} | |
data = { | |
'url': url, | |
'ua': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0', | |
'phn': '', | |
'php': '29V2hlcmVHb2VzIGhvbmV5cG90IDIwMjMtMDctMjk==', | |
} | |
session = requests.Session() | |
response = session.post('https://wheregoes.com/trace/', cookies=cookies, headers=headers, data=data) | |
# print(response.text) | |
soup = BeautifulSoup(response.text, 'html.parser') | |
# for teks in soup.find_all('div', class_='cell url'): | |
# url_fake = teks.text.strip()[35:-12] | |
# redirect_tag = teks.find_next('div', class_='cell url') | |
# if redirect_tag: | |
# redirect_text = redirect_tag.text.strip() | |
# redirect_url = redirect_tag.find('a', rel='nofollow noreferer noopener') | |
# if redirect_url: | |
# redirect_url = redirect_url.get('href') | |
# print(f"fake url: {url_fake.replace('|', '')}") | |
# print(f"redirect url: {redirect_url}") | |
# print("") | |
for teks, redirect_tag in zip(soup.select('div.cell.url'), soup.select('div.cell.url')[1:]): | |
url_fake = teks.get_text(strip=True)[35:-12] | |
redirect_text = redirect_tag.get_text(strip=True) | |
redirect_url = redirect_tag.select_one('a[rel="nofollow noreferer noopener"]') | |
if redirect_url: | |
redirect_url = redirect_url['href'] | |
print(f"fake url: {url_fake.replace('|', '')}") | |
print(f"redirect/Original url: {redirect_url}\n") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
English
Termux
if termux:
download termux in here
pkg update -y; pkg upgrade -y; apt update -y; apt upgrade -y
pkg install nano -y; pkg install wget -y; pkg install python3
nano main.py
python3 main.py
=================
4. or you can type like this
wget https://gist.github.com/Xnuvers007/f6e309c8a882ffa98e532ea00e4cab0d/raw/54429ead353e5ee4d6bf47cdf29715dfcf4cc3ee/main.py
5. type
python3 main.py
Windows
Download Python in here
windows
typeidle python
orpython
and pressctrl + n
to create new filerun
orF5
Linux
windows + t
or open your terminal linux typesudo apt install python3
wget https://gist.github.com/Xnuvers007/f6e309c8a882ffa98e532ea00e4cab0d/raw/54429ead353e5ee4d6bf47cdf29715dfcf4cc3ee/main.py
python3 main.py
Indonesia
termux
jika termux:
unduh termux di sini
pkg update -y; pkg upgrade -y; apt update -y; apt upgrade -y
pkg install nano -y; pkg install wget -y; pkg install python3
nano main.py
python3 main.py
===================
4. Anda dapat mengetik seperti ini
wget https://gist.github.com/Xnuvers007/f6e309c8a882ffa98e532ea00e4cab0d/raw/54429ead353e5ee4d6bf47cdf29715dfcf4cc3ee/main.py
6. ketik
python3 main.py
Windows
Unduh Python di sini
windows
ketikidle python
ataupython
dan tekanctrl + n
untuk membuat file barurun
atauF5
Linux
windows + t
atau buka terminal linux Anda dan ketiksudo apt install python3
wget https://gist.github.com/Xnuvers007/f6e309c8a882ffa98e532ea00e4cab0d/raw/54429ead353e5ee4d6bf47cdf29715dfcf4cc3ee/main.py
python3 main.py