The Keyring Update

This commit is contained in:
vyvir
2024-12-23 14:22:37 +02:00
parent 9ada88f31a
commit fe7eed02aa
2 changed files with 14 additions and 17 deletions
+4 -4
View File
@@ -19,21 +19,21 @@ sudo add-apt-repository universe -y
```
```
sudo apt-get install binutils python3-pip python3-requests git gir1.2-appindicator3-0.1 usbmuxd libimobiledevice6 libimobiledevice-utils wget curl libavahi-compat-libdnssd-dev zlib1g-dev unzip usbutils libhandy-1-dev gir1.2-notify-0.7 python3-requests psmisc
sudo apt-get install binutils python3-pip python3-requests python3-keyring git gir1.2-appindicator3-0.1 usbmuxd libimobiledevice6 libimobiledevice-utils wget curl libavahi-compat-libdnssd-dev zlib1g-dev unzip usbutils libhandy-1-dev gir1.2-notify-0.7 psmisc
```
Fedora:
```
sudo dnf install binutils python3-pip python3-requests git libappindicator-gtk3 usbmuxd libimobiledevice-devel libimobiledevice-utils wget curl avahi-compat-libdns_sd-devel dnf-plugins-core unzip usbutils psmisc
sudo dnf install binutils python3-pip python3-requests python3-keyring git libappindicator-gtk3 usbmuxd libimobiledevice-devel libimobiledevice-utils wget curl avahi-compat-libdns_sd-devel dnf-plugins-core unzip usbutils psmisc
```
Arch Linux:
```
sudo pacman -S binutils wget curl git python-pip python-requests python-gobject libappindicator-gtk3 usbmuxd libimobiledevice avahi zlib unzip usbutils psmisc libhandy
sudo pacman -S binutils wget curl git python-pip python-requests python-gobject python-keyring libappindicator-gtk3 usbmuxd libimobiledevice avahi zlib unzip usbutils psmisc libhandy
```
OpenSUSE:
```
sudo zypper in binutils wget curl git python311-pip python311-requests python311-gobject-Gdk libhandy-devel libappindicator3-1 typelib-1_0-AppIndicator3-0_1 imobiledevice-tools libdns_sd libnotify-devel psmisc
sudo zypper in binutils wget curl git python311-pip python311-requests python311-keyring python311-gobject-Gdk libhandy-devel libappindicator3-1 typelib-1_0-AppIndicator3-0_1 imobiledevice-tools libdns_sd libnotify-devel psmisc
```
### Running althea
+10 -13
View File
@@ -10,6 +10,7 @@ import requests
import subprocess
import signal
import threading
import keyring
from time import sleep
import platform
@@ -250,28 +251,27 @@ def use_saved_credentials():
if response == Gtk.ResponseType.YES:
global apple_id
global password
f = open(f"{(altheapath)}/saved.txt", "r")
for line in f:
apple_id, password = line.strip().split(' ')
f.close()
apple_id = keyring.get_password("althea", "apple_id")
password = keyring.get_password("althea", "password")
print(apple_id, password)
global savedcheck
savedcheck = True
Login().on_click_me_clicked1()
else:
silent_remove(f"{(altheapath)}/saved.txt")
apple_id = keyring.delete_password("althea", "apple_id")
password = keyring.delete_password("althea", "password")
win3 = Login()
win3.show_all()
dialog.destroy()
def win1():
if os.path.isfile(f"{(altheapath)}/saved.txt"):
if keyring.get_password("althea", "apple_id"):
use_saved_credentials()
else:
openwindow(Login)
def win2(_):
if os.path.isfile(f"{(altheapath)}/saved.txt"):
if keyring.get_password("althea", "apple_id"):
use_saved_credentials()
else:
openwindow(Login)
@@ -522,7 +522,7 @@ class Login(Gtk.Window):
def on_click_me_clicked(self, button):
silent_remove(f"{(altheapath)}/log.txt")
if not os.path.isfile(f"{(altheapath)}/saved.txt"):
if not keyring.get_password("althea", "apple_id"):
self.set_position(Gtk.WindowPosition.CENTER_ALWAYS)
dialog = Gtk.MessageDialog(
transient_for=self,
@@ -536,11 +536,8 @@ class Login(Gtk.Window):
if response == Gtk.ResponseType.YES:
apple_id = self.entry1.get_text().lower()
password = self.entry.get_text()
f = open(f"{(altheapath)}/saved.txt", "x")
f.write(apple_id)
f.write(" ")
f.write(password)
f.close()
keyring.set_password("althea", "apple_id", apple_id)
keyring.set_password("althea", "password", password)
dialog.destroy()
self.entry.set_progress_pulse_step(0.2)
# Call self.do_pulse every 100 ms