Commit 5b622d2d authored by Tomas Krizek's avatar Tomas Krizek

pytests: import test_slow_lorris_attack (test12)

parent ffc447ae
......@@ -69,3 +69,21 @@ def test_close(kresd_sock):
except ConnectionResetError:
pytest.skip('TCP RST')
def test_slow_lorris_attack(kresd_sock):
Test simulates slow-lorris attack by sending byte after byte with a delay in between.
Expected: kresd closes the connection
buff, _ = utils.get_msgbuff()
with pytest.raises(BrokenPipeError, message="kresd didn't close the connection"):
for i in range(len(buff)):
b = buff[i:i+1]
except ConnectionResetError:
pytest.skip('TCP RST')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment