From fab15ae53f9a9ab6913fda07efdcf8f2b15fa148 Mon Sep 17 00:00:00 2001 From: Kkevsterrr Date: Thu, 12 Dec 2019 22:27:52 -0500 Subject: [PATCH] Added basic engine test --- tests/test_engine.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/test_engine.py diff --git a/tests/test_engine.py b/tests/test_engine.py new file mode 100644 index 0000000..93b1c5c --- /dev/null +++ b/tests/test_engine.py @@ -0,0 +1,21 @@ +import os +import sys + +# Add the path to the engine so we can import it +BASEPATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +sys.path.append(BASEPATH) + +import engine + +def test_engine(): + """ + Basic engine test + """ + # Port to run the engine on + port = 80 + # Strategy to use + strategy = "[TCP:flags:A]-duplicate(tamper{TCP:flags:replace:R}(tamper{TCP:chksum:corrupt},),)-| \/" + + # Create the engine in debug mode + with engine.Engine(port, strategy, log_level="debug") as eng: + os.system("curl http://example.com?q=ultrasurf")