Ok, i'm using Linux Ubuntu, running on kernel 2.6.15-23 and i am writing a program in python that has to do with memory.
I need to open the file System.map-2.6.15-23-386 which i managed to do.
Now my problem lies with the following.. I need it to search for an entry in this file. If i were using the terminal, what i would do is use the following command
(this basically outputs the instances in the system.map file where init_task appears, together with the address.
I'm not entirely sure how to implement this command in python.
Also, after i do that, i need to grab part of the file (which i can do using the .read command) and look for a similar string in another binary file. ...again.. i'm not too sure as to how to go around this..
Can anyone help please?
I need to open the file System.map-2.6.15-23-386 which i managed to do.
Code:
sysmap=open('/boot/System.map-2.6.15-23-386','r')
Code:
cat /boot/System.map-2.6.15-23-386-default | grep init_task
I'm not entirely sure how to implement this command in python.
Also, after i do that, i need to grab part of the file (which i can do using the .read command) and look for a similar string in another binary file. ...again.. i'm not too sure as to how to go around this..
Can anyone help please?
Comment