| 21 | create_load_payload_combobox |
| 22 | ) |
| 23 | class LoaderGUI(QWidget): |
| 24 | |
| 25 | def __init__(self): |
| 26 | super().__init__() |
| 27 | self.setWindowTitle('RustSL by echQoQ') |
| 28 | self.setMinimumWidth(650) |
| 29 | self.setWindowIcon(QIcon(os.path.join('gui', 'icons', 'icon.ico'))) |
| 30 | self.setStyleSheet(get_main_stylesheet()) |
| 31 | self.init_ui() |
| 32 | |
| 33 | def log_append(self, text): |
| 34 | self.log.append(text) |
| 35 | self.log.ensureCursorVisible() |
| 36 | |
| 37 | def init_ui(self): |
| 38 | layout = QVBoxLayout() |
| 39 | layout.setSpacing(1) |
| 40 | folder_icon = get_folder_icon() |
| 41 | |
| 42 | layout.addWidget(self._create_bin_and_payload_group(folder_icon)) |
| 43 | |
| 44 | layout.addWidget(self._create_encryption_group()) |
| 45 | |
| 46 | layout.addWidget(self._create_vm_checks_group()) |
| 47 | |
| 48 | layout.addWidget(self._create_mem_mode_group()) |
| 49 | |
| 50 | layout.addWidget(self._create_run_mode_group()) |
| 51 | |
| 52 | layout.addWidget(self._create_icon_group(folder_icon)) |
| 53 | |
| 54 | layout.addWidget(self._create_sign_group(folder_icon)) |
| 55 | |
| 56 | self.progress = QProgressBar() |
| 57 | self.progress.setValue(0) |
| 58 | layout.addWidget(self.progress) |
| 59 | |
| 60 | layout.addLayout(self._create_bottom_layout()) |
| 61 | |
| 62 | self.setLayout(layout) |
| 63 | |
| 64 | self.loading_movie = QMovie(os.path.join('gui', 'icons', 'loading.gif')) |
| 65 | self.loading_movie.setScaledSize(QSize(100, 100)) |
| 66 | self.loading_movie.frameChanged.connect(self.update_loading_icon) |
| 67 | |
| 68 | # Initial state |
| 69 | self.on_sign_changed() |
| 70 | self.on_forgery_changed() |
| 71 | self._on_load_payload_changed() |
| 72 | |
| 73 | def _create_bin_group(self, folder_icon): |
| 74 | bin_group = QGroupBox('Shellcode') |
| 75 | bin_layout = QHBoxLayout() |
| 76 | self.bin_box = BinComboBox() |
| 77 | bin_btn = QPushButton(folder_icon, '') |
| 78 | bin_btn.setToolTip('Select shellcode file') |
| 79 | bin_btn.setFixedWidth(32) |
| 80 | bin_btn.clicked.connect(lambda: self.bin_box.choose_file(self)) |