def load_exploit(self, exploit_to_load):
"""Loads a given exploit to the active session
Checking for exploit validity happens in this method. The check is a
dynamic module load from the exploits module dir. If we don't get an
error, then the exploit exists. If we get an error, the exploit was
not entered correctly. Accession-by-title.
"""
#try:
exploit_module = locate("exploits." + exploit_to_load.strip() + "." + exploit_to_load.strip())
exploit_instance = exploit_module()
self.active_session.set_exploit(exploit_instance)
#except ModuleNotFoundError as mnfe:
# print ("{}\n\t[*] Entered: {}".format(INVALID_EXPLOIT_ERROR, exploit_module_name))
评论列表
文章目录