
Research
/Security News
Contagious Interview Campaign Escalates With 67 Malicious npm Packages and New Malware Loader
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
binaryreader is a faster and more elegant alternative to struct
for parsing binary data in Python.
from binaryreader import BinaryReader
data: bytes|bytearray
read_little_endian: bool = True
reader = BinaryReader(data, read_little_endian)
text = reader.readStringC()
TODO
BinaryReader(data: bytes|bytearray, is_little_endian: bool)
.endian: bool
[get,set] - endianness of the reader (True - little, False - big).position: int
[get,set] - position of the cursor within the data.size: int
[get] - size of underlying/passed object.obj: bytes|bytearray
[get] - underlying/passed object.readBool(): bool
- reads a bool.readInt8(): int
- reads an int8.readUInt8(): int
- reads an uint8.readInt16(): int
- reads an int16.readUInt16(): int
- reads an uint16.readInt32(): int
- reads an int32.readUInt32(): int
- reads an uint32.readInt64(): int
- reads an int64.readUInt64(): int
- reads an uint64.readHalf(): float
- reads a half.readFloat(): float
- reads a float.readDouble(): float
- reads a double.readBoolArray(): [bool]
- reads a bool array.readInt8Array(): [int]
- reads a array of int8.readUInt8Array(): bytearray
- reads a array of uint8.readInt16Array(): [int]
- reads a array of int16.readUInt16Array(): [int]
- reads a array of uint16.readInt32Array(): [int]
- reads a array of int32.readUInt32Array(): [int]
- reads a array of uint32.readInt64Array(): [int]
- reads a array of int64.readUInt64Array(): [int]
- reads a array of uint64.readHalfArray(): [float]
- reads a array of half.readFloatArray(): [float]
- reads a array of float.readDoubleArray(): [float]
- reads a array of double.readStringC(): str
- reads a null terminated string.readStringCArray(): [str]
- reads an array of null terminated strings.readString(): str
- reads a string (if length is not passed as arg, read an int as length).readStringArray(): [str]
- reads an array of strings.readStringAligned(): str
- same as readString but aligned to 4 bytes after reading the string.readStringAlignedArray(): [str]
- reads an array of aligned strings.align(align_by: int): int
- aligns the cursor to the given input and returns the position after the alignment.readVarInt(): int
- reads a varint.readLSB(): bytearray
- reads the lsb data of the given size (in bytes to read -> output length is 1/8 of that)FAQs
a c-extension that implements a binary reader on top of bytes and bytearrays
We found that binaryreader demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.