Пример #1
0
 def _options(self):
     opt = OrderedDict()  # value = self.get_option('key')
     opt["string"] = OptString("", description="这个poc需要用户登录,请输入登录账号", require=True)
     opt["integer"] = OptInteger(
         "", description="这个poc需要用户密码,请输出用户密码", require=False
     )
     return opt
Пример #2
0
    def __init__(self):
        self.type = None
        self.target = None
        self.headers = None
        self.url = None
        self.mode = None
        self.params = None
        self.verbose = None
        self.expt = (0, 'None')
        self.current_protocol = getattr(self, "protocol",
                                        POC_CATEGORY.PROTOCOL.HTTP)
        self.pocDesc = getattr(self, "pocDesc", "Poc的作者好懒呀!")

        # gloabl options init
        self.global_options = OrderedDict()
        if self.current_protocol == POC_CATEGORY.PROTOCOL.HTTP:
            self.global_options["target"] = OptString(
                "",
                "Target HTTP, IPv4, IPv6 address or file with ip:port (file://)",
                require=True)
            self.global_options["referer"] = OptString(
                "", "HTTP Referer header value")
            self.global_options["agent"] = OptString(
                "", "HTTP User-Agent header value")
            self.global_options["proxy"] = OptString(
                "", "Use a proxy to connect to the target URL")
            self.global_options["timeout"] = OptInteger(
                30, "Seconds to wait before timeout connection (default 30)")
        else:
            self.global_options["rhost"] = OptString('', require=True)
            self.global_options["rport"] = OptPort('', require=True)
            self.global_options["ssl"] = OptBool(default=False)

        # payload options for exploit
        self.payload_options = OrderedDict()
        if hasattr(self, "_shell"):
            self.payload_options["lhost"] = OptString('',
                                                      "Connect back ip",
                                                      require=True)
            self.payload_options["lport"] = OptPort(10086, "Connect back port")

        self.options = OrderedDict()
        # module options init
        if hasattr(self, "_options"):
            self.options.update(self._options())
Пример #3
0
 def _options(self):
     o = OrderedDict()
     o["ssh_burst_threads"] = OptInteger(
         4, description='set ssh_burst_threads', require=False)
     return o