Fake website check

Python GUI Tool से Website का WHOIS और Risk चेक करें (No CMD)

Python GUI Tool से Website का WHOIS और Risk Status कैसे चेक करें (बिना CMD)

अगर आप Python सीख रहे हैं या एक ऐसा टूल बनाना चाहते हैं जिससे आप किसी भी वेबसाइट की जानकारी (जैसे WHOIS, Domain Age, Active Status) जान सकें, तो ये पोस्ट आपके लिए है। और सबसे खास बात — इसमें कोई कमांड लाइन इस्तेमाल नहीं होगी।

हम आपको एक Simple GUI-based टूल बनाना सिखाएंगे, जिसे आप सिर्फ Python GUI (Tkinter) से बना सकते हैं। इसमें आप वेबसाइट डालेंगे और बटन क्लिक करने पर सारी डिटेल्स मिल जाएंगी।

Python GUI Website Checker Tool
उदाहरण: Final Output Window

🧰 इस्तेमाल होने वाली Libraries

  • tkinter — GUI बनाने के लिए
  • whois — Domain की WHOIS जानकारी पाने के लिए
  • requests — Website का Status चेक करने के लिए
  • datetime — Domain की उम्र निकालने के लिए

💻 Python GUI Tool का कोड:

# सबसे पहले libraries install करें:
# pip install python-whois requests

import whois
import requests
from datetime import datetime
import tkinter as tk
from tkinter import messagebox

def check_website():
    url = entry.get().strip().lower()
    if not url:
        messagebox.showwarning("Input Error", "Please enter a website.")
        return
    result_text.delete('1.0', tk.END)
    result_text.insert(tk.END, f"Checking website: {url}\n\n")
    try:
        domain_info = whois.whois(url)
        result_text.insert(tk.END, "--- WHOIS Information ---\n")
        result_text.insert(tk.END, f"Domain Name: {domain_info.domain_name}\n")
        result_text.insert(tk.END, f"Registrar: {domain_info.registrar}\n")
        result_text.insert(tk.END, f"Creation Date: {domain_info.creation_date}\n")
        result_text.insert(tk.END, f"Expiration Date: {domain_info.expiration_date}\n\n")
        try:
            response = requests.get('http://' + url, timeout=5)
            if response.status_code == 200:
                result_text.insert(tk.END, "Website Status: Active (200 OK)\n")
            else:
                result_text.insert(tk.END, f"Website Status: {response.status_code} (Issue detected)\n")
        except:
            result_text.insert(tk.END, "Website Status: Unable to reach site.\n")

        if domain_info.creation_date:
            creation_date = domain_info.creation_date[0] if isinstance(domain_info.creation_date, list) else domain_info.creation_date
            domain_age_days = (datetime.now() - creation_date).days
            result_text.insert(tk.END, f"Domain Age: {domain_age_days} days\n")
            if domain_age_days < 180:
                result_text.insert(tk.END, "Risk Alert: New Domain (Less than 6 months old) - Be Cautious!\n")
            else:
                result_text.insert(tk.END, "Domain looks older than 6 months - Looks safer.\n")
        else:
            result_text.insert(tk.END, "Creation Date not available - Risky site!\n")

    except Exception as e:
        result_text.insert(tk.END, f"\nError fetching WHOIS data: {e}")

# GUI Setup
root = tk.Tk()
root.title("Website Checker Tool")
root.geometry("600x400")

entry = tk.Entry(root, width=50)
entry.pack(pady=10)

check_button = tk.Button(root, text="Check Website", command=check_website)
check_button.pack(pady=5)

result_text = tk.Text(root, height=20, width=70)
result_text.pack(pady=10)

root.mainloop()

🚀 कैसे चलाएं यह Tool?

  1. Python install होना जरूरी है
  2. इन libraries को install करें:
    pip install python-whois requests
  3. tkinter पहले से Python में आता है
  4. ऊपर वाला कोड किसी फाइल में सेव करें: website_checker_gui.py
  5. फिर चलाएं: python website_checker_gui.py

🎯 Tool से क्या-क्या पता चलेगा?

  • Domain name
  • Registrar
  • Creation & Expiration date
  • Website status (Active या नहीं)
  • Domain Age (in days)
  • Risk Alert (अगर नया domain हो)

🧠 और क्या जोड़ सकते हैं?

अब अगला step आपके ऊपर है। चाहें तो इसमें:

  • ScamAdviser से Trust Score जोड़ सकते हैं
  • Dark Mode + Stylish Fonts लाकर Professional Look दे सकते हैं
  • EXE File बना सकते हैं (Python के बिना चलाने के लिए)

अगर आप चाहें तो मैं अगली पोस्ट में इनमें से कोई भी feature जोड़ दूंगा। Comment करके बताएं!


👉 Bonus Tip: ऐसे छोटे Python Tools आप GitHub पर शेयर करके अपना Portfolio बना सकते हैं।

Comments