Created
January 3, 2017 11:55
-
-
Save mrbitsdcf/b006a34be39ddbdbb39aabe5081ea9d4 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/env python | |
import os | |
u = open('users.txt', 'r') | |
for user in u.readlines(): | |
user = user[:-1] | |
path = '/data/users/{0}/'.format(user) | |
tmp = os.path.isdir(path) | |
if tmp: | |
print path | |
dirs = open('dirs.txt', 'r') | |
for d in dirs.readline(): | |
d = d[:-1] | |
path2 = path + dir | |
tmp2 = os.path.isdir(path2) | |
if tmp2: | |
print '\033[1:34m [+] Directory Found\033[1:m - {0}'.format(path2) | |
files = open('arqs.txt', r) | |
for file in files.readlines(): | |
file = file[:-1] | |
path3 = '{0}/{1}'.format(path2, file) | |
tmp3 = os.path.isfile(path3) | |
if tmp3: | |
print '\033[1:34m [+] File Found\033[1:m - {0}'.format(path3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment