PATH: //opt/cloudlinux/venv/lib/python3.11/site-packages/aiohttp
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
📁 .hash/
X
📄 __init__.py
↓
X
📁 __pycache__/
X
📄 _cparser.pxd
↓
X
📄 _find_header.pxd
↓
X
📄 _headers.pxi
↓
X
📄 _helpers.cpython-311-x86_64-linux-gnu.so
↓
X
📄 _helpers.pyi
↓
X
📄 _helpers.pyx
↓
X
📄 _http_parser.cpython-311-x86_64-linux-gnu.so
↓
X
📄 _http_parser.pyx
↓
X
📄 _http_writer.cpython-311-x86_64-linux-gnu.so
↓
X
📄 _http_writer.pyx
↓
X
📄 _websocket.cpython-311-x86_64-linux-gnu.so
↓
X
📄 _websocket.pyx
↓
X
📄 abc.py
↓
X
📄 base_protocol.py
↓
X
📄 client.py
↓
X
📄 client_exceptions.py
↓
X
📄 client_proto.py
↓
X
📄 client_reqrep.py
↓
X
📄 client_ws.py
↓
X
📄 compression_utils.py
↓
X
📄 connector.py
↓
X
📄 cookiejar.py
↓
X
📄 formdata.py
↓
X
📄 hdrs.py
↓
X
📄 helpers.py
↓
X
📄 http.py
↓
X
📄 http_exceptions.py
↓
X
📄 http_parser.py
↓
X
📄 http_websocket.py
↓
X
📄 http_writer.py
↓
X
📄 locks.py
↓
X
📄 log.py
↓
X
📄 multipart.py
↓
X
📄 payload.py
↓
X
📄 payload_streamer.py
↓
X
📄 py.typed
↓
X
📄 pytest_plugin.py
↓
X
📄 resolver.py
↓
X
📄 streams.py
↓
X
📄 tcp_helpers.py
↓
X
📄 test_utils.py
↓
X
📄 tracing.py
↓
X
📄 typedefs.py
↓
X
📄 web.py
↓
X
📄 web_app.py
↓
X
📄 web_exceptions.py
↓
X
📄 web_fileresponse.py
↓
X
📄 web_log.py
↓
X
📄 web_middlewares.py
↓
X
📄 web_protocol.py
↓
X
📄 web_request.py
↓
X
📄 web_response.py
↓
X
📄 web_routedef.py
↓
X
📄 web_runner.py
↓
X
📄 web_server.py
↓
X
📄 web_urldispatcher.py
↓
X
📄 web_ws.py
↓
X
📄 worker.py
↓
X
SAVING...
BERHASIL DIUBAH!
EDITING: _websocket.pyx
from cpython cimport PyBytes_AsString #from cpython cimport PyByteArray_AsString # cython still not exports that cdef extern from "Python.h": char* PyByteArray_AsString(bytearray ba) except NULL from libc.stdint cimport uint32_t, uint64_t, uintmax_t def _websocket_mask_cython(object mask, object data): """Note, this function mutates its `data` argument """ cdef: Py_ssize_t data_len, i # bit operations on signed integers are implementation-specific unsigned char * in_buf const unsigned char * mask_buf uint32_t uint32_msk uint64_t uint64_msk assert len(mask) == 4 if not isinstance(mask, bytes): mask = bytes(mask) if isinstance(data, bytearray): data = <bytearray>data else: data = bytearray(data) data_len = len(data) in_buf = <unsigned char*>PyByteArray_AsString(data) mask_buf = <const unsigned char*>PyBytes_AsString(mask) uint32_msk = (<uint32_t*>mask_buf)[0] # TODO: align in_data ptr to achieve even faster speeds # does it need in python ?! malloc() always aligns to sizeof(long) bytes if sizeof(size_t) >= 8: uint64_msk = uint32_msk uint64_msk = (uint64_msk << 32) | uint32_msk while data_len >= 8: (<uint64_t*>in_buf)[0] ^= uint64_msk in_buf += 8 data_len -= 8 while data_len >= 4: (<uint32_t*>in_buf)[0] ^= uint32_msk in_buf += 4 data_len -= 4 for i in range(0, data_len): in_buf[i] ^= mask_buf[i]
SIMPAN PERUBAHAN