Esempio n. 1
0
def createVal(victims, modules, name):
    with open("core/sessioncache/{}".format(name), "w") as file:
        for victim in victims:
            file.write("<victim " + victim.fullurl + ">\n")
            for module in modules:
                file.write("  <module " + module + ">\n")
                if "modules" in module:
                    j = importlib.import_module(module)
                else:
                    p = bareimport(module)
                    md = p[1]
                    j = importlib.import_module(md)
                properties = j.properties
                for key, value in properties.items():
                    if value[1].strip() != "":
                        file.write("    {}:{};\n".format(key, value[1]))
                file.write("  </module>\n")
            file.write("</victim>\n")
Esempio n. 2
0
 def do_load(self, inp):
     try:
         success = False
         impmod = inp
         if "modules" in impmod:
             imp.import_module(impmod)
             success = True
         else:
             p = select.bareimport(impmod)
             success = p[0]
             impmod = p[1]
             imp.import_module(impmod)
         if success:
             vars.module = impmod
             self.prompt = '\033[0m\033[1m vaile(\033[1;31m{}\033[0m\033[1m) > '.format(vars.module.split(".")[-1])
     except ImportError:
         print(R + " [-] " + "\033[0m" + color.UNDERLINE + "\033[1m" + "Not a valid module: {}".format(inp))
     except ValueError:
         print(R + " [-] " + "\033[0m" + color.UNDERLINE + "\033[1m" + "Please enter a module.")
Esempio n. 3
0
 def do_load(self, inp):
     try:
         success = False
         impmod = inp
         if "modules" in impmod:
             imp.import_module(impmod)
             success = True
         else:
             p = select.bareimport(impmod)
             success = p[0]
             impmod = p[1]
             imp.import_module(impmod)
         if success:
             varis.module = impmod
             self.prompt = '{} vaile({}{}{}) > {}'.format(C, R, varis.module.split(".")[-1], C, color.END)
             #self.prompt = '{}`└─[{}vaile#{}{}{}]─[{}չ {}'.format(RD, C, color.END, varis.module.split(".")[-1], RD, C, color.END)
     except ImportError:
         print(R + " [-] " + "\033[0m" + color.UNDERLINE + "\033[1m" + "Not a valid module: {}".format(inp))
     except ValueError:
         print(R + " [-] " + "\033[0m" + color.UNDERLINE + "\033[1m" + "Please enter a module.")