def __init__(self, working_dir, test_only=False): self.debug = False self.test_only = test_only self.mouse_pos = (0, 0) self.tick = 0 self.timer = -1 self.running = True self._shutdown = False self.show_fps = False self.draw_bounding_boxes = False # Texture loading glEnable(GL_TEXTURE_2D) # just in case TextureManager.init(working_dir + "/res") TextureManager.load() # Game systems init self.batch = pyg.graphics.Batch() self.background_batch = pyg.graphics.Batch() self.foreground_batch = pyg.graphics.Batch() self.entity_manager = EntityManager() self.game_director = GameDirector(self) self.game_map = Map() self.ui = UI() self.game_state = GameState.MAIN_MENU if self.test_only: return # Game director init self.game_director.init(working_dir) # Game window self.window = GameWindow( self, self.game_director.stage.map_data["pixel_width"] + constants.UI_SIDE_PANEL_SIZE, self.game_director.stage.map_data["pixel_height"]) self.fps_display = pyg.window.FPSDisplay(self.window) # Map load # self.game_director.load_stage(1, self) # Game start pyg.clock.schedule_interval( self.update, 1 / constants.FPS) # Was creating inconsistent fps
if __name__ == "__main__": if not os.path.exists("output/"): os.makedirs("output/") options = [] options.append(("gen", "Generate a malicious BMP image")) options.append(("web", "Start a web server and deliver malicious image")) options.append(("ps", "Generate Powershell payload")) options.append(("sc", "Generate shellcode from raw file")) options.append(("exit", "Quit the application")) exit_loop = False error = "" ui = UI() menu = MenuUI() while not exit_loop: try: ui.banner() choice = ui.show_menu(options, error) error = "" if menu.is_an_option(choice): mod = None if choice == "exit": exit(0) if choice == "gen": mod = GenModule(ui) if choice == "web": mod = WebModule(ui)
options = [] options.append(("gen", "Generate a malicious BMP (Bitmap) image")) options.append(("web", "Start a web server and deliver malicious image")) options.append(("ps", "Generate Powershell payload")) options.append(("sc", "Generate shellcode from raw file")) options.append( ("rawhex", "Generate Metasploit Payload + install metasploit")) options.append( ("winrawhex", "Generate Metasploit Payload + install metasploit (WINDOWS MODULE)")) options.append(("exit", "F*****g Quit the application")) exit_loop = False error = "" ui = UI() menu = MenuUI() while not exit_loop: try: ui.banner() choice = ui.show_menu(options, error) error = "" if menu.is_an_option(choice): mod = None if choice == "exit": os.system("clear") print "\033[91m ____ _ ____ " print " / ___| ___ ___ __| | __ ) _ _ ___ " print " | | _ / _ \ / _ \ / _` | _ \| | | |/ _ \ " print " | |_| | (_) | (_) | (_| | |_) | |_| | __/ "