mirror of
https://github.com/cuckoosandbox/cuckoo.git
synced 2026-10-12 02:12:40 +00:00
In the past we've attempted to use Capcom to disable Driver Signature Enforcement. With a more permanent solution upcoming, it is safe to remove this functionality.
22 lines
593 B
Python
22 lines
593 B
Python
# Copyright (C) 2017 Cuckoo Foundation.
|
|
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
|
|
# See the file 'docs/LICENSE' for copying permission.
|
|
|
|
import mock
|
|
import os.path
|
|
|
|
from lib.core.driver import Driver
|
|
|
|
@mock.patch("os.path.exists")
|
|
@mock.patch("shutil.copy")
|
|
def test_copy_driver(p, q):
|
|
d = Driver("foo", "bar")
|
|
d.is_64bit = True
|
|
d.copy_driver()
|
|
|
|
q.assert_called_once_with("bin\\foo-x64.sys")
|
|
sysroot = os.path.expandvars("%SystemRoot%")
|
|
p.assert_called_once_with(
|
|
"bin\\foo-x64.sys", "%s\\sysnative\\drivers\\bar.sys" % sysroot
|
|
)
|