Beispiel #1
0
def goodbye():
    for n in range(0, 100):
        print("")
    print(
        fg.brightgreen(f"""
   \ \ / (_)_ _ ___ ___
    \ V /| | '_/ -_|_-<
     \_/ |_|_| \___/__/
           (_)_ _
    _  _   | | '  |         _
   | \| |_ |_|_||_| ___ _ _(_)___
   | .` | || | '  \/ -_) '_| (_-<
   |_|\_|\_,_|_|_|_\___|_| |_/__/
"""))

    print(fg.boldyellow("    If you enjoyed the app..."))
    print("")
    print(
        fg.brightgreen(
            "    tipping.me (Lightning): https://tippin.me/@alphaazeta"))
    print("")
    print(
        fg.brightgreen(
            "    onchain: bc1q4fmyksw40vktte9n6822e0aua04uhmlez34vw5gv72zlcmrkz46qlu7aem"
        ))
    print("")
    print(fg.brightgreen("    payNym: +luckyhaze615"))
    print(fg.brightgreen("    https://paynym.is/+luckyhaze615"))
    print("")
Beispiel #2
0
def logo():
    print(
        fg.brightgreen(f"""
  _   _           __        ___    ____     _
 | |_| |__   ___  \ \      / / \  |  _ \ __| | ___ _ __
 | __| '_ \ / _ \  \ \ /\ / / _ \ | |_) / _` |/ _ \ '_  |
 | |_| | | |  __/   \ V  V / ___ \|  _ < (_| |  __/ | | |
  \__|_| |_|\___|    \_/\_/_/   \_\_| \_\__,_|\___|_| |_|"""))
    print("")
    print(
        emoji.emojize(
            "                                      Specter Edition :ghost:"))
    print(
        fg.yellow("                             Powered by NgU technology ₿"))
Beispiel #3
0
def logo():
    print(
        fg.brightgreen(f"""
  _   _           __        ___    ____     _
 | |_| |__   ___  \ \      / / \  |  _ \ __| | ___ _ __
 | __| '_ \ / _ \  \ \ /\ / / _ \ | |_) / _` |/ _ \ '_  |
 | |_| | | |  __/   \ V  V / ___ \|  _ < (_| |  __/ | | |
  \__|_| |_|\___|    \_/\_/_/   \_\_| \_\__,_|\___|_| |_|"""))
    print("")
    print(
        emoji.emojize(
            "                                          Node Edition :key:"))
    print(
        fg.boldyellow(
            "                             Powered by NGU technology "))
Beispiel #4
0
def main(debug=False, reloader=False):
    from utils import (create_config, runningInDocker)
    from ansi_management import (warning, success, error, info, clear_screen,
                                 bold, muted, yellow, blue)

    # Make sure current libraries are found in path
    current_path = os.path.abspath(os.path.dirname(__file__))

    # CLS + Welcome
    print("")
    print("")
    print(yellow("Welcome to the WARden <> Launching Application ..."))
    print("")
    print(f"[i] Running from directory: {current_path}")
    print("")

    if runningInDocker():
        print(
            success(
                f"✅ Running inside docker container {emoji.emojize(':whale:')} Getting some James Bartley vibes..."
            ))
        print("")

    app = create_app()
    app.app_context().push()
    app = init_app(app)
    app.app_context().push()

    def close_running_threads(app):
        print("")
        print("")
        print(yellow("[i] Please Wait... Shutting down."))
        # Delete Debug File
        try:
            from config import Config
            os.remove(Config.debug_file)
        except FileNotFoundError:
            pass
        # Clean all messages
        app.message_handler.clean_all()
        # Breaks background jobs
        app.scheduler.shutdown(wait=False)
        goodbye()
        os._exit(1)

    # Register the def above to run at close
    atexit.register(close_running_threads, app)

    print("")
    print(success("✅ WARden Server is Ready... Launch cool ASCII logo!"))
    print("")
    logging.info("Launched WARden Server [Success]")

    def onion_string():
        from utils import pickle_it
        if app.settings['SERVER'].getboolean('onion_server'):
            try:
                pickle_it('save', 'onion_address.pkl',
                          app.tor_service_id + '.onion')
                return (f"""
        {emoji.emojize(':onion:')} Tor Onion server running at:
        {yellow(app.tor_service_id + '.onion')}
                    """)
            except Exception:
                return (yellow("[!] Tor Onion Server Not Running"))
        else:
            return ('')

    def local_network_string():
        host = app.settings['SERVER'].get('host')
        port = str(app.settings['SERVER'].getint('port'))
        if app.runningInDocker:
            return ('')
        else:
            if host == '0.0.0.0':
                return (f"""
      Or through your network at address:
      {yellow('http://')}{yellow(get_local_ip())}{yellow(f':{port}/')}
                """)

    port = app.settings['SERVER'].getint('port')

    # Check if this port is available
    from utils import is_port_in_use
    ports = [5001, 5002, 5003, 5004, 5005, 5006, 5007, 5008, 5009, 5010]
    if is_port_in_use(port) is True:
        # Ooops. Port in use... Let's try other ports...
        for p in ports:
            if is_port_in_use(p) is False:
                print(
                    warning(
                        f"[i] Please note that port {str(port)} is in use."))
                print(
                    warning(
                        f"[i] Port was automatically changed to {str(p)} which is free."
                    ))
                # Reassign port
                port = p
                app.settings['SERVER']['port'] = str(port)
                break

    print(
        fg.brightgreen("""
        _   _           __        ___    ____     _
       | |_| |__   ___  \ \      / / \  |  _ \ __| | ___ _ __
       | __| '_ \ / _ \  \ \ /\ / / _ \ | |_) / _` |/ _ \ '_  |
       | |_| | | |  __/   \ V  V / ___ \|  _ < (_| |  __/ | | |
        \__|_| |_|\___|    \_/\_/_/   \_\_| \_\__,_|\___|_| |_|"""))

    print(f"""
                                    {yellow("Powered by NgU technology")} {emoji.emojize(':rocket:')}


           Privacy Focused Portfolio & Bitcoin Address Tracker
    -----------------------------------------------------------------
                          Application Loaded

      Open your browser and navigate to one of these addresses:
      {yellow('http://localhost:' + str(port) + '/')}
      {yellow('http://127.0.0.1:' + str(port) + '/')}
      {local_network_string()}
      {onion_string()}
    ----------------------------------------------------------------
                         CTRL + C to quit server
    ----------------------------------------------------------------

    """)

    app.run(debug=debug,
            threaded=True,
            host=app.settings['SERVER'].get('host'),
            port=port,
            use_reloader=reloader)

    if app.settings['SERVER'].getboolean('onion_server'):
        from tor import stop_hidden_services
        stop_hidden_services(app)
Beispiel #5
0
def main(debug=False, reloader=False):
    from utils import (create_config, runningInDocker)
    from ansi_management import (warning, success, error, info, clear_screen, bold,
                                 muted, yellow, blue)

    # Make sure current libraries are found in path
    current_path = os.path.abspath(os.path.dirname(__file__))

    # CLS + Welcome
    print("")
    print("")
    print(yellow("  Welcome to the WARden <> Launching Application ..."))
    print("")
    print(f"  [i] Running from directory: {current_path}")
    print("")

    if runningInDocker():
        print(success(f"✅ Running inside docker container {emoji.emojize(':whale:')} Getting some James Bartley vibes..."))
        print("")

    app = create_app()
    app.app_context().push()
    app = init_app(app)
    app.app_context().push()

    def close_running_threads(app):
        print("")
        print("")
        print(yellow("  [i] Please Wait... Shutting down."))
        # Delete Debug File
        try:
            from config import Config
            os.remove(Config.debug_file)
        except FileNotFoundError:
            pass
        # Clean all messages
        app.message_handler.clean_all()
        # Breaks background jobs
        app.scheduler.shutdown(wait=False)
        print("""
                           Goodbye &
                         Keep Stacking
            """)
        print("")

    # Register the def above to run at close
    atexit.register(close_running_threads, app)

    print("")
    print(success("✅ WARden Server is Ready... Launch cool ASCII logo!"))
    print("")

    def onion_string():
        if app.settings['SERVER'].getboolean('onion_server'):
            return (f"""
      {emoji.emojize(':onion:')} Tor Onion server running at:
      {yellow(app.tor_service_id + '.onion')}
                """)
        else:
            return ('')

    def local_network_string():
        host = app.settings['SERVER'].get('host')
        if app.runningInDocker:
            return ('')
        else:
            if host == '0.0.0.0':
                return (f"""
      Or through your network at address:
      {yellow('http://')}{yellow(get_local_ip())}{yellow(':5000/')}
                """)

    print(
        fg.brightgreen("""
        _   _           __        ___    ____     _
       | |_| |__   ___  \ \      / / \  |  _ \ __| | ___ _ __
       | __| '_ \ / _ \  \ \ /\ / / _ \ | |_) / _` |/ _ \ '_  |
       | |_| | | |  __/   \ V  V / ___ \|  _ < (_| |  __/ | | |
        \__|_| |_|\___|    \_/\_/_/   \_\_| \_\__,_|\___|_| |_|"""))

    print(f"""
                                    {yellow("Powered by NgU technology")} {emoji.emojize(':rocket:')}


           Privacy Focused Portfolio & Bitcoin Address Tracker
    -----------------------------------------------------------------
                          Application Loaded

      Open your browser and navigate to one of these addresses:
      {yellow('http://localhost:5000/')}
      {yellow('http://127.0.0.1:5000/')}
      {local_network_string()}
      {onion_string()}
    ----------------------------------------------------------------
                         CTRL + C to quit server
    ----------------------------------------------------------------

    """)

    app.run(debug=debug,
            threaded=True,
            host=app.settings['SERVER'].get('host'),
            port=app.settings['SERVER'].getint('port'),
            use_reloader=reloader)

    if app.settings['SERVER'].getboolean('onion_server'):
        from tor import stop_hidden_services
        stop_hidden_services(app)