def do_sniper(self, args): if len(str(args)) == 0: cprint('[!]命令sniper用法:\n\tsniper [web/host] project target', 'red') else: type = args.split()[0] project = args.split()[1] url = args.split()[2] if type in r'web': try: webInstance = webschedule(project, url, self.cookies) webInstance.runexplore(url) except Exception as e: cprint('[!]web调度错误!! 原因: {0}'.format(e)) elif type in r'host': try: hostInstence = hostschedule(project, url) hostInstence.runexplore() except Exception as e: cprint('[!]host调度错误!! 原因: {0}'.format(e)) else: cprint('[!]命令sniper用法:\n\tsniper [web/host] project target', 'red')
def routineHost(self, project, host): hostInstance = hostschedule(project, host) hostInstance.runexplore()