def __set__(self, instance, value):
     if not value or is_ip_address_format(value) or is_ipv6_address_format(
             value):
         self.value = self.display_value = value
     else:
         raise PocsuiteValidationException(
             "Invalid address. Provided address is not valid IPv4 or IPv6 address."
         )
Esempio n. 2
0
 def command_exploit(self, *args, **kwargs):
     self.current_module.check_requirement(self.current_module.payload_options, self.current_module.global_options)
     self._set_global_conf()
     conf.connect_back_host = self.current_module.getp_option("lhost")
     conf.connect_back_port = self.current_module.getp_option("lport")
     conf.mode = "shell"
     conf.ipv6 = is_ipv6_address_format(conf.connect_back_host)
     _set_listener()
     self._attack_mode("shell")