Search for the given byte pattern within the process memory. @type bytes: str @param bytes: Bytes to search for. @type minAddr: int @param minAddr: (Optional) Start the search at this memory address. @type maxAddr: int @param maxAddr: (O
(self, bytes, minAddr=None, maxAddr=None)
| 1368 | raise TypeError("Unknown pattern type: %r" % type(pattern)) |
| 1369 | |
| 1370 | def search_bytes(self, bytes, minAddr=None, maxAddr=None): |
| 1371 | """ |
| 1372 | Search for the given byte pattern within the process memory. |
| 1373 | |
| 1374 | @type bytes: str |
| 1375 | @param bytes: Bytes to search for. |
| 1376 | |
| 1377 | @type minAddr: int |
| 1378 | @param minAddr: (Optional) Start the search at this memory address. |
| 1379 | |
| 1380 | @type maxAddr: int |
| 1381 | @param maxAddr: (Optional) Stop the search at this memory address. |
| 1382 | |
| 1383 | @rtype: iterator of int |
| 1384 | @return: An iterator of memory addresses where the pattern was found. |
| 1385 | |
| 1386 | @raise WindowsError: An error occurred when querying or reading the |
| 1387 | process memory. |
| 1388 | """ |
| 1389 | pattern = BytePattern(bytes) |
| 1390 | matches = Search.search_process(self, pattern, minAddr, maxAddr) |
| 1391 | for addr, size, data in matches: |
| 1392 | yield addr |
| 1393 | |
| 1394 | def search_text(self, text, encoding="utf-16le", caseSensitive=False, minAddr=None, maxAddr=None): |
| 1395 | """ |
no test coverage detected