EventMonkey.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:EventMonkey 作者: devgc 项目源码 文件源码
def Main():
    multiprocessing.freeze_support()
    Config.Config.ClearLogs()

    ###GET OPTIONS###
    arguements = GetArguements()
    options = arguements.parse_args()

    # Check if there is geodb if frozen
    if getattr(sys,'frozen',False):
        geodb_file = os.path.join(
            'geodb',
            'GeoLite2-City.mmdb'
        )

        if not os.path.isfile(geodb_file):
            if GetYesNo(("There is no geodb found, would you like to download it? "
                        "This is required for using basic Geo IP support within the "
                        "report queries. If you choose not to use this functionality "
                        "expect errors for templates that use custom functions calling "
                        "geoip functions.")):
                InitGeoDb(geodb_file)
        else:
            SqliteCustomFunctions.GEO_MANAGER.AttachGeoDbs('geodb')

    if options.subparser_name == "process":
        options.db_name = os.path.join(
            options.output_path,
            options.evidencename+'.db'
        )
        manager = WindowsEventManager.WindowsEventManager(
            options
        )
        manager.ProcessEvents()
        CreateReports(options)
    elif options.subparser_name == "report":
        CreateReports(options)
    else:
        raise(Exception("Unknown subparser: {}".format(options.subparser_name)))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号