Exemple #1
0
    def do_show(self, arg):
        if arg == 'options':
            if PAYLOAD.has_key('poc'):

                opts = []
                for i in PAYLOAD.poc.options.keys():
                    val = PAYLOAD.poc.options.get(i)
                    if hasattr(val, '__iter__'):
                        val = "Not Set"
                    opts.append([i, val])

                self.ui.help(
                    title="Payload Options:",
                    options=
                        opts
                        # [[i,[[j,""] for j in PAYLOAD.poc.options.get(i)]] for i in PAYLOAD.poc.options.keys()]
                    )
            if TARGET:
                self.ui.help(
                    title="Target Options:",
                    options=
                        [[i,TARGET.get(i)] for i in TARGET.keys()]
                    )
                # print "======\nTarget:\n======"
                # for i in TARGET.keys():
                #     print u"{key} => {value}".format(key=i, value=TARGET.get(i))
        else:
            Cmd.do_show(self, arg)
Exemple #2
0
    def do_show(self, arg):
        if arg == 'options':
            if PAYLOAD.has_key('poc'):

                opts = []
                for i in PAYLOAD.poc.options.keys():
                    val = PAYLOAD.poc.options.get(i)
                    if hasattr(val, '__iter__'):
                        val = "Not Set"
                    opts.append([i, val])

                self.ui.help(
                    title="Payload Options:",
                    options=opts
                    # [[i,[[j,""] for j in PAYLOAD.poc.options.get(i)]] for i in PAYLOAD.poc.options.keys()]
                )
            if TARGET:
                self.ui.help(title="Target Options:",
                             options=[[i, TARGET.get(i)]
                                      for i in TARGET.keys()])
                # print "======\nTarget:\n======"
                # for i in TARGET.keys():
                #     print u"{key} => {value}".format(key=i, value=TARGET.get(i))
        else:
            Cmd.do_show(self, arg)
Exemple #3
0
 def do_exploit(self, args):
     if PAYLOAD and PAYLOAD.has_key('poc'):
         if PAYLOAD.poc.options:
             for i in PAYLOAD.poc.options.keys():
                 if not PAYLOAD.poc.options.get(i):
                     return
         payload = PAYLOAD.poc.payload.format(self=PAYLOAD.poc)
         PAYLOAD.poc.callback(self.sendpoc(payload))
Exemple #4
0
 def do_info(self, args):
     if PAYLOAD and PAYLOAD.has_key('poc'):
         self.ui.help(
             title="Payload Info",
             options=[[i,PAYLOAD.poc.info.get(i)] for i in PAYLOAD.poc.info.keys()],
         )
     else:
         self.ui.info("Please use payload first!")
Exemple #5
0
 def do_exploit(self, args):
     if PAYLOAD and PAYLOAD.has_key('poc'):
         if PAYLOAD.poc.options:
             for i in PAYLOAD.poc.options.keys():
                 if not PAYLOAD.poc.options.get(i):
                     return
         payload = PAYLOAD.poc.payload.format(self=PAYLOAD.poc)
         PAYLOAD.poc.callback(self.sendpoc(payload))
Exemple #6
0
 def do_info(self, args):
     if PAYLOAD and PAYLOAD.has_key('poc'):
         self.ui.help(
             title="Payload Info",
             options=[[i, PAYLOAD.poc.info.get(i)]
                      for i in PAYLOAD.poc.info.keys()],
         )
     else:
         self.ui.info("Please use payload first!")