MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / downloads_dir

Function downloads_dir

Scripts/ButSystem.py:3678–3691  ·  view source on GitHub ↗

Best-effort Android/Termux downloads directory. - Termux: ~/storage/downloads (requires termux-setup-storage) - Android common: /storage/emulated/0/Download - Fallback: Homework/ButSystem/ (or internal if storage permission missing)

()

Source from the content-addressed store, hash-verified

3676
3677# ---------------------------
3678# Admin helpers / kick support
3679# ---------------------------
3680
3681
3682def _client_ip() -> str:
3683 """Real client IP with anti-spoofing.
3684
3685 We only trust forwarded headers when the request comes from loopback
3686 (i.e., a local reverse-proxy like cloudflared/tor on the SAME device).
3687 """
3688 ra = (request.remote_addr or "?").strip()
3689 try:
3690 if not _is_loopback(ra):
3691 return ra
3692
3693 # If loopback, allow reverse-proxy headers (cloudflared commonly sets one of these)
3694 for h in ("CF-Connecting-IP", "X-Real-IP"):

Callers 2

profiler_exportFunction · 0.70
profiler_combineFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected