Thanks for this great script
-------------------------------------
i solved the problem for $if_running..
check what is your "ps aux | grep exaile" looks like
if your ps reply like this.. you will have to rename the process name
Code:
c0re 30372 9.5 5.3 158036 55312 ? Sl 02:41 0:51 python /usr/lib/exaile/exaile.py
here is the 13 steps HowTO:
step 1. download the attachment file.
step 2. save it
step 3. extract it; tar xzf PyInline-0.03.tar.gz
step 4. cd PyInline-0.03
step 5. chmod +x setup.py
step 6. sudo ./setup.py install
step 7. sudo gedit /usr/lib/exaile/exaile.py
step 8. find import sys
step 9. add after
Code:
import dl
import PyInline
import time
libc = dl.open('/lib/libc.so.6')
if libc != 0 : libc.call('prctl', 15, 'exaile\0', 0, 0, 0)
else : print ('prctl not called')
m = PyInline.build(code=r"""
#include <Python.h>
#include <stdio.h>
#include <string.h>
void set_argv(char *str){
int argc;
char **argv;
Py_GetArgcArgv(&argc, &argv);
strncpy(argv[0], str , strlen(str));
memset(&argv[0][strlen(str)], '\0', strlen(&argv[0][strlen(str)]));
}
""", language="C")
m.set_argv('exaile')
step 10. save the file.
step 11. run exaile
step 12. its should be working now
step 13. have fun
Bookmarks