how to get memory address in python code example
Example 1: c++ delet from memory
// Delete pointer
int* ptr1 = new int;
delete ptr1;
// Delete array
int* array = new int[10];
delete[] array;
Example 2: how to search the memory for the address of bin/sh
(gdb) break main
(gdb) run
(gdb) print &system
$1 = (<text variable, no debug info> *) 0xf7e68250 <system>
(gdb) find &system,+9999999,"/bin/sh"
0xf7f86c4c
warning: Unable to access target memory at 0xf7fd0fd4, halting search.
1 pattern found.