any more tools rare
ChatGPT said:
ChatGPT
Here are some rare and lesser-known tools you can create for personal use. These are utilities
that may not be commonly found but can be quite useful for niche tasks:
1. Website Availability Checker
This tool continuously monitors whether specific websites are online or offline. You can use this
to check the status of your favorite websites or services.
Code:
python
Copy code
import requests
import time
def check_website_status(url):
try:
response = requests.get(url)
if response.status_code == 200:
print(f"{url} is UP")
else:
print(f"{url} is DOWN (status code: {response.status_code})")
except requests.exceptions.RequestException:
print(f"{url} is DOWN (connection error)")
def website_checker():
websites = input("Enter websites to check (comma-separated): ").split(',')
interval = int(input("Enter the checking interval in seconds: "))
while True:
for website in websites:
website = website.strip()
check_website_status(website)
time.sleep(interval)
website_checker()
2. Clipboard History Saver
This tool saves a history of everything you copy to the clipboard so you don’t lose any important
text or data you copied previously. It’s great if you often need to access older clipboard items.
Requirements: Install pyperclip and keyboard libraries.
bash
Copy code
pip install pyperclip keyboard
Code:
python
Copy code
import pyperclip
import time
import keyboard
clipboard_history = []
def save_clipboard_content():
while True:
if keyboard.is_pressed("ctrl+c"):
content = pyperclip.paste()
if content not in clipboard_history:
clipboard_history.append(content)
print(f"Copied to history: {content}")
time.sleep(1)
def display_history():
print("\nClipboard History:")
for index, item in enumerate(clipboard_history):
print(f"{index + 1}: {item}")
print()
def clipboard_manager():
print("Clipboard History Saver")
print("Press 'Ctrl + C' to copy text.")
print("Press 'Ctrl + H' to view clipboard history.\n")
while True:
if keyboard.is_pressed("ctrl+h"):
display_history()
save_clipboard_content()
clipboard_manager()
3. Local Network Scanner
This tool scans your local network for all connected devices and displays their IP addresses and
MAC addresses. It can be helpful for monitoring network activity or ensuring unauthorized
devices aren't connected.
Code:
python
Copy code
import scapy.all as scapy
def scan(ip_range):
arp_request = scapy.ARP(pdst=ip_range)
broadcast = scapy.Ether(dst="ff:ff:ff:ff:ff:ff")
arp_request_broadcast = broadcast/arp_request
answered_list = scapy.srp(arp_request_broadcast, timeout=1, verbose=False)
[0]
devices = []
for element in answered_list:
devices.append({"ip": element[1].psrc, "mac": element[1].hwsrc})
return devices
def display_results(devices):
print("\nConnected Devices:\n")
print("IP Address\t\tMAC Address")
print("-----------------------------------------")
for device in devices:
print(f"{device['ip']}\t\t{device['mac']}")
def network_scanner():
ip_range = input("Enter your network IP range (e.g., 192.168.1.1/24): ")
devices = scan(ip_range)
display_results(devices)
network_scanner()
4. Email Validator
A tool that checks if an email address is valid and well-formed without sending any emails. This
is useful for verifying if the entered email is correct or syntactically valid.
Code:
python
Copy code
import re
def validate_email(email):
email_regex = r"(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)"
if re.match(email_regex, email):
print(f"'{email}' is a valid email address.")
else:
print(f"'{email}' is NOT a valid email address.")
def email_validator():
while True:
email = input("Enter an email address to validate (or type 'exit' to
quit): ")
if email.lower() == "exit":
break
validate_email(email)
email_validator()
5. Simple File Duplicate Finder
This tool scans a directory and finds files with the same content, helping you remove
unnecessary duplicates.
Code:
python
Copy code
import os
import hashlib
def hash_file(file_path):
hash_obj = hashlib.md5()
with open(file_path, 'rb') as f:
while chunk := f.read(8192):
hash_obj.update(chunk)
return hash_obj.hexdigest()
def find_duplicates(directory):
file_hashes = {}
duplicates = []
for root, _, files in os.walk(directory):
for file in files:
file_path = os.path.join(root, file)
file_hash = hash_file(file_path)
if file_hash in file_hashes:
duplicates.append((file_path, file_hashes[file_hash]))
else:
file_hashes[file_hash] = file_path
return duplicates
def duplicate_finder():
directory = input("Enter the directory path to scan for duplicates: ")
duplicates = find_duplicates(directory)
if duplicates:
print("\nDuplicate Files Found:\n")
for dup in duplicates:
print(f"{dup[0]} is a duplicate of {dup[1]}")
else:
print("No duplicate files found.")
duplicate_finder()
6. WiFi Password Retriever (Windows Only)
This tool retrieves saved WiFi passwords on your system. It works on Windows and can be
useful when you forget your WiFi password.
Code:
python
Copy code
import subprocess
def get_wifi_passwords():
wifi_list = subprocess.check_output("netsh wlan show
profiles").decode("utf-8").split('\n')
wifi_names = [line.split(":")[1][1:-1] for line in wifi_list if "All User
Profile" in line]
for wifi_name in wifi_names:
command = f"netsh wlan show profile {wifi_name} key=clear"
result = subprocess.check_output(command).decode("utf-8").split('\n')
password = [line.split(":")[1][1:-1] for line in result if "Key
Content" in line]
print(f"WiFi: {wifi_name}, Password: {password[0] if password else 'No
password'}")
def wifi_password_retriever():
print("Saved WiFi Passwords:\n")
get_wifi_passwords()
wifi_password_retriever()
7. Simple Weather Fetcher
This tool fetches weather data for a given city. You can use an API like OpenWeatherMap to get
real-time data.
Requirements: You'll need an API key from OpenWeatherMap.
Code:
python
Copy code
import requests
API_KEY = 'your_openweather_api_key_here'
BASE_URL = "http://api.openweathermap.org/data/2.5/weather?"
def get_weather(city):
url = BASE_URL + f"q={city}&appid={API_KEY}&units=metric"
response = requests.get(url)
data = response.json()
if data["cod"] == 200:
weather_description = data['weather'][0]['description']
temperature = data['main']['temp']
humidity = data['main']['humidity']
wind_speed = data['wind']['speed']
print(f"\nWeather in {city}:")
print(f"Description: {weather_description}")
print(f"Temperature: {temperature}°C")
print(f"Humidity: {humidity}%")
print(f"Wind Speed: {wind_speed} m/s\n")
else:
print(f"City {city} not found.")
def weather_fetcher():
city = input("Enter city name: ")
get_weather(city)
weather_fetcher()
8. Image to ASCII Converter
This tool converts an image into ASCII art. It’s a fun and rare tool for turning images into text
art.
Requirements: Install the PIL library (Pillow).
bash
Copy code
pip install pillow
Code:
python
Copy code
from PIL import Image
ASCII_CHARS = ['@', '#', 'S', '%', '?', '*', '+', ';', ':', ',', '.']
def resize_image(image, new_width=100):
width, height = image.size
aspect_ratio = height/width
new_height = int(aspect_ratio * new_width)
return image.resize((new_width, new_height))
def grayify(image):
return image.convert("L")
def pixels_to_ascii(image):
pixels = image.getdata()
ascii_str = "".join([ASCII_CHARS[pixel//25] for pixel in pixels])
return ascii_str
def image_to_ascii(image_path):
image = Image.open(image_path)
image = resize_image(image)
image = grayify(image)
ascii_str = pixels_to_ascii(image)
img_width = image.width
ascii_str_len = len(ascii_str)
ascii_img = "\n".join([ascii_str[i:i+img_width] for i in range(0,
ascii_str_len, img_width)])
return ascii_img
def image_converter():
image_path = input("Enter image path: ")
ascii_image = image