robloxmemoryapi 0.2.8__tar.gz → 0.2.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. {robloxmemoryapi-0.2.8/src/robloxmemoryapi.egg-info → robloxmemoryapi-0.2.9}/PKG-INFO +1 -1
  2. {robloxmemoryapi-0.2.8 → robloxmemoryapi-0.2.9}/pyproject.toml +1 -1
  3. {robloxmemoryapi-0.2.8 → robloxmemoryapi-0.2.9}/src/robloxmemoryapi/utils/memory.py +20 -11
  4. {robloxmemoryapi-0.2.8 → robloxmemoryapi-0.2.9}/src/robloxmemoryapi/utils/rbx/instance.py +1657 -124
  5. {robloxmemoryapi-0.2.8 → robloxmemoryapi-0.2.9/src/robloxmemoryapi.egg-info}/PKG-INFO +1 -1
  6. {robloxmemoryapi-0.2.8 → robloxmemoryapi-0.2.9}/LICENSE.md +0 -0
  7. {robloxmemoryapi-0.2.8 → robloxmemoryapi-0.2.9}/README.md +0 -0
  8. {robloxmemoryapi-0.2.8 → robloxmemoryapi-0.2.9}/setup.cfg +0 -0
  9. {robloxmemoryapi-0.2.8 → robloxmemoryapi-0.2.9}/src/robloxmemoryapi/__init__.py +0 -0
  10. {robloxmemoryapi-0.2.8 → robloxmemoryapi-0.2.9}/src/robloxmemoryapi/utils/__init__.py +0 -0
  11. {robloxmemoryapi-0.2.8 → robloxmemoryapi-0.2.9}/src/robloxmemoryapi/utils/luau/__init__.py +0 -0
  12. {robloxmemoryapi-0.2.8 → robloxmemoryapi-0.2.9}/src/robloxmemoryapi/utils/luau/parser.py +0 -0
  13. {robloxmemoryapi-0.2.8 → robloxmemoryapi-0.2.9}/src/robloxmemoryapi/utils/offsets.py +0 -0
  14. {robloxmemoryapi-0.2.8 → robloxmemoryapi-0.2.9}/src/robloxmemoryapi/utils/rbx/__init__.py +0 -0
  15. {robloxmemoryapi-0.2.8 → robloxmemoryapi-0.2.9}/src/robloxmemoryapi/utils/rbx/bytecode/decryptor.py +0 -0
  16. {robloxmemoryapi-0.2.8 → robloxmemoryapi-0.2.9}/src/robloxmemoryapi/utils/rbx/bytecode/encryptor.py +0 -0
  17. {robloxmemoryapi-0.2.8 → robloxmemoryapi-0.2.9}/src/robloxmemoryapi/utils/rbx/datastructures.py +0 -0
  18. {robloxmemoryapi-0.2.8 → robloxmemoryapi-0.2.9}/src/robloxmemoryapi/utils/rbx/fflags.py +0 -0
  19. {robloxmemoryapi-0.2.8 → robloxmemoryapi-0.2.9}/src/robloxmemoryapi.egg-info/SOURCES.txt +0 -0
  20. {robloxmemoryapi-0.2.8 → robloxmemoryapi-0.2.9}/src/robloxmemoryapi.egg-info/dependency_links.txt +0 -0
  21. {robloxmemoryapi-0.2.8 → robloxmemoryapi-0.2.9}/src/robloxmemoryapi.egg-info/requires.txt +0 -0
  22. {robloxmemoryapi-0.2.8 → robloxmemoryapi-0.2.9}/src/robloxmemoryapi.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: robloxmemoryapi
3
- Version: 0.2.8
3
+ Version: 0.2.9
4
4
  Summary: Python Library that abstracts reading and writing data from the Roblox DataModel
5
5
  Author-email: upio <notpoiu@users.noreply.github.com>, mstudio45 <mstudio45@users.noreply.github.com>, ActualMasterOogway <ActualMasterOogway@users.noreply.github.com>
6
6
  License: Copyright 2025 upio, mstudio45, master oogway
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "robloxmemoryapi"
7
- version = "0.2.8"
7
+ version = "0.2.9"
8
8
  description = "Python Library that abstracts reading and writing data from the Roblox DataModel"
9
9
  readme = { file = "README.md", content-type = "text/markdown" }
10
10
  requires-python = ">=3.9"
@@ -393,29 +393,38 @@ class EvasiveProcess:
393
393
 
394
394
  if length < current_capacity:
395
395
  self.write(ptr + length, b'\x00')
396
+
397
+ self.write_int(length_address, length)
398
+ return
399
+ # ptr is null despite capacity > 15 — fall through to allocate
396
400
  else:
397
401
  data_to_write = encoded + b'\x00' * (16 - length)
398
402
  self.write(address, data_to_write[:16])
403
+ self.write_int(length_address, length)
404
+ return
399
405
 
400
- else:
401
- new_capacity = length + 16 # Padding for future edits
402
- ptr = self.virtual_alloc(new_capacity)
403
-
404
- if ptr == 0:
405
- raise MemoryError("Failed to allocate memory for string.")
406
-
407
- self.write(ptr, encoded + b'\x00') # Write string
408
-
409
- self.write_long(address, ptr) # Pointer
410
- self.write_int(capacity_address, new_capacity) # Capacity
406
+ # Need to allocate new memory (capacity too small, or pointer was null)
407
+ new_capacity = length + 16 # Padding for future edits
408
+ ptr = self.virtual_alloc(new_capacity)
409
+
410
+ if ptr == 0:
411
+ raise MemoryError("Failed to allocate memory for string.")
412
+
413
+ self.write(ptr, encoded + b'\x00') # Write string
411
414
 
415
+ self.write_long(address, ptr) # Pointer
412
416
  self.write_int(length_address, length)
417
+ self.write_int(capacity_address, new_capacity) # Capacity
413
418
 
414
419
  def read_string(self, address: int, offset: int = 0) -> str:
415
420
  if offset != 0:
416
421
  address += offset
417
422
 
418
423
  string_length = self.read_int(address + 0x10)
424
+ if string_length <= 0:
425
+ return ""
426
+ if string_length > 1024 * 1024: # sanity cap at 1 MB
427
+ return ""
419
428
  if string_length <= 15:
420
429
  return self.read_raw_string(address, string_length)
421
430
  else: