Added basic engine test

This commit is contained in:
Kkevsterrr 2019-12-12 22:27:52 -05:00
parent ab7d6a400d
commit fab15ae53f
1 changed files with 21 additions and 0 deletions

21
tests/test_engine.py Normal file
View File

@ -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")