Linux server1.dn-server.com 4.18.0-553.89.1.lve.el8.x86_64 #1 SMP Wed Dec 10 13:58:50 UTC 2025 x86_64
LiteSpeed
Server IP : 195.201.204.189 & Your IP : 216.73.216.198
Domains :
Cant Read [ /etc/named.conf ]
User : beriska1
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib64 /
python2.7 /
ctypes /
test /
Delete
Unzip
Name
Size
Permission
Date
Action
__init__.py
7.16
KB
-rw-r--r--
2024-04-10 08:28
__init__.pyc
7.85
KB
-rw-r--r--
2024-04-10 08:28
__init__.pyo
7.85
KB
-rw-r--r--
2024-04-10 08:28
runtests.py
682
B
-rw-r--r--
2024-04-10 08:28
runtests.pyc
895
B
-rw-r--r--
2024-04-10 08:28
runtests.pyo
895
B
-rw-r--r--
2024-04-10 08:28
test_anon.py
2.49
KB
-rw-r--r--
2024-04-10 08:28
test_anon.pyc
3.55
KB
-rw-r--r--
2024-04-10 08:28
test_anon.pyo
3.55
KB
-rw-r--r--
2024-04-10 08:28
test_array_in_pointer.py
1.69
KB
-rw-r--r--
2024-04-10 08:28
test_array_in_pointer.pyc
2.21
KB
-rw-r--r--
2024-04-10 08:28
test_array_in_pointer.pyo
2.21
KB
-rw-r--r--
2024-04-10 08:28
test_arrays.py
5.19
KB
-rw-r--r--
2024-04-10 08:28
test_arrays.pyc
5.88
KB
-rw-r--r--
2024-04-10 08:28
test_arrays.pyo
5.88
KB
-rw-r--r--
2024-04-10 08:28
test_as_parameter.py
6.62
KB
-rw-r--r--
2024-04-10 08:28
test_as_parameter.pyc
8.73
KB
-rw-r--r--
2024-04-10 08:28
test_as_parameter.pyo
8.73
KB
-rw-r--r--
2024-04-10 08:28
test_bitfields.py
9.85
KB
-rw-r--r--
2024-04-10 08:28
test_bitfields.pyc
13.87
KB
-rw-r--r--
2024-04-10 08:28
test_bitfields.pyo
13.87
KB
-rw-r--r--
2024-04-10 08:28
test_buffers.py
2.56
KB
-rw-r--r--
2024-04-10 08:28
test_buffers.pyc
3.24
KB
-rw-r--r--
2024-04-10 08:28
test_buffers.pyo
3.24
KB
-rw-r--r--
2024-04-10 08:28
test_byteswap.py
10.57
KB
-rw-r--r--
2024-04-10 08:28
test_byteswap.pyc
9.56
KB
-rw-r--r--
2024-04-10 08:28
test_byteswap.pyo
9.56
KB
-rw-r--r--
2024-04-10 08:28
test_callbacks.py
9.65
KB
-rw-r--r--
2024-04-10 08:28
test_callbacks.pyc
12.6
KB
-rw-r--r--
2024-04-10 08:28
test_callbacks.pyo
12.6
KB
-rw-r--r--
2024-04-10 08:28
test_cast.py
3.1
KB
-rw-r--r--
2024-04-10 08:28
test_cast.pyc
3.58
KB
-rw-r--r--
2024-04-10 08:28
test_cast.pyo
3.58
KB
-rw-r--r--
2024-04-10 08:28
test_cfuncs.py
7.5
KB
-rw-r--r--
2024-04-10 08:28
test_cfuncs.pyc
10.67
KB
-rw-r--r--
2024-04-10 08:28
test_cfuncs.pyo
10.67
KB
-rw-r--r--
2024-04-10 08:28
test_checkretval.py
973
B
-rw-r--r--
2024-04-10 08:28
test_checkretval.pyc
1.66
KB
-rw-r--r--
2024-04-10 08:28
test_checkretval.pyo
1.66
KB
-rw-r--r--
2024-04-10 08:28
test_delattr.py
533
B
-rw-r--r--
2024-04-10 08:28
test_delattr.pyc
1.33
KB
-rw-r--r--
2024-04-10 08:28
test_delattr.pyo
1.33
KB
-rw-r--r--
2024-04-10 08:28
test_errno.py
2.28
KB
-rw-r--r--
2024-04-10 08:28
test_errno.pyc
2.84
KB
-rw-r--r--
2024-04-10 08:28
test_errno.pyo
2.84
KB
-rw-r--r--
2024-04-10 08:28
test_find.py
2.07
KB
-rw-r--r--
2024-04-10 08:28
test_find.pyc
2.79
KB
-rw-r--r--
2024-04-10 08:28
test_find.pyo
2.79
KB
-rw-r--r--
2024-04-10 08:28
test_frombuffer.py
3.35
KB
-rw-r--r--
2024-04-10 08:28
test_frombuffer.pyc
4.17
KB
-rw-r--r--
2024-04-10 08:28
test_frombuffer.pyo
4.17
KB
-rw-r--r--
2024-04-10 08:28
test_funcptr.py
3.94
KB
-rw-r--r--
2024-04-10 08:28
test_funcptr.pyc
4.27
KB
-rw-r--r--
2024-04-10 08:28
test_funcptr.pyo
4.27
KB
-rw-r--r--
2024-04-10 08:28
test_functions.py
12.27
KB
-rw-r--r--
2024-04-10 08:28
test_functions.pyc
14.72
KB
-rw-r--r--
2024-04-10 08:28
test_functions.pyo
14.72
KB
-rw-r--r--
2024-04-10 08:28
test_incomplete.py
1019
B
-rw-r--r--
2024-04-10 08:28
test_incomplete.pyc
1.33
KB
-rw-r--r--
2024-04-10 08:28
test_incomplete.pyo
1.33
KB
-rw-r--r--
2024-04-10 08:28
test_init.py
1.02
KB
-rw-r--r--
2024-04-10 08:28
test_init.pyc
1.79
KB
-rw-r--r--
2024-04-10 08:28
test_init.pyo
1.79
KB
-rw-r--r--
2024-04-10 08:28
test_internals.py
2.56
KB
-rw-r--r--
2024-04-10 08:28
test_internals.pyc
4.03
KB
-rw-r--r--
2024-04-10 08:28
test_internals.pyo
4.03
KB
-rw-r--r--
2024-04-10 08:28
test_keeprefs.py
3.95
KB
-rw-r--r--
2024-04-10 08:28
test_keeprefs.pyc
6.57
KB
-rw-r--r--
2024-04-10 08:28
test_keeprefs.pyo
6.57
KB
-rw-r--r--
2024-04-10 08:28
test_libc.py
881
B
-rw-r--r--
2024-04-10 08:28
test_libc.pyc
1.6
KB
-rw-r--r--
2024-04-10 08:28
test_libc.pyo
1.6
KB
-rw-r--r--
2024-04-10 08:28
test_loading.py
4.56
KB
-rw-r--r--
2024-04-10 08:28
test_loading.pyc
4.46
KB
-rw-r--r--
2024-04-10 08:28
test_loading.pyo
4.46
KB
-rw-r--r--
2024-04-10 08:28
test_macholib.py
1.76
KB
-rw-r--r--
2024-04-10 08:28
test_macholib.pyc
1.46
KB
-rw-r--r--
2024-04-10 08:28
test_macholib.pyo
1.46
KB
-rw-r--r--
2024-04-10 08:28
test_memfunctions.py
3.15
KB
-rw-r--r--
2024-04-10 08:28
test_memfunctions.pyc
3.68
KB
-rw-r--r--
2024-04-10 08:28
test_memfunctions.pyo
3.68
KB
-rw-r--r--
2024-04-10 08:28
test_numbers.py
9.05
KB
-rw-r--r--
2024-04-10 08:28
test_numbers.pyc
10.27
KB
-rw-r--r--
2024-04-10 08:28
test_numbers.pyo
10.27
KB
-rw-r--r--
2024-04-10 08:28
test_objects.py
1.63
KB
-rw-r--r--
2024-04-10 08:28
test_objects.pyc
2.15
KB
-rw-r--r--
2024-04-10 08:28
test_objects.pyo
2.15
KB
-rw-r--r--
2024-04-10 08:28
test_parameters.py
9.7
KB
-rw-r--r--
2024-04-10 08:28
test_parameters.pyc
11.38
KB
-rw-r--r--
2024-04-10 08:28
test_parameters.pyo
11.38
KB
-rw-r--r--
2024-04-10 08:28
test_pep3118.py
8.29
KB
-rw-r--r--
2024-04-10 08:28
test_pep3118.pyc
6.64
KB
-rw-r--r--
2024-04-10 08:28
test_pep3118.pyo
6.64
KB
-rw-r--r--
2024-04-10 08:28
test_pickling.py
2.17
KB
-rw-r--r--
2024-04-10 08:28
test_pickling.pyc
3.65
KB
-rw-r--r--
2024-04-10 08:28
test_pickling.pyo
3.65
KB
-rw-r--r--
2024-04-10 08:28
test_pointers.py
6.97
KB
-rw-r--r--
2024-04-10 08:28
test_pointers.pyc
7.49
KB
-rw-r--r--
2024-04-10 08:28
test_pointers.pyo
7.45
KB
-rw-r--r--
2024-04-10 08:28
test_prototypes.py
6.54
KB
-rw-r--r--
2024-04-10 08:28
test_prototypes.pyc
7.05
KB
-rw-r--r--
2024-04-10 08:28
test_prototypes.pyo
7.02
KB
-rw-r--r--
2024-04-10 08:28
test_python_api.py
2.89
KB
-rw-r--r--
2024-04-10 08:28
test_python_api.pyc
3.23
KB
-rw-r--r--
2024-04-10 08:28
test_python_api.pyo
3.23
KB
-rw-r--r--
2024-04-10 08:28
test_random_things.py
2.77
KB
-rw-r--r--
2024-04-10 08:28
test_random_things.pyc
3.21
KB
-rw-r--r--
2024-04-10 08:28
test_random_things.pyo
3.21
KB
-rw-r--r--
2024-04-10 08:28
test_refcounts.py
2.44
KB
-rw-r--r--
2024-04-10 08:28
test_refcounts.pyc
3.05
KB
-rw-r--r--
2024-04-10 08:28
test_refcounts.pyo
3.05
KB
-rw-r--r--
2024-04-10 08:28
test_repr.py
839
B
-rw-r--r--
2024-04-10 08:28
test_repr.pyc
1.71
KB
-rw-r--r--
2024-04-10 08:28
test_repr.pyo
1.71
KB
-rw-r--r--
2024-04-10 08:28
test_returnfuncptrs.py
2.71
KB
-rw-r--r--
2024-04-10 08:28
test_returnfuncptrs.pyc
2.82
KB
-rw-r--r--
2024-04-10 08:28
test_returnfuncptrs.pyo
2.82
KB
-rw-r--r--
2024-04-10 08:28
test_simplesubclasses.py
1.32
KB
-rw-r--r--
2024-04-10 08:28
test_simplesubclasses.pyc
2.83
KB
-rw-r--r--
2024-04-10 08:28
test_simplesubclasses.pyo
2.83
KB
-rw-r--r--
2024-04-10 08:28
test_sizes.py
815
B
-rw-r--r--
2024-04-10 08:28
test_sizes.pyc
1.82
KB
-rw-r--r--
2024-04-10 08:28
test_sizes.pyo
1.82
KB
-rw-r--r--
2024-04-10 08:28
test_slicing.py
6.3
KB
-rw-r--r--
2024-04-10 08:28
test_slicing.pyc
6.36
KB
-rw-r--r--
2024-04-10 08:28
test_slicing.pyo
6.36
KB
-rw-r--r--
2024-04-10 08:28
test_stringptr.py
2.4
KB
-rw-r--r--
2024-04-10 08:28
test_stringptr.pyc
2.62
KB
-rw-r--r--
2024-04-10 08:28
test_stringptr.pyo
2.62
KB
-rw-r--r--
2024-04-10 08:28
test_strings.py
7.18
KB
-rw-r--r--
2024-04-10 08:28
test_strings.pyc
7.63
KB
-rw-r--r--
2024-04-10 08:28
test_strings.pyo
7.63
KB
-rw-r--r--
2024-04-10 08:28
test_struct_fields.py
2.36
KB
-rw-r--r--
2024-04-10 08:28
test_struct_fields.pyc
4.28
KB
-rw-r--r--
2024-04-10 08:28
test_struct_fields.pyo
4.28
KB
-rw-r--r--
2024-04-10 08:28
test_structures.py
16.52
KB
-rw-r--r--
2024-04-10 08:28
test_structures.pyc
23.23
KB
-rw-r--r--
2024-04-10 08:28
test_structures.pyo
23.23
KB
-rw-r--r--
2024-04-10 08:28
test_unaligned_structures.py
1.19
KB
-rw-r--r--
2024-04-10 08:28
test_unaligned_structures.pyc
2.03
KB
-rw-r--r--
2024-04-10 08:28
test_unaligned_structures.pyo
2.03
KB
-rw-r--r--
2024-04-10 08:28
test_unicode.py
5
KB
-rw-r--r--
2024-04-10 08:28
test_unicode.pyc
6.04
KB
-rw-r--r--
2024-04-10 08:28
test_unicode.pyo
6.04
KB
-rw-r--r--
2024-04-10 08:28
test_values.py
2.86
KB
-rw-r--r--
2024-04-10 08:28
test_values.pyc
2.89
KB
-rw-r--r--
2024-04-10 08:28
test_values.pyo
2.95
KB
-rw-r--r--
2024-04-10 08:28
test_varsize_struct.py
1.8
KB
-rw-r--r--
2024-04-10 08:28
test_varsize_struct.pyc
2.36
KB
-rw-r--r--
2024-04-10 08:28
test_varsize_struct.pyo
2.36
KB
-rw-r--r--
2024-04-10 08:28
test_win32.py
5.02
KB
-rw-r--r--
2024-04-10 08:28
test_win32.pyc
6.06
KB
-rw-r--r--
2024-04-10 08:28
test_win32.pyo
6.06
KB
-rw-r--r--
2024-04-10 08:28
test_wintypes.py
1.43
KB
-rw-r--r--
2024-04-10 08:28
test_wintypes.pyc
1.6
KB
-rw-r--r--
2024-04-10 08:28
test_wintypes.pyo
1.6
KB
-rw-r--r--
2024-04-10 08:28
Save
Rename
from ctypes import * from ctypes.test import need_symbol import unittest import os import ctypes import _ctypes_test class BITS(Structure): _fields_ = [("A", c_int, 1), ("B", c_int, 2), ("C", c_int, 3), ("D", c_int, 4), ("E", c_int, 5), ("F", c_int, 6), ("G", c_int, 7), ("H", c_int, 8), ("I", c_int, 9), ("M", c_short, 1), ("N", c_short, 2), ("O", c_short, 3), ("P", c_short, 4), ("Q", c_short, 5), ("R", c_short, 6), ("S", c_short, 7)] func = CDLL(_ctypes_test.__file__).unpack_bitfields func.argtypes = POINTER(BITS), c_char ##for n in "ABCDEFGHIMNOPQRS": ## print n, hex(getattr(BITS, n).size), getattr(BITS, n).offset class C_Test(unittest.TestCase): def test_ints(self): for i in range(512): for name in "ABCDEFGHI": b = BITS() setattr(b, name, i) self.assertEqual((name, i, getattr(b, name)), (name, i, func(byref(b), name))) def test_shorts(self): for i in range(256): for name in "MNOPQRS": b = BITS() setattr(b, name, i) self.assertEqual((name, i, getattr(b, name)), (name, i, func(byref(b), name))) signed_int_types = (c_byte, c_short, c_int, c_long, c_longlong) unsigned_int_types = (c_ubyte, c_ushort, c_uint, c_ulong, c_ulonglong) int_types = unsigned_int_types + signed_int_types class BitFieldTest(unittest.TestCase): def test_longlong(self): class X(Structure): _fields_ = [("a", c_longlong, 1), ("b", c_longlong, 62), ("c", c_longlong, 1)] self.assertEqual(sizeof(X), sizeof(c_longlong)) x = X() x.a, x.b, x.c = -1, 7, -1 self.assertEqual((x.a, x.b, x.c), (-1, 7, -1)) def test_ulonglong(self): class X(Structure): _fields_ = [("a", c_ulonglong, 1), ("b", c_ulonglong, 62), ("c", c_ulonglong, 1)] self.assertEqual(sizeof(X), sizeof(c_longlong)) x = X() self.assertEqual((x.a, x.b, x.c), (0, 0, 0)) x.a, x.b, x.c = 7, 7, 7 self.assertEqual((x.a, x.b, x.c), (1, 7, 1)) def test_signed(self): for c_typ in signed_int_types: class X(Structure): _fields_ = [("dummy", c_typ), ("a", c_typ, 3), ("b", c_typ, 3), ("c", c_typ, 1)] self.assertEqual(sizeof(X), sizeof(c_typ)*2) x = X() self.assertEqual((c_typ, x.a, x.b, x.c), (c_typ, 0, 0, 0)) x.a = -1 self.assertEqual((c_typ, x.a, x.b, x.c), (c_typ, -1, 0, 0)) x.a, x.b = 0, -1 self.assertEqual((c_typ, x.a, x.b, x.c), (c_typ, 0, -1, 0)) def test_unsigned(self): for c_typ in unsigned_int_types: class X(Structure): _fields_ = [("a", c_typ, 3), ("b", c_typ, 3), ("c", c_typ, 1)] self.assertEqual(sizeof(X), sizeof(c_typ)) x = X() self.assertEqual((c_typ, x.a, x.b, x.c), (c_typ, 0, 0, 0)) x.a = -1 self.assertEqual((c_typ, x.a, x.b, x.c), (c_typ, 7, 0, 0)) x.a, x.b = 0, -1 self.assertEqual((c_typ, x.a, x.b, x.c), (c_typ, 0, 7, 0)) def fail_fields(self, *fields): return self.get_except(type(Structure), "X", (), {"_fields_": fields}) def test_nonint_types(self): # bit fields are not allowed on non-integer types. result = self.fail_fields(("a", c_char_p, 1)) self.assertEqual(result, (TypeError, 'bit fields not allowed for type c_char_p')) result = self.fail_fields(("a", c_void_p, 1)) self.assertEqual(result, (TypeError, 'bit fields not allowed for type c_void_p')) if c_int != c_long: result = self.fail_fields(("a", POINTER(c_int), 1)) self.assertEqual(result, (TypeError, 'bit fields not allowed for type LP_c_int')) result = self.fail_fields(("a", c_char, 1)) self.assertEqual(result, (TypeError, 'bit fields not allowed for type c_char')) class Dummy(Structure): _fields_ = [] result = self.fail_fields(("a", Dummy, 1)) self.assertEqual(result, (TypeError, 'bit fields not allowed for type Dummy')) @need_symbol('c_wchar') def test_c_wchar(self): result = self.fail_fields(("a", c_wchar, 1)) self.assertEqual(result, (TypeError, 'bit fields not allowed for type c_wchar')) def test_single_bitfield_size(self): for c_typ in int_types: result = self.fail_fields(("a", c_typ, -1)) self.assertEqual(result, (ValueError, 'number of bits invalid for bit field')) result = self.fail_fields(("a", c_typ, 0)) self.assertEqual(result, (ValueError, 'number of bits invalid for bit field')) class X(Structure): _fields_ = [("a", c_typ, 1)] self.assertEqual(sizeof(X), sizeof(c_typ)) class X(Structure): _fields_ = [("a", c_typ, sizeof(c_typ)*8)] self.assertEqual(sizeof(X), sizeof(c_typ)) result = self.fail_fields(("a", c_typ, sizeof(c_typ)*8 + 1)) self.assertEqual(result, (ValueError, 'number of bits invalid for bit field')) def test_multi_bitfields_size(self): class X(Structure): _fields_ = [("a", c_short, 1), ("b", c_short, 14), ("c", c_short, 1)] self.assertEqual(sizeof(X), sizeof(c_short)) class X(Structure): _fields_ = [("a", c_short, 1), ("a1", c_short), ("b", c_short, 14), ("c", c_short, 1)] self.assertEqual(sizeof(X), sizeof(c_short)*3) self.assertEqual(X.a.offset, 0) self.assertEqual(X.a1.offset, sizeof(c_short)) self.assertEqual(X.b.offset, sizeof(c_short)*2) self.assertEqual(X.c.offset, sizeof(c_short)*2) class X(Structure): _fields_ = [("a", c_short, 3), ("b", c_short, 14), ("c", c_short, 14)] self.assertEqual(sizeof(X), sizeof(c_short)*3) self.assertEqual(X.a.offset, sizeof(c_short)*0) self.assertEqual(X.b.offset, sizeof(c_short)*1) self.assertEqual(X.c.offset, sizeof(c_short)*2) def get_except(self, func, *args, **kw): try: func(*args, **kw) except Exception, detail: return detail.__class__, str(detail) def test_mixed_1(self): class X(Structure): _fields_ = [("a", c_byte, 4), ("b", c_int, 4)] if os.name in ("nt", "ce"): self.assertEqual(sizeof(X), sizeof(c_int)*2) else: self.assertEqual(sizeof(X), sizeof(c_int)) def test_mixed_2(self): class X(Structure): _fields_ = [("a", c_byte, 4), ("b", c_int, 32)] self.assertEqual(sizeof(X), alignment(c_int)+sizeof(c_int)) def test_mixed_3(self): class X(Structure): _fields_ = [("a", c_byte, 4), ("b", c_ubyte, 4)] self.assertEqual(sizeof(X), sizeof(c_byte)) def test_mixed_4(self): class X(Structure): _fields_ = [("a", c_short, 4), ("b", c_short, 4), ("c", c_int, 24), ("d", c_short, 4), ("e", c_short, 4), ("f", c_int, 24)] # MSVC does NOT combine c_short and c_int into one field, GCC # does (unless GCC is run with '-mms-bitfields' which # produces code compatible with MSVC). if os.name in ("nt", "ce"): self.assertEqual(sizeof(X), sizeof(c_int) * 4) else: self.assertEqual(sizeof(X), sizeof(c_int) * 2) def test_anon_bitfields(self): # anonymous bit-fields gave a strange error message class X(Structure): _fields_ = [("a", c_byte, 4), ("b", c_ubyte, 4)] class Y(Structure): _anonymous_ = ["_"] _fields_ = [("_", X)] @need_symbol('c_uint32') def test_uint32(self): class X(Structure): _fields_ = [("a", c_uint32, 32)] x = X() x.a = 10 self.assertEqual(x.a, 10) x.a = 0xFDCBA987 self.assertEqual(x.a, 0xFDCBA987) @need_symbol('c_uint64') def test_uint64(self): class X(Structure): _fields_ = [("a", c_uint64, 64)] x = X() x.a = 10 self.assertEqual(x.a, 10) x.a = 0xFEDCBA9876543211 self.assertEqual(x.a, 0xFEDCBA9876543211) @need_symbol('c_uint32') def test_uint32_swap_little_endian(self): # Issue #23319 class Little(LittleEndianStructure): _fields_ = [("a", c_uint32, 24), ("b", c_uint32, 4), ("c", c_uint32, 4)] b = bytearray(4) x = Little.from_buffer(b) x.a = 0xabcdef x.b = 1 x.c = 2 self.assertEqual(b, b'\xef\xcd\xab\x21') @need_symbol('c_uint32') def test_uint32_swap_big_endian(self): # Issue #23319 class Big(BigEndianStructure): _fields_ = [("a", c_uint32, 24), ("b", c_uint32, 4), ("c", c_uint32, 4)] b = bytearray(4) x = Big.from_buffer(b) x.a = 0xabcdef x.b = 1 x.c = 2 self.assertEqual(b, b'\xab\xcd\xef\x12') if __name__ == "__main__": unittest.main()