#!/usr/bin/env python3
import requests
import time
import io
import re

PROXY = {
    'http': 'http://b04dd480860a80d0:VJvorQIeLmBSK1G9@res.proxy-seller.com:10003',
    'https': 'http://b04dd480860a80d0:VJvorQIeLmBSK1G9@res.proxy-seller.com:10003'
}

headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36',
}

# First check laporan page to see if upload appeared
print("[*] Checking laporan page...")
resp = requests.get("https://pohon.disperkim.semarangkota.go.id/laporan", headers=headers, proxies=PROXY, verify=False, timeout=30)
print(f"[*] Status: {resp.status_code}")

# Check for any uploaded images
# Look for /files/laporan/ links
files = re.findall(r'/files/laporan/[^"\']+', resp.text)
print(f"[*] Found files: {files[:10]}")

# Try to access files/laporan directory
print("\n[*] Checking files/laporan directory...")
resp = requests.get("https://pohon.disperkim.semarangkota.go.id/files/laporan/", headers=headers, proxies=PROXY, verify=False, timeout=30)
print(f"[*] Status: {resp.status_code}")
print(f"[*] Response: {resp.text[:500]}")

