from xml.dom import minidom
from termcolor import colored
import optparse
import subprocess
import os

parser = optparse.OptionParser()

parser.add_option('-d','--file',type="string",dest="directory",help="Reversed APK Directory",metavar="FILE")
(options,args) = parser.parse_args()

path = options.directory

if path is None:
        print "Please provide your directory"
        exit()

wordList = "words.txt"

with open(wordList) as f:
	words = f.readlines()

print words

for word in words:
	word = word.strip()
	subprocess.call(['grep', '-Riw', word, path, '--color'])
