def init(attone, attsrc, attdetail, thread, readppp, clean, plugins): """ 花溪九尾 懒狗必备\n https://github.com/Cl0udG0d/HXnineTails """ try: if not os.path.exists(config.Save_path): os.makedirs(config.Save_path) os.makedirs(config.Xray_report_path) os.makedirs(config.Xray_temp_report_path) os.makedirs(config.CScan_report_path) os.makedirs(config.Sub_report_path) os.makedirs(config.Temp_path) os.makedirs(config.JS_report_path) except Exception as e: print(e) exit(0) print("目录初始化完成") config.ThreadNum = int(thread) if plugins: config.plugins = plugins if clean: config.delModel() sys.exit() if attone: oneFoxScan(attone) if attsrc: foxScan(attsrc) if attdetail: foxScanDetail(attdetail) if readppp: pppFoxScan(readppp) return
def main(argv): config.logo() base.init() try: opts, args = getopt.getopt(argv, "ha:s:d:r:t:c", ["help","attone=", "attsrc=","attdetail=","readppp=","thread=","clean"]) except getopt.GetoptError: config.scanHelp() sys.exit(2) for opt, arg in opts: target = arg filename = arg if opt in ("-h","--help"): config.scanHelp() sys.exit() elif opt in ("-t","--thread"): config.ThreadNum=int(arg) elif opt in ("-a", "--attone"): oneFoxScan(target) elif opt in ("-s", "--attsrc"): foxScan(target) elif opt in ("-d", "--attdetail"): foxScanDetail(target) elif opt in ("-r","--readppp"): pppFoxScan(filename) elif opt in ("-c","--clean"): config.delModel() sys.exit() else: config.scanHelp() sys.exit() SendNotice("{} 花溪九尾扫描完毕,保存文件名为 {} ".format(target,filename)) return