Windows NT DGPENSV2LPKMN 10.0 build 14393 (Windows Server 2016) AMD64
Apache/2.4.46 (Win64) OpenSSL/1.1.1h PHP/7.3.25
: 172.16.0.66 | : 172.16.0.254
Cant Read [ /etc/named.conf ]
7.3.25
SYSTEM
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
BLACK DEFEND!
README
+ Create Folder
+ Create File
[ A ]
[ C ]
[ D ]
C: /
laragon /
bin /
python /
python-3.10 /
Lib /
ctypes /
test /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxrwxrwx
__init__.py
461
B
-rw-rw-rw-
__main__.py
72
B
-rw-rw-rw-
test_anon.py
2.55
KB
-rw-rw-rw-
test_array_in_pointer.py
1.76
KB
-rw-rw-rw-
test_arrays.py
7.56
KB
-rw-rw-rw-
test_as_parameter.py
6.98
KB
-rw-rw-rw-
test_bitfields.py
10.4
KB
-rw-rw-rw-
test_buffers.py
2.62
KB
-rw-rw-rw-
test_bytes.py
2
KB
-rw-rw-rw-
test_byteswap.py
11.45
KB
-rw-rw-rw-
test_callbacks.py
10.64
KB
-rw-rw-rw-
test_cast.py
3.74
KB
-rw-rw-rw-
test_cfuncs.py
7.71
KB
-rw-rw-rw-
test_checkretval.py
1004
B
-rw-rw-rw-
test_delattr.py
554
B
-rw-rw-rw-
test_errno.py
2.19
KB
-rw-rw-rw-
test_find.py
4.48
KB
-rw-rw-rw-
test_frombuffer.py
5.23
KB
-rw-rw-rw-
test_funcptr.py
4.06
KB
-rw-rw-rw-
test_functions.py
12.59
KB
-rw-rw-rw-
test_incomplete.py
1.04
KB
-rw-rw-rw-
test_init.py
1.05
KB
-rw-rw-rw-
test_internals.py
2.67
KB
-rw-rw-rw-
test_keeprefs.py
4.11
KB
-rw-rw-rw-
test_libc.py
1.01
KB
-rw-rw-rw-
test_loading.py
7.15
KB
-rw-rw-rw-
test_macholib.py
2.14
KB
-rw-rw-rw-
test_memfunctions.py
3.29
KB
-rw-rw-rw-
test_numbers.py
9.54
KB
-rw-rw-rw-
test_objects.py
1.7
KB
-rw-rw-rw-
test_parameters.py
9.59
KB
-rw-rw-rw-
test_pep3118.py
8.54
KB
-rw-rw-rw-
test_pickling.py
2.25
KB
-rw-rw-rw-
test_pointers.py
7.29
KB
-rw-rw-rw-
test_prototypes.py
6.9
KB
-rw-rw-rw-
test_python_api.py
2.79
KB
-rw-rw-rw-
test_random_things.py
2.84
KB
-rw-rw-rw-
test_refcounts.py
2.61
KB
-rw-rw-rw-
test_repr.py
871
B
-rw-rw-rw-
test_returnfuncptrs.py
2.89
KB
-rw-rw-rw-
test_simplesubclasses.py
1.31
KB
-rw-rw-rw-
test_sizes.py
837
B
-rw-rw-rw-
test_slicing.py
6.05
KB
-rw-rw-rw-
test_stringptr.py
2.61
KB
-rw-rw-rw-
test_strings.py
7.36
KB
-rw-rw-rw-
test_struct_fields.py
2.64
KB
-rw-rw-rw-
test_structures.py
27.58
KB
-rw-rw-rw-
test_unaligned_structures.py
1.16
KB
-rw-rw-rw-
test_unicode.py
2.01
KB
-rw-rw-rw-
test_values.py
3.88
KB
-rw-rw-rw-
test_varsize_struct.py
1.85
KB
-rw-rw-rw-
test_win32.py
5.04
KB
-rw-rw-rw-
test_wintypes.py
1.41
KB
-rw-rw-rw-
Delete
Unzip
Zip
${this.title}
Close
Code Editor : test_funcptr.py
import unittest from ctypes import * try: WINFUNCTYPE except NameError: # fake to enable this test on Linux WINFUNCTYPE = CFUNCTYPE import _ctypes_test lib = CDLL(_ctypes_test.__file__) class CFuncPtrTestCase(unittest.TestCase): def test_basic(self): X = WINFUNCTYPE(c_int, c_int, c_int) def func(*args): return len(args) x = X(func) self.assertEqual(x.restype, c_int) self.assertEqual(x.argtypes, (c_int, c_int)) self.assertEqual(sizeof(x), sizeof(c_voidp)) self.assertEqual(sizeof(X), sizeof(c_voidp)) def test_first(self): StdCallback = WINFUNCTYPE(c_int, c_int, c_int) CdeclCallback = CFUNCTYPE(c_int, c_int, c_int) def func(a, b): return a + b s = StdCallback(func) c = CdeclCallback(func) self.assertEqual(s(1, 2), 3) self.assertEqual(c(1, 2), 3) # The following no longer raises a TypeError - it is now # possible, as in C, to call cdecl functions with more parameters. #self.assertRaises(TypeError, c, 1, 2, 3) self.assertEqual(c(1, 2, 3, 4, 5, 6), 3) if not WINFUNCTYPE is CFUNCTYPE: self.assertRaises(TypeError, s, 1, 2, 3) def test_structures(self): WNDPROC = WINFUNCTYPE(c_long, c_int, c_int, c_int, c_int) def wndproc(hwnd, msg, wParam, lParam): return hwnd + msg + wParam + lParam HINSTANCE = c_int HICON = c_int HCURSOR = c_int LPCTSTR = c_char_p class WNDCLASS(Structure): _fields_ = [("style", c_uint), ("lpfnWndProc", WNDPROC), ("cbClsExtra", c_int), ("cbWndExtra", c_int), ("hInstance", HINSTANCE), ("hIcon", HICON), ("hCursor", HCURSOR), ("lpszMenuName", LPCTSTR), ("lpszClassName", LPCTSTR)] wndclass = WNDCLASS() wndclass.lpfnWndProc = WNDPROC(wndproc) WNDPROC_2 = WINFUNCTYPE(c_long, c_int, c_int, c_int, c_int) # This is no longer true, now that WINFUNCTYPE caches created types internally. ## # CFuncPtr subclasses are compared by identity, so this raises a TypeError: ## self.assertRaises(TypeError, setattr, wndclass, ## "lpfnWndProc", WNDPROC_2(wndproc)) # instead: self.assertIs(WNDPROC, WNDPROC_2) # 'wndclass.lpfnWndProc' leaks 94 references. Why? self.assertEqual(wndclass.lpfnWndProc(1, 2, 3, 4), 10) f = wndclass.lpfnWndProc del wndclass del wndproc self.assertEqual(f(10, 11, 12, 13), 46) def test_dllfunctions(self): def NoNullHandle(value): if not value: raise WinError() return value strchr = lib.my_strchr strchr.restype = c_char_p strchr.argtypes = (c_char_p, c_char) self.assertEqual(strchr(b"abcdefghi", b"b"), b"bcdefghi") self.assertEqual(strchr(b"abcdefghi", b"x"), None) strtok = lib.my_strtok strtok.restype = c_char_p # Neither of this does work: strtok changes the buffer it is passed ## strtok.argtypes = (c_char_p, c_char_p) ## strtok.argtypes = (c_string, c_char_p) def c_string(init): size = len(init) + 1 return (c_char*size)(*init) s = b"a\nb\nc" b = c_string(s) ## b = (c_char * (len(s)+1))() ## b.value = s ## b = c_string(s) self.assertEqual(strtok(b, b"\n"), b"a") self.assertEqual(strtok(None, b"\n"), b"b") self.assertEqual(strtok(None, b"\n"), b"c") self.assertEqual(strtok(None, b"\n"), None) def test_abstract(self): from ctypes import _CFuncPtr self.assertRaises(TypeError, _CFuncPtr, 13, "name", 42, "iid") if __name__ == '__main__': unittest.main()
Close