Exemplo n.º 1
0
def domain_task(options):
    """常规域名任务"""
    target = options["target"]
    task_options = options["options"]
    task_id = options["task_id"]
    item = utils.conn_db('task').find_one({"_id": ObjectId(task_id)})
    if not item:
        logger.info("domain_task not found {} {}".format(target, item))
        return
    wrap_tasks.domain_task(target, task_id, task_options)
Exemplo n.º 2
0
def arl_task(options):
    try:
        target = options["target"]
        task_options = options["options"]
        task_id = options["task_id"]
        logger.info(options)
        task_type = options["type"]
        if task_type == "domain":
            wrap_tasks.domain_task(target, task_id, task_options)
        if task_type == "ip":
            wrap_tasks.ip_task(target, task_id, task_options)

    except Exception as e:
        logger.exception(e)
Exemplo n.º 3
0
def arl_task(options):
    signal.signal(signal.SIGTERM, utils.exit_gracefully)
    try:
        target = options["target"]
        task_options = options["options"]
        task_id = options["task_id"]
        logger.info(options)
        task_type = options["type"]
        if task_type == "domain":
            wrap_tasks.domain_task(target, task_id, task_options)
        if task_type == "ip":
            wrap_tasks.ip_task(target, task_id, task_options)

    except Exception as e:
        logger.exception(e)