Update: Fix loi up FW lan 2 that bai do thiet bi da duoc cai PassWord (them o nhap Backup PassWord va fallback)
This commit is contained in:
16
main.py
16
main.py
@@ -300,6 +300,19 @@ class App(QWidget):
|
||||
ssh_row1.addStretch()
|
||||
ssh_creds_layout.addLayout(ssh_row1)
|
||||
|
||||
ssh_row2 = QHBoxLayout()
|
||||
ssh_lbl3 = QLabel("Backup Pass:")
|
||||
ssh_lbl3.setStyleSheet("font-size: 12px; font-weight: bold;")
|
||||
ssh_row2.addWidget(ssh_lbl3)
|
||||
self.ssh_backup_pass_input = QLineEdit("admin")
|
||||
self.ssh_backup_pass_input.setEchoMode(QLineEdit.EchoMode.Password)
|
||||
self.ssh_backup_pass_input.setFixedWidth(130)
|
||||
self.ssh_backup_pass_input.setStyleSheet(str_qlineedit)
|
||||
self.ssh_backup_pass_input.setToolTip("Password to try if device already has a password (fallback)")
|
||||
ssh_row2.addWidget(self.ssh_backup_pass_input)
|
||||
ssh_row2.addStretch()
|
||||
ssh_creds_layout.addLayout(ssh_row2)
|
||||
|
||||
self.set_passwd_cb = QCheckBox("Set password before flash (passwd → admin123a)")
|
||||
self.set_passwd_cb.setChecked(True)
|
||||
self.set_passwd_cb.setStyleSheet("color: #94a3b8; font-size: 12px; font-weight: bold;")
|
||||
@@ -629,11 +642,13 @@ class App(QWidget):
|
||||
method = "ssh"
|
||||
ssh_user = "root"
|
||||
ssh_password = "admin123a"
|
||||
ssh_backup_password = "admin"
|
||||
set_passwd = False
|
||||
else:
|
||||
method = self.method_combo.currentData()
|
||||
ssh_user = self.ssh_user_input.text().strip() or "root"
|
||||
ssh_password = self.ssh_pass_input.text() or "admin123a"
|
||||
ssh_backup_password = self.ssh_backup_pass_input.text()
|
||||
set_passwd = self.set_passwd_cb.isChecked() if method == "ssh" else False
|
||||
|
||||
# Run flashing in background thread so UI doesn't freeze
|
||||
@@ -643,6 +658,7 @@ class App(QWidget):
|
||||
method=method,
|
||||
ssh_user=ssh_user,
|
||||
ssh_password=ssh_password,
|
||||
ssh_backup_password=ssh_backup_password,
|
||||
set_passwd=set_passwd
|
||||
)
|
||||
self.flash_thread.device_status.connect(self._on_flash_status)
|
||||
|
||||
Reference in New Issue
Block a user