If this is windows, you can download windbg as noted above and attach to the process you want to search. But, if you have a 64-bit process
s -u 0 L? 7fffffff`ffffffff "find my text"
s -u 0 L? 7fffffff`ffffffff "find my text"
will take a very long time since most of the memory isn't there.
doDo this instead and it will run very fast since it only looks at memory that is there
!address -f:MEM_COMMIT -c:"s -u %1 %2 "find my text""
!address -f:MEM_COMMIT -c:"s -a %1 %2 "find my text""
!address -f:MEM_COMMIT -c:"s -u %1 %2 \"find my text\""
!address -f:MEM_COMMIT -c:"s -a %1 %2 \"find my text\""
theThe first command finds unicode strings, the second ascii.
%1%1
is the start of the block, %2%2
is the end of the block.
-f:MEM_COMMIT-f:MEM_COMMIT
only lists memory that is actually present, check the help for other flags, like -f:image-f:image
or -f:stack-f:stack
.