Compare commits
2 Commits
32e375b2e4
...
1.06.0725
Author | SHA1 | Date | |
---|---|---|---|
cf0288b519 | |||
ffb9a5ba5f |
@ -5,6 +5,11 @@ Changelog for shared_libs
|
|||||||
- add Info Window for user in delete logfile
|
- add Info Window for user in delete logfile
|
||||||
bevore delete logfile.
|
bevore delete logfile.
|
||||||
|
|
||||||
|
### Added
|
||||||
|
03-06-2025
|
||||||
|
|
||||||
|
- in common_tools CryptUtils.decrypt() method
|
||||||
|
remove check file .dat is exist in path.
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
03-06-2025
|
03-06-2025
|
||||||
|
@ -21,31 +21,29 @@ class CryptoUtil:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def decrypt(user, path) -> None:
|
def decrypt(user) -> None:
|
||||||
"""
|
"""
|
||||||
Starts SSL dencrypt
|
Starts SSL dencrypt
|
||||||
"""
|
"""
|
||||||
if len([file.stem for file in path.glob("*.dat")]) == 0:
|
process: CompletedProcess[str] = run(
|
||||||
pass
|
["pkexec", "/usr/local/bin/ssl_decrypt.py", "--user", user],
|
||||||
|
capture_output=True,
|
||||||
|
text=True,
|
||||||
|
check=False,
|
||||||
|
)
|
||||||
|
|
||||||
|
# Output from Openssl Error
|
||||||
|
if process.stderr:
|
||||||
|
logging.error(process.stderr, exc_info=True)
|
||||||
|
|
||||||
|
if process.returncode == 0:
|
||||||
|
logging.info("Files successfully decrypted...", exc_info=True)
|
||||||
else:
|
else:
|
||||||
process: CompletedProcess[str] = run(
|
|
||||||
["pkexec", "/usr/local/bin/ssl_decrypt.py", "--user", user],
|
logging.error(
|
||||||
capture_output=True,
|
f"Error process decrypt: Code {process.returncode}", exc_info=True
|
||||||
text=True,
|
|
||||||
check=False,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Output from Openssl Error
|
|
||||||
if process.stderr:
|
|
||||||
logging.error(process.stderr, exc_info=True)
|
|
||||||
|
|
||||||
if process.returncode == 0:
|
|
||||||
logging.info("Files successfully decrypted...", exc_info=True)
|
|
||||||
else:
|
|
||||||
logging.error(
|
|
||||||
f"Error process decrypt: Code {process.returncode}", exc_info=True
|
|
||||||
)
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def encrypt(user) -> None:
|
def encrypt(user) -> None:
|
||||||
"""
|
"""
|
||||||
|
Reference in New Issue
Block a user