How to use the greynoise.cli.subcommand.multi_quick_check 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_parser.py View on Github external
def test_multi_quick_check(self):
        """Multi quick check subcommand called."""
        args = parse_arguments(["multi_quick_check", "0.0.0.0", "0.0.0.1"])
        assert args.func == multi_quick_check
github GreyNoise-Intelligence / pygreynoise / src / greynoise / cli / parser.py View on Github external
context_parser = subparsers.add_parser("context", help=context.__doc__.rstrip("."))
    context_parser.add_argument(
        "ip_address", type=ip_address_parameter, help="IP address"
    )
    context_parser.set_defaults(func=context)

    quick_check_parser = subparsers.add_parser(
        "quick_check", help=quick_check.__doc__.rstrip(".")
    )
    quick_check_parser.add_argument(
        "ip_address", type=ip_address_parameter, help="IP address"
    )
    quick_check_parser.set_defaults(func=quick_check)

    multi_quick_check_parser = subparsers.add_parser(
        "multi_quick_check", help=multi_quick_check.__doc__.rstrip(".")
    )
    multi_quick_check_parser.add_argument(
        "ip_address", type=ip_address_parameter, nargs="+", help="IP address"
    )
    multi_quick_check_parser.set_defaults(func=multi_quick_check)

    actors_parser = subparsers.add_parser("actors", help=actors.__doc__.rstrip("."))
    actors_parser.set_defaults(func=actors)

    args = parser.parse_args(argv)
    if not args.api_key:
        config = load_config()
        if not config["api_key"]:
            prog = os.path.basename(sys.argv[0])
            print(
                "Error: API key not found.\n\n"
github GreyNoise-Intelligence / pygreynoise / src / greynoise / cli / parser.py View on Github external
quick_check_parser = subparsers.add_parser(
        "quick_check", help=quick_check.__doc__.rstrip(".")
    )
    quick_check_parser.add_argument(
        "ip_address", type=ip_address_parameter, help="IP address"
    )
    quick_check_parser.set_defaults(func=quick_check)

    multi_quick_check_parser = subparsers.add_parser(
        "multi_quick_check", help=multi_quick_check.__doc__.rstrip(".")
    )
    multi_quick_check_parser.add_argument(
        "ip_address", type=ip_address_parameter, nargs="+", help="IP address"
    )
    multi_quick_check_parser.set_defaults(func=multi_quick_check)

    actors_parser = subparsers.add_parser("actors", help=actors.__doc__.rstrip("."))
    actors_parser.set_defaults(func=actors)

    args = parser.parse_args(argv)
    if not args.api_key:
        config = load_config()
        if not config["api_key"]:
            prog = os.path.basename(sys.argv[0])
            print(
                "Error: API key not found.\n\n"
                "To fix this problem, please use any of the following methods "
                "(in order of precedence):\n"
                "- Pass it using the -k/--api-key option.\n"
                "- Set it in the GREYNOISE_API_KEY environment variable.\n"
                "- Run {!r} to save it to the configuration file.\n".format(