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") |
English
Termux
if termux:
download termux in here
- open termux then type
pkg update -y; pkg upgrade -y; apt update -y; apt upgrade -y
- type
pkg install nano -y; pkg install wget -y; pkg install python3
- type
nano main.py
- copy the code in here https://gist.github.com/Xnuvers007/f6e309c8a882ffa98e532ea00e4cab0d/raw/54429ead353e5ee4d6bf47cdf29715dfcf4cc3ee/main.py
- then back to termux and paste it
- type
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 and install python
- press
windows
typeidle python
orpython
and pressctrl + n
to create new file - copy the code and paste it to python
- click
run
orF5
Linux
- Download python just press
windows + t
or open your terminal linux typesudo apt install python3
- type this
wget https://gist.github.com/Xnuvers007/f6e309c8a882ffa98e532ea00e4cab0d/raw/54429ead353e5ee4d6bf47cdf29715dfcf4cc3ee/main.py
- type
python3 main.py
Indonesia
termux
jika termux:
unduh termux di sini
- buka termux lalu ketik
pkg update -y; pkg upgrade -y; apt update -y; apt upgrade -y
- ketik
pkg install nano -y; pkg install wget -y; pkg install python3
- ketik
nano main.py
- salin kodenya disini https://gist.github.com/Xnuvers007/f6e309c8a882ffa98e532ea00e4cab0d/raw/54429ead353e5ee4d6bf47cdf29715dfcf4cc3ee/main.py
- lalu kembali ke termux dan tempelkan
- ketik
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 dan instal python
- tekan
windows
ketikidle python
ataupython
dan tekanctrl + n
untuk membuat file baru - salin kode dan tempelkan ke python
- klik
run
atauF5
Linux
- Unduh python dengan menekan
windows + t
atau buka terminal linux Anda dan ketiksudo apt install python3
- type this
wget https://gist.github.com/Xnuvers007/f6e309c8a882ffa98e532ea00e4cab0d/raw/54429ead353e5ee4d6bf47cdf29715dfcf4cc3ee/main.py
- ketik
python3 main.py
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
output result