def run(self, id, payload, **kwargs): print_info("Attempting to run id ({}) configured with payload ({})".format(id, payload)) for i in functions: #if i == 'uac' and not self.uac or i == 'persist' and not self.persist or i == 'elevate' and not self.elevate: if i == 'uac' and not self.uac or i == 'persist' and not self.persist or i == 'elevate' and not self.elevate or i == 'execute' and not self.execute: continue for info in functions[i]: if id in str(info["Id"]): if int(info["Works From"]) <= int(information().build_number()) < int(info["Fixed In"]): f = globals()[info["Function Name"]] # if name is not needed in function, just keep goin if 'name' not in f.__code__.co_varnames and 'add' in f.__code__.co_varnames: f(payload, add=kwargs.get('add', True)) # if name is needed for the function to run, just add a dummy # this is mainly to support pupy intergration, wich needs custom # names in order to work. elif 'name' in f.__code__.co_varnames and 'add' in f.__code__.co_varnames: f(payload, name=kwargs.get('name', 'WinPwnage'), add=kwargs.get('add', True)) # if function only needs payload as argument, eg. uac functions else: f(payload) else: print_error('Technique not compatible with this system.') return Constant.output else: pass
def run(self, id, payload, **kwargs): print_info( "Attempting to run method ({id}) configured with payload ({payload})" .format(id=id, payload=payload)) for i in functions: if i == "uac" and not self.uac or i == "persist" and not self.persist or i == "elevate" and not self.elevate: continue for info in functions[i]: if id in str(info["Id"]): if int(info["Works From"]) <= int( information().build_number()) < int( info["Fixed In"]): f = globals()[info["Function Name"]] if "name" not in f.__code__.co_varnames and "add" in f.__code__.co_varnames: f(payload, add=kwargs.get("add", True)) elif "name" in f.__code__.co_varnames and "add" in f.__code__.co_varnames: f(payload, name=kwargs.get("name", "WinPwnage"), add=kwargs.get("add", True)) else: f(payload) else: print_error( "Technique not compatible with this system.") return Constant.output else: pass
def run(self, id, payload, **kwargs): print_info("Attempting to run id ({}) configured with payload ({})".format(id, payload)) for i in functions: if i == 'uac' and not self.uac or i == 'persist' and not self.persist: continue for info in functions[i]: if id in str(info["Id"]): if int(info["Works From"]) <= int(information().build_number()) < int(info["Fixed In"]): f = globals()[info["Function Name"]] if 'name' in f.__code__.co_varnames and 'add' in f.__code__.co_varnames: f(payload, name=kwargs.get('name', ''), add=kwargs.get('add', True)) else: f(payload) else: print_error('Technique not compatible with this system.') return Constant.output else: pass
def run(self, id, payload): print_info( "Attempting to run id ({}) configured with payload ({})".format( id, payload)) for i in functions: if i == 'uac' and not self.uac or i == 'persist' and not self.persist: continue for info in functions[i]: if id in str(info["Id"]): if int(info["Works From"]) <= int( information().build_number()) < int( info["Fixed In"]): globals()[info["Function Name"]](os.path.join(payload)) else: print_error( 'Technique not compatible with this system.') return Constant.output else: pass return False