Temporary Advertisements:
Ad
Ad
Ad
Python script to check for the existence of an email on Google platforms
by Loki - Monday July 29, 2024 at 05:31 PM
#1
Usage: python3 ./<script_name>.py email1 email2 ...

import sys
import requests

# Disable all warnings from urllib3
requests.packages.urllib3.disable_warnings()

def verify_email(email):
    """Verify the given email address."""
    # Replace *** in the URL with the email address
    url = f"https://calendar.google.com/calendar/ical/{email}/public/basic.ics"

    try:
        # Make an HTTP call to the URL without SSL certificate verification
        response = requests.get(url, verify=False)

        # Check the response headers for the presence of the "x-frame-options: SAMEORIGIN" string
        if 'x-frame-options' in response.headers and response.headers['x-frame-options'].upper() == 'SAMEORIGIN':
            # Append an asterisk if the HTTP response code is 200
            asterisk = " *" if response.status_code == 200 else ""
            print(f"{email}{asterisk}")
        # If the header is not present, nothing is printed
    except requests.exceptions.RequestException as e:
        print(f"An error occurred with {email}: {e}")

def main():
    if len(sys.argv) > 1:
        # If there are command-line arguments, verify each email address
        for email in sys.argv[1:]:
            verify_email(email.strip())
    else:
        # Otherwise, read from sys.stdin
        for line in sys.stdin:
            email = line.strip()
            verify_email(email)

if __name__ == "__main__":
    main()


Omnicer
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  COLLECTION GEOINT: Mapping and Geospatial Intelligence Loki 477 33,195 26 minutes ago
Last Post: WarriorX
  COLLECTION 1757 unique osint tools with title, description and sorted by tag kmsadkfmdksmf 33 2,764 2 hours ago
Last Post: urcute250682
  ✨ 3000 DATABASES ✨ - BEST OSINT / BREACH LOOKUP stormyhabibi 73 3,640 4 hours ago
Last Post: swagger911
  How to dox for beginners Coopa 107 8,163 4 hours ago
Last Post: DFGHJ
  COLLECTION Telegram Bots for OSINT Loki 1,199 81,320 10 hours ago
Last Post: northek9f2w

Forum Jump:


 Users browsing this forum: