Ejemplo n.º 1
0
def single_target(options):
    try:
        utils.set_config(options)
        options['JWT'] = utils.get_jwt(options)
    except:
        utils.print_bad(
            "Fail to set config, Something went wrong with Flask API !")
        utils.print_info(
            "Visit this page for common issue: https://github.com/j3ssie/Osmedeus/wiki/Common-Issues"
        )
        sys.exit(-1)

    if not (options['JWT'] and options['JWT'] != "None"):
        utils.print_bad("Can't login to get JWT")
        sys.exit(-1)

    utils.print_target(options.get('TARGET'))

    # just disable slack noti in debug mode
    if options['DEBUG'] != "True":
        slack.slack_seperate(options)

    # run specific task otherwise run the normal routine
    if options['MODULE'] != "None":
        module = options['MODULE']
        routine.specific(options, module)

    else:
        if options['DEBUG'] == "True":
            routine.debug(options)
        else:
            routine.normal(options)
Ejemplo n.º 2
0
def single_target(options):
    print('{2}---<---<--{1}@{2} Target: {0} {1}@{2}-->--->---'.format(
        options['TARGET'], P, G))
    slack.slack_seperate(options)
    #run specific task otherwise run the normal routine
    if options['MODULE'] != "None":
        module = options['MODULE']
        routine.specific(options, module)

    else:
        if options['DEBUG'] == "True":
            routine.debug(options)
        else:
            routine.normal(options)
Ejemplo n.º 3
0
def single_target(options):
    print(
        '{2}---<---<--{1}@{2} Target: {0} {1}@{2}-->--->---'.format(options['TARGET'], P, G))

    #just disable slack noti in debug mode
    if options['DEBUG'] != "True":
        slack.slack_seperate(options)

    #run specific task otherwise run the normal routine
    if options['MODULE'] != "None":
        module = options['MODULE']
        routine.specific(options, module)

    else:
        if options['DEBUG'] == "True":
            routine.debug(options)
        else:
            routine.normal(options)