Linux ip-148-66-134-25.ip.secureserver.net 3.10.0-1160.119.1.el7.tuxcare.els10.x86_64 #1 SMP Fri Oct 11 21:40:41 UTC 2024 x86_64
Apache
: 148.66.134.25 | : 3.144.48.72
66 Domain
8.0.30
amvm
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
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
opt /
python35 /
lib /
python3.5 /
ctypes /
test /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
__init__.py
399
B
-rw-r--r--
__main__.py
68
B
-rw-r--r--
test_anon.py
2
KB
-rw-r--r--
test_array_in_pointer.py
1.7
KB
-rw-r--r--
test_arrays.py
5.64
KB
-rw-r--r--
test_as_parameter.py
6.61
KB
-rw-r--r--
test_bitfields.py
9.84
KB
-rw-r--r--
test_buffers.py
2.23
KB
-rw-r--r--
test_bytes.py
1.88
KB
-rw-r--r--
test_byteswap.py
11.14
KB
-rw-r--r--
test_callbacks.py
9.31
KB
-rw-r--r--
test_cast.py
3.11
KB
-rw-r--r--
test_cfuncs.py
7.5
KB
-rw-r--r--
test_checkretval.py
968
B
-rw-r--r--
test_delattr.py
533
B
-rw-r--r--
test_errno.py
2.25
KB
-rw-r--r--
test_find.py
2.1
KB
-rw-r--r--
test_frombuffer.py
4.59
KB
-rw-r--r--
test_funcptr.py
3.82
KB
-rw-r--r--
test_functions.py
12.26
KB
-rw-r--r--
test_incomplete.py
1023
B
-rw-r--r--
test_init.py
1.01
KB
-rw-r--r--
test_internals.py
2.57
KB
-rw-r--r--
test_keeprefs.py
3.96
KB
-rw-r--r--
test_libc.py
1005
B
-rw-r--r--
test_loading.py
4.52
KB
-rw-r--r--
test_macholib.py
1.79
KB
-rw-r--r--
test_memfunctions.py
3.22
KB
-rw-r--r--
test_numbers.py
9.07
KB
-rw-r--r--
test_objects.py
1.64
KB
-rw-r--r--
test_parameters.py
6.05
KB
-rw-r--r--
test_pep3118.py
7.65
KB
-rw-r--r--
test_pickling.py
2.17
KB
-rw-r--r--
test_pointers.py
6.95
KB
-rw-r--r--
test_prototypes.py
6.68
KB
-rw-r--r--
test_python_api.py
2.8
KB
-rw-r--r--
test_random_things.py
2.76
KB
-rw-r--r--
test_refcounts.py
2.52
KB
-rw-r--r--
test_repr.py
842
B
-rw-r--r--
test_returnfuncptrs.py
2.83
KB
-rw-r--r--
test_simplesubclasses.py
1.26
KB
-rw-r--r--
test_sizes.py
815
B
-rw-r--r--
test_slicing.py
5.88
KB
-rw-r--r--
test_stringptr.py
2.48
KB
-rw-r--r--
test_strings.py
6.97
KB
-rw-r--r--
test_struct_fields.py
1.47
KB
-rw-r--r--
test_structures.py
16.24
KB
-rw-r--r--
test_unaligned_structures.py
1.19
KB
-rw-r--r--
test_unicode.py
1.72
KB
-rw-r--r--
test_values.py
3.75
KB
-rw-r--r--
test_varsize_struct.py
1.8
KB
-rw-r--r--
test_win32.py
5.16
KB
-rw-r--r--
test_wintypes.py
1.43
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : test_cfuncs.py
# A lot of failures in these tests on Mac OS X. # Byte order related? import unittest from ctypes import * from ctypes.test import need_symbol import _ctypes_test class CFunctions(unittest.TestCase): _dll = CDLL(_ctypes_test.__file__) def S(self): return c_longlong.in_dll(self._dll, "last_tf_arg_s").value def U(self): return c_ulonglong.in_dll(self._dll, "last_tf_arg_u").value def test_byte(self): self._dll.tf_b.restype = c_byte self._dll.tf_b.argtypes = (c_byte,) self.assertEqual(self._dll.tf_b(-126), -42) self.assertEqual(self.S(), -126) def test_byte_plus(self): self._dll.tf_bb.restype = c_byte self._dll.tf_bb.argtypes = (c_byte, c_byte) self.assertEqual(self._dll.tf_bb(0, -126), -42) self.assertEqual(self.S(), -126) def test_ubyte(self): self._dll.tf_B.restype = c_ubyte self._dll.tf_B.argtypes = (c_ubyte,) self.assertEqual(self._dll.tf_B(255), 85) self.assertEqual(self.U(), 255) def test_ubyte_plus(self): self._dll.tf_bB.restype = c_ubyte self._dll.tf_bB.argtypes = (c_byte, c_ubyte) self.assertEqual(self._dll.tf_bB(0, 255), 85) self.assertEqual(self.U(), 255) def test_short(self): self._dll.tf_h.restype = c_short self._dll.tf_h.argtypes = (c_short,) self.assertEqual(self._dll.tf_h(-32766), -10922) self.assertEqual(self.S(), -32766) def test_short_plus(self): self._dll.tf_bh.restype = c_short self._dll.tf_bh.argtypes = (c_byte, c_short) self.assertEqual(self._dll.tf_bh(0, -32766), -10922) self.assertEqual(self.S(), -32766) def test_ushort(self): self._dll.tf_H.restype = c_ushort self._dll.tf_H.argtypes = (c_ushort,) self.assertEqual(self._dll.tf_H(65535), 21845) self.assertEqual(self.U(), 65535) def test_ushort_plus(self): self._dll.tf_bH.restype = c_ushort self._dll.tf_bH.argtypes = (c_byte, c_ushort) self.assertEqual(self._dll.tf_bH(0, 65535), 21845) self.assertEqual(self.U(), 65535) def test_int(self): self._dll.tf_i.restype = c_int self._dll.tf_i.argtypes = (c_int,) self.assertEqual(self._dll.tf_i(-2147483646), -715827882) self.assertEqual(self.S(), -2147483646) def test_int_plus(self): self._dll.tf_bi.restype = c_int self._dll.tf_bi.argtypes = (c_byte, c_int) self.assertEqual(self._dll.tf_bi(0, -2147483646), -715827882) self.assertEqual(self.S(), -2147483646) def test_uint(self): self._dll.tf_I.restype = c_uint self._dll.tf_I.argtypes = (c_uint,) self.assertEqual(self._dll.tf_I(4294967295), 1431655765) self.assertEqual(self.U(), 4294967295) def test_uint_plus(self): self._dll.tf_bI.restype = c_uint self._dll.tf_bI.argtypes = (c_byte, c_uint) self.assertEqual(self._dll.tf_bI(0, 4294967295), 1431655765) self.assertEqual(self.U(), 4294967295) def test_long(self): self._dll.tf_l.restype = c_long self._dll.tf_l.argtypes = (c_long,) self.assertEqual(self._dll.tf_l(-2147483646), -715827882) self.assertEqual(self.S(), -2147483646) def test_long_plus(self): self._dll.tf_bl.restype = c_long self._dll.tf_bl.argtypes = (c_byte, c_long) self.assertEqual(self._dll.tf_bl(0, -2147483646), -715827882) self.assertEqual(self.S(), -2147483646) def test_ulong(self): self._dll.tf_L.restype = c_ulong self._dll.tf_L.argtypes = (c_ulong,) self.assertEqual(self._dll.tf_L(4294967295), 1431655765) self.assertEqual(self.U(), 4294967295) def test_ulong_plus(self): self._dll.tf_bL.restype = c_ulong self._dll.tf_bL.argtypes = (c_char, c_ulong) self.assertEqual(self._dll.tf_bL(b' ', 4294967295), 1431655765) self.assertEqual(self.U(), 4294967295) def test_longlong(self): self._dll.tf_q.restype = c_longlong self._dll.tf_q.argtypes = (c_longlong, ) self.assertEqual(self._dll.tf_q(-9223372036854775806), -3074457345618258602) self.assertEqual(self.S(), -9223372036854775806) def test_longlong_plus(self): self._dll.tf_bq.restype = c_longlong self._dll.tf_bq.argtypes = (c_byte, c_longlong) self.assertEqual(self._dll.tf_bq(0, -9223372036854775806), -3074457345618258602) self.assertEqual(self.S(), -9223372036854775806) def test_ulonglong(self): self._dll.tf_Q.restype = c_ulonglong self._dll.tf_Q.argtypes = (c_ulonglong, ) self.assertEqual(self._dll.tf_Q(18446744073709551615), 6148914691236517205) self.assertEqual(self.U(), 18446744073709551615) def test_ulonglong_plus(self): self._dll.tf_bQ.restype = c_ulonglong self._dll.tf_bQ.argtypes = (c_byte, c_ulonglong) self.assertEqual(self._dll.tf_bQ(0, 18446744073709551615), 6148914691236517205) self.assertEqual(self.U(), 18446744073709551615) def test_float(self): self._dll.tf_f.restype = c_float self._dll.tf_f.argtypes = (c_float,) self.assertEqual(self._dll.tf_f(-42.), -14.) self.assertEqual(self.S(), -42) def test_float_plus(self): self._dll.tf_bf.restype = c_float self._dll.tf_bf.argtypes = (c_byte, c_float) self.assertEqual(self._dll.tf_bf(0, -42.), -14.) self.assertEqual(self.S(), -42) def test_double(self): self._dll.tf_d.restype = c_double self._dll.tf_d.argtypes = (c_double,) self.assertEqual(self._dll.tf_d(42.), 14.) self.assertEqual(self.S(), 42) def test_double_plus(self): self._dll.tf_bd.restype = c_double self._dll.tf_bd.argtypes = (c_byte, c_double) self.assertEqual(self._dll.tf_bd(0, 42.), 14.) self.assertEqual(self.S(), 42) def test_longdouble(self): self._dll.tf_D.restype = c_longdouble self._dll.tf_D.argtypes = (c_longdouble,) self.assertEqual(self._dll.tf_D(42.), 14.) self.assertEqual(self.S(), 42) def test_longdouble_plus(self): self._dll.tf_bD.restype = c_longdouble self._dll.tf_bD.argtypes = (c_byte, c_longdouble) self.assertEqual(self._dll.tf_bD(0, 42.), 14.) self.assertEqual(self.S(), 42) def test_callwithresult(self): def process_result(result): return result * 2 self._dll.tf_i.restype = process_result self._dll.tf_i.argtypes = (c_int,) self.assertEqual(self._dll.tf_i(42), 28) self.assertEqual(self.S(), 42) self.assertEqual(self._dll.tf_i(-42), -28) self.assertEqual(self.S(), -42) def test_void(self): self._dll.tv_i.restype = None self._dll.tv_i.argtypes = (c_int,) self.assertEqual(self._dll.tv_i(42), None) self.assertEqual(self.S(), 42) self.assertEqual(self._dll.tv_i(-42), None) self.assertEqual(self.S(), -42) # The following repeats the above tests with stdcall functions (where # they are available) try: WinDLL except NameError: def stdcall_dll(*_): pass else: class stdcall_dll(WinDLL): def __getattr__(self, name): if name[:2] == '__' and name[-2:] == '__': raise AttributeError(name) func = self._FuncPtr(("s_" + name, self)) setattr(self, name, func) return func @need_symbol('WinDLL') class stdcallCFunctions(CFunctions): _dll = stdcall_dll(_ctypes_test.__file__) if __name__ == '__main__': unittest.main()
Close