fix: replace lastlog2 with lastlog for SSH login information and clean up related dependencies
Some checks failed
Nix Format Check / check-format (push) Failing after 38s
Some checks failed
Nix Format Check / check-format (push) Failing after 38s
This commit is contained in:
@@ -12,8 +12,7 @@ from helpers.functions import printfe, logo, _rainbow_color, COLORS
|
||||
def get_last_ssh_login():
|
||||
"""Get information about the last SSH login"""
|
||||
try:
|
||||
# Using lastlog2 to get the last login information
|
||||
result = subprocess.run(['lastlog2', '-u', os.environ.get("USER", "")],
|
||||
result = subprocess.run(['lastlog', '-u', os.environ.get("USER", "")],
|
||||
capture_output=True, text=True)
|
||||
if result.returncode == 0:
|
||||
lines = result.stdout.strip().split('\n')
|
||||
|
Reference in New Issue
Block a user