Skip to content

Instantly share code, notes, and snippets.

@crackcomm
Last active October 13, 2015 19:47
Show Gist options
  • Save crackcomm/4246418 to your computer and use it in GitHub Desktop.
Save crackcomm/4246418 to your computer and use it in GitHub Desktop.
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
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