예제 #1
0
def change_monitor_password(old_password, password='******'):
    r1 = elasticsearch.change_elasticsearch_password(old_password,
                                                     password=password,
                                                     stdout=True)
    if not r1:
        return False
    logstash.change_logstash_elasticsearch_password(password=password,
                                                    prompt_user=False,
                                                    stdout=True)
    kibana.change_kibana_elasticsearch_password(password=password,
                                                prompt_user=False,
                                                stdout=True)
    sys.stdout.write(
        '[+] All monitor components updated passwords successfully.\n')
    return True
예제 #2
0
         mark_first_install()
     else:
         sys.exit(1)
 utilities.create_dynamite_root_directory()
 if args.command == 'point':
     if args.component == 'agent':
         agent.point_agent(args.ls_host, args.ls_port)
     else:
         sys.stderr.write('[-] Unrecognized component - {}\n'.format(
             args.component))
         sys.exit(1)
 elif args.command == 'chpasswd':
     if args.component == 'elasticsearch':
         if elasticsearch.change_elasticsearch_password(
                 old_password=getpass.getpass(
                     'Enter the old ElasticSearch password: '******'[-] Failed to reset ElasticSearch password.\n')
             sys.exit(1)
     elif args.component == 'logstash':
         if logstash.change_logstash_elasticsearch_password(
                 password=utilities.prompt_password(),
                 prompt_user=True,
                 stdout=True):
             sys.exit(0)
         else:
             sys.stderr.write(