This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys | |
from os import listdir | |
from os.path import isfile, join | |
from os import walk | |
test_path = sys.argv[1] | |
files = [] | |
for (dirpath, dirnames, filenames) in walk(test_path): | |
for f in filenames: | |
full_name = join(dirpath, f) | |
test = open(full_name, 'r') | |
for l in test: | |
try: | |
l.index('<?php') | |
except: | |
pass | |
else: | |
print "PHP Found in: " + full_name | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment