Skip to content

VM scan bytes

Bennett Blodinger edited this page Mar 18, 2017 · 1 revision

Scanning Bytes

  • vm.scanByteString(byteString)
  • vm.scanBytes(bytesBuffer)

Performs a virtual memory byte-array scan and returns a list of memory addresses where the byte-array has a match. These functions will only return up to the first 100,000 addresses that match.

The difference between vm.scanByteString and vm.scanBytes is that the first takes in a byte string (eg: "01 0F 8A") which allows for wildcards (* or ?). The latter takes in a buffer.

Raises a BufferError if the byteString or bytesBuffer has a length of zero or is non-contiguous.

Example

addresses = vm.scanByteString("0? 01 FA 32") #this may take a bit of time
debug.log(addresses[0]) #assuming len(addresses) > 0