コード例 #1
0
def test_exploit_v4_success(mocked_shell, target):
    """" Test scenario - successful exploitation via method 4 """

    route_mock = target.get_route_mock("/boardDataJP.php", methods=["GET"])
    route_mock.side_effect = apply_response_v4

    exploit = Exploit()

    exploit.target = target.host
    exploit.port = target.port

    assert exploit.check()
    assert exploit.run() is None
コード例 #2
0
def test_exploit_v1_success(mocked_shell, target):
    """ Test scenario - successful exploitation via method 1 """

    route_mock = target.get_route_mock("/boardData102.php", methods=["GET"])
    route_mock.side_effect = apply_response_v1

    exploit = Exploit()
    exploit.target = target.host
    exploit.port = target.port
    assert exploit.check()
    assert exploit.run() is None