import re
import logging
import distutils
+import distutils.version
import urlparse
import hashlib
import sqlalchemy.exc
substitutions.update(php.substitutions)
install_schema = install.ArgSchema("db", "admin", "email", "title")
deprecated_keys = set(['WIZARD_SECRETKEY'])
- random_keys = set(['WIZARD_SECRETKEY', 'WIZARD_AUTH_KEY', 'WIZARD_SECURE_AUTH_KEY', 'WIZARD_LOGGED_IN_KEY', 'WIZARD_NONCE_KEY'])
+ random_keys = set([
+ 'WIZARD_SECRETKEY',
+ 'WIZARD_AUTH_KEY',
+ 'WIZARD_SECURE_AUTH_KEY',
+ 'WIZARD_LOGGED_IN_KEY',
+ 'WIZARD_NONCE_KEY',
+ 'WIZARD_AUTH_SALT',
+ 'WIZARD_SECURE_AUTH_SALT',
+ 'WIZARD_LOGGED_IN_SALT',
+ 'WIZARD_NONCE_SALT',
+ ])
random_blacklist = set(['put your unique phrase here'])
def urlFromExtract(self, deployment):
try:
meta = sql.connect(deployment.dsn)
- wp_options = meta.tables["wp_options"]
+ try:
+ wp_options = meta.tables["wp_options"]
+ except KeyError:
+ return None
query = wp_options.select(wp_options.c.option_name == 'home')
return query.execute().fetchone()['option_value']
except sqlalchemy.exc.OperationalError:
def checkWeb(self, deployment):
return self.checkWebPage(deployment, "",
outputs=["<html", "WordPress", "feed"],
- exclude=["Error establishing a database connection"])
+ exclude=["Error establishing a database connection", "Account unknown"])
def detectVersion(self, deployment):
return self.detectVersionFromFile("wp-includes/version.php", php.re_var("wp_version"))
def install(self, version, options):