How to use the greynoise.cli.formatter.ANSI_MARKUP.parse function in greynoise

To help you get started, we’ve selected a few greynoise examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github GreyNoise-Intelligence / pygreynoise / tests / cli / test_formatter.py View on Github external
                ANSI_MARKUP.parse(
                    "0.0.0.0 "
                    "is classified as NOT NOISE."
                ),
            ),
        ),
    )
    def test_format_ip_quick_check(self, result, expected):
        """Format IP quick check."""
        assert ip_quick_check_formatter(result, verbose=False).strip("\n") == expected
github GreyNoise-Intelligence / pygreynoise / tests / cli / test_formatter.py View on Github external
                ANSI_MARKUP.parse(
                    "0.0.0.0 is classified as NOISE."
                ),
            ),
            (
                [{"ip": "0.0.0.0", "noise": False}],
                ANSI_MARKUP.parse(
                    "0.0.0.0 "
                    "is classified as NOT NOISE."
                ),
            ),
        ),
    )
    def test_format_ip_quick_check(self, result, expected):
        """Format IP quick check."""
        assert ip_quick_check_formatter(result, verbose=False).strip("\n") == expected
github GreyNoise-Intelligence / pygreynoise / tests / cli / test_formatter.py View on Github external
                + ANSI_MARKUP.parse(
                    textwrap.dedent(
                        u"""


                        ╔═══════════════════════════╗
                        ║ <header>     Context 2 of 3      </header> ║
                        ╚═══════════════════════════╝
                        IP address: 

                        commonly spoofed ip


                        ╔═══════════════════════════╗
                        ║ <header>     Context 3 of 3      </header> ║
                        ╚═══════════════════════════╝
                        IP address: