INNER CODE UNIT · Python

TestOneInput

cisco-open/forge · fuzz/splunk_stuck_dispatcher_fuzzer.py:66

def TestOneInput(data: bytes) -> None:
    if len(data) > 8192:
        return

    text = data.decode('utf-8', errors='replace')
    body = text
    if data[:1] == b'f':
        body = urllib.parse.urlencode({'payload': text})

    content_type = (
        'application/x-www-form-urlencoded'
        if data[:1] == b'f'
        else 'application/json'
    )
    event = _event(body, content_type, encoded=data[:1] == b'b')
    stuck_handler.request_metadata(event)

    try:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…