Created
November 26, 2016 20:36
-
-
Save acrosman/892449e37d088653804e413ec0ff8ade to your computer and use it in GitHub Desktop.
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