Last active
October 13, 2015 19:47
-
-
Save crackcomm/4246418 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
from glob import glob | |
import os | |
domains = glob('../domains/*') | |
for domain in domains: | |
domain_name = domain.rsplit('/')[-1] | |
public_html = '%s/public_html' % domain | |
if not 'kredyt' in domain_name: | |
print "NOT %s" % domain_name | |
continue | |
files = glob('%s/*' % public_html) | |
for f in files: | |
if not 'cgi-bin' in f: | |
os.remove(f) | |
print domain_name | |
This file contains hidden or 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
from glob import glob | |
import os | |
import shutil | |
import codecs | |
blacklist = [ | |
] | |
for domain in domains: | |
domain_name = domain.rsplit('/')[-1] | |
public_html = '%s/public_html' % domain | |
if domain_name in blacklist: | |
continue | |
if os.path.exists('%s/wp-config.php' % public_html): | |
fh = open(fl.replace('../wpp', public_html)) | |
print fh.read()[:8] | |
# fh.write(wp_c.replace('{{number}}', 'x%s' % i)) | |
# else: | |
# if os.path.isdir(fl): | |
# shutil.copytree(fl, fl.replace('../wpp', public_html)) | |
# else: | |
# shutil.copy2(fl, fl.replace('../wpp', public_html)) | |
# print domain_name | |
# i += 1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment