19
Стиль — curl+grep
, дух — как ночь на wild traffic. Атачим DNS info, HTTP headers, interesting files и пару пассивных payload’ов. Файлик можно сохранить с именем: bugdrop.py
import requests
import re
import socket
import json
from urllib.parse import urljoin
headers = {
'User-Agent': 'BugDrop/1.0 (+🐞)',
}
def get_ip(domain):
try:
ip = socket.gethostbyname(domain)
return ip
except Exception:
return '❌ no IP'
def fetch_headers(target):
print(f'\n🎯 HEADERS for {target}')
try:
r = requests.get(target, headers=headers, timeout=10)
for k, v in r.headers.items():
print(f'{k}: {v}')
if "X-Powered-By" in r.headers:
print("⚠️ X-Powered-By detected:", r.headers["X-Powered-By"])
if "Server" in r.headers:
print("🖥️ Server:", r.headers["Server"])
except Exception as e:
print(f'⚠️ error while grabbing headers: {e}')
def find_juicy_files(target):
paths = ['.env', '.git/config', 'config.json', 'admin.php', 'backup.zip']
print(f'\n🚪 Juicy Paths on {target}')
for path in paths:
url = urljoin(target, path)
try:
r = requests.get(url, headers=headers, timeout=7)
if r.status_code == 200 and len(r.text) < 5000:
print(f'[+] Found: {url} | {len(r.text)} bytes')
except:
pass
def check_cors(target):
try:
r = requests.get(target, headers={
**headers,
'Origin': 'https://evil.com'
}, timeout=10)
if "Access-Control-Allow-Origin" in r.headers:
print("\n🌐 CORS header detected:", r.headers["Access-Control-Allow-Origin"])
if r.headers["Access-Control-Allow-Origin"] == "*" or "evil.com" in r.headers["Access-Control-Allow-Origin"]:
print("💥 Possible CORS misconfig! 🔥🔥🔥")
except:
pass
def main():
target = input("💻 Enter target URL (ex. https://example.com): ").strip()
if not target.startswith("http"):
target = "http://" + target
domain = target.split("//")[1].split("/")[0]
print("🔎 Recon on:", domain)
print("🧠 IP:", get_ip(domain))
fetch_headers(target)
find_juicy_files(target)
check_cors(target)
if __name__ == "__main__":
main()
Как юзать:
python3 bugdrop.py
Вводишь цель (https://victim.com
) — и он тебе всё по красоте разворачивает: IP, headers, вкусные .git
, leak’и, и CORS-баги, если админы слишком расслабились.
Хаки и прокачка:
• Засунь в output логгер — чтобы лить всё сразу в .json
• Добавь waybackurls
или JS finder
— будет глубокая разведка
• Wanna be fancy? Пихни colorama
, пусть интерфейс смотрится как панель NASA