def cli(): # Show something pretty to start webbreaker_ascii = WebBreakerHelper.ascii_motd() b = WebBreakerHelper.banner(text=(webbreaker_ascii)) sys.stdout.write(str("{0}\nVersion {1}\n".format(b, version))) sys.stdout.write(str("Logging to files: {}\n".format(Logger.app_logfile))) SecretClient().verify_secret()
def clear_credentials(): secret_client = SecretClient() secret_client.clear_credentials('fortify', 'username', 'password')
def admin_secret(force): secret_client = SecretClient() if secret_client.secret_exists(): if not force: if click.confirm( 'All stored credentials will be deleted. Do you want to continue?' ): secret_client.wipe_all_credentials() secret_client.write_secret(overwrite=True) else: sys.stdout.write(str("New secret was not written\n")) else: secret_client.wipe_all_credentials() secret_client.write_secret(overwrite=True) else: secret_client.write_secret()
def write_credentials(username, password): secret_client = SecretClient() secret_client.set('fortify', 'username', username) secret_client.set('fortify', 'password', password)
def __init__(self): secret_client = SecretClient() self.username = secret_client.get('fortify', 'username') self.password = secret_client.get('fortify', 'password')
def write_credentials(self, username, password): secret_client = SecretClient() secret_client.set('webinspect', 'username', username) secret_client.set('webinspect', 'password', password)
def clear_credentials(self): secret_client = SecretClient() secret_client.clear_credentials('webinspect', 'username', 'password')
def _get_config_authentication(self): secret_client = SecretClient() username = secret_client.get('webinspect', 'username') password = secret_client.get('webinspect', 'password') return username, password