def usemodule_dns_record(self, arg): """Opens the DNS_RECORD module for configuration""" if not self.variables["domains"]: print("No domains are set! [help set domains]") elif len(self.campaign) == 0: print("No modules are set! [help usemodule]") else: dns_records.main(self.variables["domains"],self.campaign,None) addModule(dns_records.module,self.campaign) self.update_choices(self.campaign) dns_records.module={}
def do_editmodule(self, arg): """Edits a module""" #Checks the module type and pass it to the correct module for processing for idx, c in enumerate(self.campaign): if arg.id == c["id"]: mod = self.campaign.pop(idx) if c["module"] == "c2": c2.main(self.campaign, mod, self.project_id) addModule(c2.module, self.campaign) self.update_choices(self.campaign) c2.module = {} break if c["module"] == "dns_record": dns_records.main(self.variables["domains"], self.campaign, mod, self.project_id) addModule(dns_records.module, self.campaign) self.update_choices(self.campaign) dns_records.module = {} break if c["module"] == "redirector": redirector.main(mod, self.campaign, self.project_id) addModule(redirector.module, self.campaign) self.update_choices(self.campaign) redirector.module = {} break if c["module"] == "gophish": gophish.main(self.campaign, mod, self.project_id) addModule(gophish.module, self.campaign) self.update_choices(self.campaign) gophish.module = {} break if c["module"] == "letsencrypt": letsencrypt.main( self.campaign, mod, self.project_id) #self.variables["domains"] addModule(letsencrypt.module, self.campaign) self.update_choices(self.campaign) letsencrypt.module = {} break if c["module"] == "mail": mail_server.main(self.variables["domains"], self.campaign, mod, self.project_id) addModule(mail_server.module, self.campaign) self.update_choices(self.campaign) mail_server.module = {} break if c["module"] == "webserver": webserver.main(self.campaign, mod, self.project_id) addModule(webserver.module, self.campaign) self.update_choices(self.campaign) webserver.module = {} break if c["module"] == "godaddy": godaddy.main(self.campaign, self.variables["domains"], mod, self.project_id) addModule(godaddy.module, self.campaign) self.update_choices(self.campaign) godaddy.module = {} break if c["module"] == "ansible": ansible.main(self.campaign, mod, self.project_id) addModule(ansible.module, self.campaign) self.update_choices(self.campaign) ansible.module = {} break