Skip to content

Instantly share code, notes, and snippets.

@Xnuvers007
Last active July 29, 2023 08:51
Show Gist options
  • Save Xnuvers007/f6e309c8a882ffa98e532ea00e4cab0d to your computer and use it in GitHub Desktop.
Save Xnuvers007/f6e309c8a882ffa98e532ea00e4cab0d to your computer and use it in GitHub Desktop.
Let me tracking your fake url with my very safe code
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")
@Xnuvers007
Copy link
Author

output result

gambar

@Xnuvers007
Copy link
Author

English

Termux

if termux:
download termux in here

  1. open termux then type pkg update -y; pkg upgrade -y; apt update -y; apt upgrade -y
  2. type pkg install nano -y; pkg install wget -y; pkg install python3
  3. type nano main.py
  4. copy the code in here https://gist.github.com/Xnuvers007/f6e309c8a882ffa98e532ea00e4cab0d/raw/54429ead353e5ee4d6bf47cdf29715dfcf4cc3ee/main.py
  5. then back to termux and paste it
  6. 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 Python in here

  1. Download and install python
  2. press windows type idle python or python and press ctrl + n to create new file
  3. copy the code and paste it to python
  4. click run or F5

Linux

  1. Download python just press windows + t or open your terminal linux type sudo apt install python3
  2. type this wget https://gist.github.com/Xnuvers007/f6e309c8a882ffa98e532ea00e4cab0d/raw/54429ead353e5ee4d6bf47cdf29715dfcf4cc3ee/main.py
  3. type python3 main.py

Indonesia

termux

jika termux:
unduh termux di sini

  1. buka termux lalu ketik pkg update -y; pkg upgrade -y; apt update -y; apt upgrade -y
  2. ketik pkg install nano -y; pkg install wget -y; pkg install python3
  3. ketik nano main.py
  4. salin kodenya disini https://gist.github.com/Xnuvers007/f6e309c8a882ffa98e532ea00e4cab0d/raw/54429ead353e5ee4d6bf47cdf29715dfcf4cc3ee/main.py
  5. lalu kembali ke termux dan tempelkan
  6. 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 Python di sini

  1. Unduh dan instal python
  2. tekan windows ketik idle python atau python dan tekan ctrl + n untuk membuat file baru
  3. salin kode dan tempelkan ke python
  4. klik run atau F5

Linux

  1. Unduh python dengan menekan windows + t atau buka terminal linux Anda dan ketik sudo apt install python3
  2. type this wget https://gist.github.com/Xnuvers007/f6e309c8a882ffa98e532ea00e4cab0d/raw/54429ead353e5ee4d6bf47cdf29715dfcf4cc3ee/main.py
  3. ketik python3 main.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment