def main():
    # instatiate the class
    orc = TaskController.Conducter()
    orc.title()
    orc.title_screen()

    TaskControler()
Exemple #2
0
def test_taskcontrollers():
    Task = TaskController.Conducter()
    Task.load_modules()
    # check inits
    for x in Task.modules:
        l = Task.modules[x]
        mod = l.ClassName('test.com', verbose=True)
    Task.ListModules()
    Task.title()
    Task.title_screen()
    #V = VersionCheck.VersionCheck("1.3")
    #V.VersionRequest()
    # test the cleaning function of the TC
    # create fake email items
    Task.ConsumerList = [
        '*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**'
    ]
    Task.HtmlList = [
        '*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**'
    ]
    finallist, htmllist = Task.CleanResults('test.com')
    # now make sure we have correct data
    i = finallist.count("*****@*****.**")
    b = htmllist.count("*****@*****.**")
    assert '*****@*****.**' in finallist
    assert '*****@*****.**' in finallist
    assert '*****@*****.**' not in finallist
    assert i < 2
    assert '*****@*****.**' in htmllist
    assert '*****@*****.**' in htmllist
    assert '*****@*****.**' not in htmllist
    assert b < 2
def TaskStarter(version):
    # Get all the options passed and pass it to the TaskConducter, this will
    # keep all the processing on the side.
    # need to pass the store true somehow to tell printer to restrict output
    log = helpers.log()
    log.start()
    cli_all, cli_domain, cli_list, cli_test, cli_scope, cli_names, cli_verify, cli_verbose = cli_parser()
    cli_domain = cli_domain.lower()
    Task = TaskController.Conducter()
    Task.load_modules()
    if cli_list:
        log.infomsg("Tasked to List Modules", "Main")
        Task.ListModules()
        V = VersionCheck.VersionCheck(version)
        V.VersionRequest()
        sys.exit(0)
    if not len(cli_domain) > 1:
        log.warningmsg("Domain not supplied", "Main")
        print helpers.color("[*] No Domain Supplied to start up!\n", warning=True)
        sys.exit(0)
    if cli_test:
        # setup a small easy test to activate certain modules
        log.infomsg("Tasked to Test Module: " + cli_test, "Main")
        V = VersionCheck.VersionCheck(version)
        V.VersionRequest()
        Task.TestModule(cli_domain, cli_test, verbose=cli_verbose,
                        scope=cli_scope, Names=cli_names, Verify=cli_verify)
    if cli_all:
        log.infomsg("Tasked to run all Modules on domain: " + cli_domain, "Main")
        V = VersionCheck.VersionCheck(version)
        V.VersionRequest()
        Task.TaskSelector(cli_domain, verbose=cli_verbose,
                          scope=cli_scope, Names=cli_names, Verify=cli_verify)
Exemple #4
0
def main():
    # instatiate the class
    version = "v1.1"
    orc = TaskController.Conducter()
    orc.title()
    orc.title_screen()
    TaskControler(version)
Exemple #5
0
def TaskControler(version):
    # Get all the options passed and pass it to the TaskConducter, this will
    # keep all the prcessing on the side.
    # need to pass the store true somehow to tell printer to restrict output
    cli_all, cli_domain, cli_list, cli_test, cli_verbose = cli_parser()
    cli_domain = cli_domain.lower()
    Task = TaskController.Conducter()
    Task.load_modules()
    if cli_list:
        Task.ListModules()
        V = VersionCheck.VersionCheck(version)
        V.VersionRequest()
        sys.exit(0)
    if not len(cli_domain) > 1:
        print helpers.color("[*] No Domain Supplied to start up!\n",
                            warning=True)
        sys.exit(0)
    if cli_test:
        # setup a small easy test to activate certain modules
        V = VersionCheck.VersionCheck(version)
        V.VersionRequest()
        Task.TestModule(cli_domain, cli_test, verbose=cli_verbose)
    if cli_all:
        V = VersionCheck.VersionCheck(version)
        V.VersionRequest()
        Task.TaskSelector(cli_domain, verbose=cli_verbose)
def TaskManger():
    # Get all the options passed and pass it to the TaskConducter, this will
    # keep all the prcessing on the side.
    # need to pass the store true somehow to tell printer to restrict output
    cli_list, cli_verbose = cli_parser()
    Task = TaskController.Conducter()
    if cli_list:
        Task.ListModules()
        sys.exit(0)
    Task.TaskSelector()
Exemple #7
0
def main():
    # instatiate the class
    try:
        config = configparser.ConfigParser()
        config.read('Common/SimplyEmail.ini')
        version = str(config['GlobalSettings']['Version'])
    except Exception as e:
        print e
    orc = TaskController.Conducter()
    orc.title()
    orc.title_screen()
    TaskControler(version)
def test_taskcontrollers():
    Task = TaskController.Conducter()
    assert Task.Modules