Esempio n. 1
0
from dynamite_nsm.cmd import process_arguments
from dynamite_nsm.cmd.suricata.logs import get_action_parser

if __name__ == '__main__':
    parser = get_action_parser()
    args = parser.parse_args()
    res = None
    try:
        res = process_arguments(args, component='suricata', interface='logs',
                                sub_interface=args.sub_interface)
    except AttributeError:
        parser.print_help()
    if res:
        print(res)

Esempio n. 2
0
from dynamite_nsm.cmd import process_arguments
from dynamite_nsm.cmd.updates import get_action_parser

if __name__ == '__main__':
    parser = get_action_parser()
    args = parser.parse_args()
    res = None
    try:
        res = process_arguments(args,
                                component='updates',
                                interface=args.interface)
    except AttributeError:
        parser.print_help()
    if res:
        print(res)
Esempio n. 3
0
from dynamite_nsm.cmd import process_arguments
from dynamite_nsm.cmd.logstash.config import get_action_parser

if __name__ == '__main__':
    parser = get_action_parser()
    args = parser.parse_args()
    res = None
    try:
        res = process_arguments(args,
                                component='logstash',
                                interface='config',
                                sub_interface=args.sub_interface)
    except AttributeError:
        parser.print_help()
    if res:
        print(res)
Esempio n. 4
0
from dynamite_nsm.cmd import process_arguments
from dynamite_nsm.cmd.elasticsearch import get_action_parser
from dynamite_nsm.cmd.elasticsearch.config import get_action_parser as get_config_action_parser

if __name__ == '__main__':
    parser = get_action_parser()
    args = parser.parse_args()
    res = None
    try:
        res = process_arguments(args,
                                component='elasticsearch',
                                interface=args.interface,
                                sub_interface=args.sub_interface)
    except AttributeError:
        try:
            if args.interface == 'config':
                get_config_action_parser().print_help()
            else:
                try:
                    res = process_arguments(args,
                                            component='elasticsearch',
                                            interface=args.interface)
                except AttributeError:
                    parser.print_help()
        except AttributeError:
            parser.print_help()
    if res:
        print(res)
Esempio n. 5
0
from dynamite_nsm.cmd import process_arguments
from dynamite_nsm.cmd.filebeat import get_action_parser
from dynamite_nsm.cmd.filebeat.logs import get_action_parser as get_logs_action_parser
from dynamite_nsm.cmd.filebeat.config import get_action_parser as get_config_action_parser

if __name__ == '__main__':
    parser = get_action_parser()
    args = parser.parse_args()
    res = None
    try:
        res = process_arguments(args,
                                component='filebeat',
                                interface=args.interface,
                                sub_interface=args.sub_interface)
    except AttributeError:
        try:
            if args.interface == 'logs':
                get_logs_action_parser().print_help()
            elif args.interface == 'config':
                get_config_action_parser().print_help()
            else:
                try:
                    res = process_arguments(args,
                                            component='filebeat',
                                            interface=args.interface)
                except AttributeError:
                    parser.print_help()
        except AttributeError:
            parser.print_help()
    if res:
        print(res)
Esempio n. 6
0
from dynamite_nsm.cmd import process_arguments
from dynamite_nsm.cmd.zeek import get_action_parser
from dynamite_nsm.cmd.zeek.logs import get_action_parser as get_logs_action_parser
from dynamite_nsm.cmd.zeek.config import get_action_parser as get_config_action_parser

if __name__ == '__main__':
    parser = get_action_parser()
    args = parser.parse_args()
    res = None
    try:
        res = process_arguments(args,
                                component='zeek',
                                interface=args.interface,
                                sub_interface=args.sub_interface)
    except AttributeError:
        try:
            if args.interface == 'logs':
                get_logs_action_parser().print_help()
            elif args.interface == 'config':
                get_config_action_parser().print_help()
            else:
                try:
                    res = process_arguments(args,
                                            component='zeek',
                                            interface=args.interface)
                except AttributeError:
                    parser.print_help()
        except AttributeError:
            parser.print_help()
    if res:
        print(res)
Esempio n. 7
0
from dynamite_nsm import utilities
from dynamite_nsm.cmd import process_arguments
from dynamite_nsm.cmd.remote import get_action_parser

if __name__ == '__main__':
    parser = get_action_parser()
    args = parser.parse_args()
    res = process_arguments(args,
                            component='remotes',
                            interface=args.interface,
                            sub_interface=args.sub_interface)

    if res:
        print(res)
Esempio n. 8
0
from dynamite_nsm.cmd import process_arguments
from dynamite_nsm.cmd.agent import get_action_parser

if __name__ == '__main__':
    parser = get_action_parser()
    args = parser.parse_args()
    res = None
    try:
        res = process_arguments(args, component='agent', interface=args.interface)
    except AttributeError:
        parser.print_help()
    if res:
        print(res)
Esempio n. 9
0
from dynamite_nsm.cmd import process_arguments
from dynamite_nsm.cmd.updates import get_action_parser

if __name__ == '__main__':
    parser = get_action_parser()
    args = parser.parse_args()
    res = None
    try:
        res = process_arguments(args,
                                component='monitor',
                                interface=args.interface)
    except AttributeError:
        parser.print_help()
    if res:
        print(res)