import os
def find_method(name):
        i = 0
        found_dic = { "$_GET":[], "$_POST":[], "include":[], "require":[], "mysql_query":[], "SELECT":[], "system":[], "exec":[], "passthru":[], "readfile":[], "fopen":[], "eval":[] }
        for i, line in enumerate(file(name, "r")):
                found = False
                for key in found_dic:
                        if key in line.strip():
                                found_dic[key].append("LINE:"+str(i)+":" + key)
                                found = True
        for key in found_dic:
                if found_dic[key]:
                        print " ", "-"*10, key, "-"*10
                        for r in found_dic[key]:
                               print "  ",r
def search(dirname):
        flist = os.listdir(dirname)
        for f in flist:
                next = os.path.join(dirname, f)
                if os.path.isdir(next):
                        search(next)
                else:
                        doFileWork(next)
def doFileWork(filename):
        ext = os.path.splitext(filename)[-1]
        #if ext == '.html': print filename
        if ext == '.php':
               # print "target:" + filename
                find_method(filename)
problem here 1. I need my result need to show like
EX) === /var/www/html/zboard/zboard.php ==
---------- exec ----------
   LINE:288:$a_setup="<a onfocus=blur() href='admin_setup.php?exec=view_board&no=$setup[no]&group_no=$setup[group_no]&exec2=modify' target=_blank>"; else $a_setup="<Zeroboard ";
but this only shows like
---------- exec ----------
   LINE:287:exec
  ---------- mysql_query ----------
   LINE:43:mysql_query
   LINE:95:mysql_query
   LINE:120:mysql_query
how can I show like example using this code
 
     
     
     
    