# get the string
        string = gdb.inferiors()[0].read_memory(address, length)

        # print sniffed data
        print string
        
        # return False to continue the execution of the program
        return False


#
# The execution starts here
#

# fix a little gdb bug (or feature? I don't know...)
sys.argv = gdb_utils.normalized_argv()

# check and get arguments
if len(sys.argv) < 1:
    usage()

process_name = sys.argv[0]

# get a list of processes that match the given process name
processes = gdb_utils.search_processes(process_name)

# print list and ask for the pid
print 'Processes that match:'
for proc in processes:
    print str(proc['pid']) + ' ' + proc['command']
Beispiel #2
0
        # get the string
        string = gdb.inferiors()[0].read_memory(address, length)

        # print sniffed data
        print string

        # return False to continue the execution of the program
        return False


#
# The execution starts here
#

# fix a little gdb bug (or feature? I don't know...)
sys.argv = gdb_utils.normalized_argv()

# check and get arguments
if len(sys.argv) < 1:
    usage()

process_name = sys.argv[0]

# get a list of processes that match the given process name
processes = gdb_utils.search_processes(process_name)

# print list and ask for the pid
print 'Processes that match:'
for proc in processes:
    print str(proc['pid']) + ' ' + proc['command']