Files
gists/tools/data/domgrep.py
tobias 619b0bc432 Restructure repository: organize tools by purpose, create what search tool
- Move single-file tools to tools/ organized by category (security, forensics, data, etc.)
- Move multi-file projects to projects/ (go-tools, puzzlebox, timesketch, rust-tools)
- Move system scripts to scripts/ (proxy, display, setup, windows)
- Organize config files in config/ (shell, visidata, applications)
- Move experimental tools to archive/experimental
- Create 'what' fuzzy search tool with progressive enhancement (ollama->fzf->grep)
- Add initial metadata database for intelligent tool discovery
- Preserve git history using 'git mv' commands
2026-02-21 23:20:42 +01:00

21 lines
498 B
Python
Executable File

#!/usr/bin/env python3
import re
import sys
from urllib.parse import urlparse
pattern=re.compile(r'\d+\.\d+\.\d+\.\d+')
for line in sys.stdin:
line=line.strip()
if not line.lower().startswith('http'):
line="http://"+line
try:
p=urlparse(line)
if not pattern.search(p.netloc):
if ":" in p.netloc:
print(p.netloc.split(":")[0])
else:
print(p.netloc)
except Exception as e:
print(e)
pass