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
import unittest from ctypes import * import re, sys if sys.byteorder == "little": THIS_ENDIAN = "<" OTHER_ENDIAN = ">" else: THIS_ENDIAN = ">" OTHER_ENDIAN = "<" def normalize(format): # Remove current endian specifier and white space from a format # string if format is None: return "" format = format.replace(OTHER_ENDIAN, THIS_ENDIAN) return re.sub(r"\s", "", format) class Test(unittest.TestCase): def test_native_types(self): for tp, fmt, shape, itemtp in native_types: ob = tp() v = memoryview(ob) try: self.assertEqual(normalize(v.format), normalize(fmt)) if shape is not None: self.assertEqual(len(v), shape[0]) else: self.assertEqual(len(v) * sizeof(itemtp), sizeof(ob)) self.assertEqual(v.itemsize, sizeof(itemtp)) self.assertEqual(v.shape, shape) # ctypes object always have a non-strided memory block self.assertEqual(v.strides, None) # they are always read/write self.assertFalse(v.readonly) if v.shape: n = 1 for dim in v.shape: n = n * dim self.assertEqual(n * v.itemsize, len(v.tobytes())) except: # so that we can see the failing type print(tp) raise def test_endian_types(self): for tp, fmt, shape, itemtp in endian_types: ob = tp() v = memoryview(ob) try: self.assertEqual(v.format, fmt) if shape is not None: self.assertEqual(len(v), shape[0]) else: self.assertEqual(len(v) * sizeof(itemtp), sizeof(ob)) self.assertEqual(v.itemsize, sizeof(itemtp)) self.assertEqual(v.shape, shape) # ctypes object always have a non-strided memory block self.assertEqual(v.strides, None) # they are always read/write self.assertFalse(v.readonly) if v.shape: n = 1 for dim in v.shape: n = n * dim self.assertEqual(n, len(v)) except: # so that we can see the failing type print(tp) raise # define some structure classes class Point(Structure): _fields_ = [("x", c_long), ("y", c_long)] class PackedPoint(Structure): _pack_ = 2 _fields_ = [("x", c_long), ("y", c_long)] class Point2(Structure): pass Point2._fields_ = [("x", c_long), ("y", c_long)] class EmptyStruct(Structure): _fields_ = [] class aUnion(Union): _fields_ = [("a", c_int)] class StructWithArrays(Structure): _fields_ = [("x", c_long * 3 * 2), ("y", Point * 4)] class Incomplete(Structure): pass class Complete(Structure): pass PComplete = POINTER(Complete) Complete._fields_ = [("a", c_long)] ################################################################ # # This table contains format strings as they look on little endian # machines. The test replaces '<' with '>' on big endian machines. # # Platform-specific type codes s_bool = {1: '?', 2: 'H', 4: 'L', 8: 'Q'}[sizeof(c_bool)] s_short = {2: 'h', 4: 'l', 8: 'q'}[sizeof(c_short)] s_ushort = {2: 'H', 4: 'L', 8: 'Q'}[sizeof(c_ushort)] s_int = {2: 'h', 4: 'i', 8: 'q'}[sizeof(c_int)] s_uint = {2: 'H', 4: 'I', 8: 'Q'}[sizeof(c_uint)] s_long = {4: 'l', 8: 'q'}[sizeof(c_long)] s_ulong = {4: 'L', 8: 'Q'}[sizeof(c_ulong)] s_longlong = "q" s_ulonglong = "Q" s_float = "f" s_double = "d" s_longdouble = "g" # Alias definitions in ctypes/__init__.py if c_int is c_long: s_int = s_long if c_uint is c_ulong: s_uint = s_ulong if c_longlong is c_long: s_longlong = s_long if c_ulonglong is c_ulong: s_ulonglong = s_ulong if c_longdouble is c_double: s_longdouble = s_double native_types = [ # type format shape calc itemsize ## simple types (c_char, "<c", None, c_char), (c_byte, "<b", None, c_byte), (c_ubyte, "<B", None, c_ubyte), (c_short, "<" + s_short, None, c_short), (c_ushort, "<" + s_ushort, None, c_ushort), (c_int, "<" + s_int, None, c_int), (c_uint, "<" + s_uint, None, c_uint), (c_long, "<" + s_long, None, c_long), (c_ulong, "<" + s_ulong, None, c_ulong), (c_longlong, "<" + s_longlong, None, c_longlong), (c_ulonglong, "<" + s_ulonglong, None, c_ulonglong), (c_float, "<f", None, c_float), (c_double, "<d", None, c_double), (c_longdouble, "<" + s_longdouble, None, c_longdouble), (c_bool, "<" + s_bool, None, c_bool), (py_object, "<O", None, py_object), ## pointers (POINTER(c_byte), "&<b", None, POINTER(c_byte)), (POINTER(POINTER(c_long)), "&&<" + s_long, None, POINTER(POINTER(c_long))), ## arrays and pointers (c_double * 4, "<d", (4,), c_double), (c_float * 4 * 3 * 2, "<f", (2,3,4), c_float), (POINTER(c_short) * 2, "&<" + s_short, (2,), POINTER(c_short)), (POINTER(c_short) * 2 * 3, "&<" + s_short, (3,2,), POINTER(c_short)), (POINTER(c_short * 2), "&(2)<" + s_short, None, POINTER(c_short)), ## structures and unions (Point, "T{<l:x:<l:y:}".replace('l', s_long), None, Point), # packed structures do not implement the pep (PackedPoint, "B", None, PackedPoint), (Point2, "T{<l:x:<l:y:}".replace('l', s_long), None, Point2), (EmptyStruct, "T{}", None, EmptyStruct), # the pep does't support unions (aUnion, "B", None, aUnion), # structure with sub-arrays (StructWithArrays, "T{(2,3)<l:x:(4)T{<l:x:<l:y:}:y:}".replace('l', s_long), None, StructWithArrays), (StructWithArrays * 3, "T{(2,3)<l:x:(4)T{<l:x:<l:y:}:y:}".replace('l', s_long), (3,), StructWithArrays), ## pointer to incomplete structure (Incomplete, "B", None, Incomplete), (POINTER(Incomplete), "&B", None, POINTER(Incomplete)), # 'Complete' is a structure that starts incomplete, but is completed after the # pointer type to it has been created. (Complete, "T{<l:a:}".replace('l', s_long), None, Complete), # Unfortunately the pointer format string is not fixed... (POINTER(Complete), "&B", None, POINTER(Complete)), ## other # function signatures are not implemented (CFUNCTYPE(None), "X{}", None, CFUNCTYPE(None)), ] class BEPoint(BigEndianStructure): _fields_ = [("x", c_long), ("y", c_long)] class LEPoint(LittleEndianStructure): _fields_ = [("x", c_long), ("y", c_long)] ################################################################ # # This table contains format strings as they really look, on both big # and little endian machines. # endian_types = [ (BEPoint, "T{>l:x:>l:y:}".replace('l', s_long), None, BEPoint), (LEPoint, "T{<l:x:<l:y:}".replace('l', s_long), None, LEPoint), (POINTER(BEPoint), "&T{>l:x:>l:y:}".replace('l', s_long), None, POINTER(BEPoint)), (POINTER(LEPoint), "&T{<l:x:<l:y:}".replace('l', s_long), None, POINTER(LEPoint)), ] if __name__ == "__main__": unittest.main()