Gmail Kullanıcı Adı Kontrol Programı
Bu araç, Gmail kullanıcı adlarını hızlıca kontrol etmenizi sağlar. Bir metin dosyasındaki adları tarar, hangi adların alınmış olduğunu ve hangilerinin uygun olduğunu gösterir. Geçersiz karakterleri ve alınmış adları renkli olarak belirtir, uygun adları ayrı bir dosyada kaydeder. Kullanımı kolay ve hızlı bir çözüm sunar.
Uygulamaya Girerken Key Kısmına r10 Yazın
Gerekli Kütüphaneler:
  • tkinter
  • selenium
  • webdriver_manager
  • requests

"""
Lisans Bilgisi:
Bu program, lisanslı bir yazılımdır. Programın satılması, dağıtılması veya geliştirilmesi yasaktır. Programın tüm hakları nurest tarafından saklıdır.
Kullanım Şartları:
- Program sadece kişisel kullanım için tasarlanmıştır.
- Herhangi bir şekilde dağıtılamaz, satılamaz veya üçüncü şahıslara verilemez.
- Programın kodları üzerinde herhangi bir değişiklik yapılamaz.
Programın tüm hakları nurest tarafından saklıdır.
"""
import tkinter as tk
from tkinter import filedialog, scrolledtext, messagebox
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from webdriver_manager.chrome import ChromeDriverManager
import time
import threading
import re
import os
import requests
import subprocess
import sys
import importlib
# Programın gizli kodu
SECRET_KEY = "r10"
# Proxy ayarları
PROXY = None  # Proxy kullanmak isterseniz buraya proxy adresinizi ekleyin
# Veritabanı dosya yolu
LOG_FILE = "program_log.txt"
# Kütüphaneleri yükleme fonksiyonu
def install_libraries(libraries):
    for lib in libraries:
        try:
            subprocess.check_call([sys.executable, '-m', 'pip', 'install', lib])
        except subprocess.CalledProcessError as e:
            messagebox.showerror("Hata", f"Kütüphane yükleme hatası: {e}")
            return
    messagebox.showinfo("Bilgi", "Tüm kütüphaneler başarıyla yüklendi!")
# Kütüphane kontrol fonksiyonu
def check_libraries(libraries):
    missing_libraries = []
    for lib in libraries:
        try:
            importlib.import_module(lib)
        except ImportError:
            missing_libraries.append(lib)
    if missing_libraries:
        install_libraries(missing_libraries)
# İnternet bağlantısını kontrol eden fonksiyon
def is_connected():
    try:
        requests.get("https://www.google.com", timeout=5)
        return True
    except requests.ConnectionError:
        return False
# Program günlükleme fonksiyonu
def log_to_file(message):
    with open(LOG_FILE, 'a') as log_file:
        log_file.write(f"{time.strftime('%Y-%m-%d %H:%M:%S')} - {message}\n")
# Programın güncellemeleri kontrol eden fonksiyon
def check_for_updates():
    # Güncellemeleri kontrol etmek için gerekli kodu buraya ekleyin
    pass
# Kullanıcı adı geçerliliğini kontrol eden fonksiyon
def is_valid_username(username):
    invalid_chars = re.compile('[^a-zA-Z0-9_.-]')
    return not invalid_chars.search(username)
# Gmail kullanıcı adını kontrol eden fonksiyon
def check_gmail_username(username, results_text, progress_var, stats, available_file):
    if not is_valid_username(username):
        result = f"{username}@gmail.com: Geçersiz karakterler içeriyor."
        results_text.insert(tk.END, result + "\n")
        results_text.yview(tk.END)
        stats["total_checked"] += 1
        stats["remaining"] -= 1
        update_stats(stats)
        return
    options = Options()
    options.add_argument('--headless')  # Tarayıcıyı başsız modda çalıştır
    options.add_argument('--disable-gpu')  # GPU hızlandırmayı kapat
    if PROXY:
        options.add_argument(f'--proxy-server={PROXY}')
    driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options)
    result = f"{username}@gmail.com: "
    try:
        driver.get('https://accounts.google.com')
        time.sleep(1)
        username_input = driver.find_element(By.NAME, 'identifier')
        username_input.send_keys(f'{username}@gmail.com')
        username_input.send_keys(Keys.RETURN)
        time.sleep(2)
        try:
            security_message = driver.find_element(By.XPATH, '//div[contains(text(), "Bu tarayıcı güvenli değil")]')
            result += "Alınmış (güvenlik mesajı)."
            results_text.insert(tk.END, result + "\n")
            results_text.tag_configure("taken", foreground="red")
            results_text.tag_add("taken", "end-2l", "end-1l")
        except:
            try:
                available_message = driver.find_element(By.CSS_SELECTOR, 'div[jsname="B34EJ"]')
                result += "Alınmamış."
                with open(available_file, 'a') as file:
                    file.write(f"{username}@gmail.com\n")
                results_text.insert(tk.END, result + "\n")
                results_text.tag_configure("available", foreground="green")
                results_text.tag_add("available", "end-2l", "end-1l")
            except:
                result += "Alınmış."
                results_text.insert(tk.END, result + "\n")
                results_text.tag_configure("taken", foreground="red")
                results_text.tag_add("taken", "end-2l", "end-1l")
    except Exception as e:
        result = f"Hata oluştu: {e}"
        results_text.insert(tk.END, result + "\n")
        results_text.tag_configure("error", foreground="orange")
        results_text.tag_add("error", "end-2l", "end-1l")
    finally:
        driver.quit()
    stats["total_checked"] += 1
    stats["remaining"] -= 1
    update_stats(stats)
    root.update_idletasks()
    # Günlükleme
    log_to_file(result)
# İstatistikleri güncelleyen fonksiyon
def update_stats(stats):
    total_count_label.config(text=f"Toplam İsim: {stats['total']}")
    checked_count_label.config(text=f"Tarandı: {stats['total_checked']}")
    remaining_count_label.config(text=f"Kalan: {stats['remaining']}")
    taken_count_label.config(text=f"Alınmış: {stats['taken']}")
    available_count_label.config(text=f"Alınmamış: {stats['available']}")
# Kontrol işlemlerini başlatan fonksiyon
def start_checking():
    if not is_connected():
        messagebox.showerror("Hata", "İnternet bağlantısı yok. Lütfen bağlantınızı kontrol edin.")
        return
    file_path = filedialog.askopenfilename(filetypes=[("Text files", "*.txt")])
    if not file_path:
        return
    results_text.delete(1.0, tk.END)
    
    available_file = os.path.splitext(file_path)[0] + "_available.txt"
    
    with open(file_path, 'r') as file:
        usernames = file.readlines()
    stats = {
        "total": len(usernames),
        "total_checked": 0,
        "remaining": len(usernames),
        "taken": 0,
        "available": 0
    }
    update_stats(stats)
    def run_checks():
        start_time = time.time()
        for idx, username in enumerate(usernames):
            username = username.strip()
            if username:
                check_gmail_username(username, results_text, None, stats, available_file)
                root.update_idletasks()
                time.sleep(0.2)  # Kontroller arasında 0.2 saniye bekle
        end_time = time.time()
        elapsed_time = end_time - start_time
        elapsed_str = time.strftime("%H:%M:%S", time.gmtime(elapsed_time))
        results_text.insert(tk.END, f"\nBitiş zamanı: {elapsed_str}")
        results_text.yview(tk.END)
    thread = threading.Thread(target=run_checks)
    thread.start()
# Giriş kodunu kontrol eden fonksiyon
def check_code():
    code = code_entry.get()
    if code == SECRET_KEY:
        open_main_window()
    else:
        messagebox.showerror("Hata", "Yanlış kod. Program kapatılıyor.")
        root.quit()
# Ana pencereyi açan fonksiyon
def open_main_window():
    login_window.destroy()
    root.deiconify()
    check_for_updates()  # Güncellemeleri kontrol et
# Giriş penceresi oluşturan fonksiyon
def create_login_window():
    global login_window
    login_window = tk.Toplevel(root)
    login_window.title("Giriş")
    login_window.geometry("300x200")
    login_window.configure(bg="#333")
    tk.Label(login_window, text="Giriş Kodu", font=("Arial", 12), bg="#333", fg="#fff").pack(pady=10)
    global code_entry
    code_entry = tk.Entry(login_window, font=("Arial", 12))
    code_entry.pack(pady=5)
    tk.Button(login_window, text="Kütüphaneleri Yükle", command=lambda: install_libraries(['tkinter', 'selenium', 'webdriver_manager', 'requests']), bg="#555", fg="#fff").pack(pady=10)
    tk.Button(login_window, text="Giriş", command=check_code, bg="#555", fg="#fff").pack(pady=10)
    login_window.protocol("WM_DELETE_WINDOW", root.quit)
# Güvenlik kontrolü ve gerekli kütüphaneleri kontrol etme
def security_check():
    if not is_connected():
        messagebox.showerror("Hata", "İnternet bağlantısı yok. Lütfen bağlantınızı kontrol edin.")
        root.quit()
        return
    
    check_libraries(["tkinter", "selenium", "webdriver_manager", "requests"])
# Ana pencere oluşturulması
root = tk.Tk()
root.title("Gmail Kullanıcı Adı Kontrolü")
root.geometry("700x500")
root.configure(bg="#333")
# Kod penceresi oluştur
create_login_window()
# Başlangıçta giriş penceresini göster
root.withdraw()
security_check()
# Sonuç paneli ve istatistikler
results_frame = tk.Frame(root, bg="#333")
results_frame.pack(fill=tk.BOTH, expand=True, pady=10)
results_text = scrolledtext.ScrolledText(results_frame, wrap=tk.WORD, width=80, height=20, bg="#222", fg="#eee", font=("Arial", 12))
results_text.pack(fill=tk.BOTH, expand=True)
stats_frame = tk.Frame(root, bg="#333")
stats_frame.pack(pady=10)
total_count_label = tk.Label(stats_frame, text="Toplam İsim: 0", font=("Arial", 12), bg="#333", fg="#fff")
total_count_label.grid(row=0, column=0, padx=5)
checked_count_label = tk.Label(stats_frame, text="Tarandı: 0", font=("Arial", 12), bg="#333", fg="#fff")
checked_count_label.grid(row=0, column=1, padx=5)
remaining_count_label = tk.Label(stats_frame, text="Kalan: 0", font=("Arial", 12), bg="#333", fg="#fff")
remaining_count_label.grid(row=0, column=2, padx=5)
taken_count_label = tk.Label(stats_frame, text="Alınmış: 0", font=("Arial", 12), bg="#333", fg="#fff")
taken_count_label.grid(row=1, column=0, padx=5)
available_count_label = tk.Label(stats_frame, text="Alınmamış: 0", font=("Arial", 12), bg="#333", fg="#fff")
available_count_label.grid(row=1, column=1, padx=5)
start_button = tk.Button(root, text="Kontrolleri Başlat", command=start_checking, bg="#555", fg="#fff")
start_button.pack(pady=10)
root.mainloop()