added decipherall script, made use of all File objects in rootshell

This commit is contained in:
2026-08-24 04:24:02 +02:00
parent e9acbde77e
commit 5c0e0b3f9f
2 changed files with 44 additions and 2 deletions

View File

@@ -88,6 +88,7 @@ state = {
"best_user": "guest",
"best_computer": null,
"passwd_file": null,
"passwd_processed": 0,
"password_changed": 0,
}
@@ -160,10 +161,14 @@ take_file = function(f)
end for
return
end if
if f.name != "passwd" then return
if not f.has_permission("r") then return
if f.path != "/etc/passwd" then return
if not f.has_permission("r") then
note("/etc/passwd is not readable")
return
end if
state.passwd_file = f
note("file " + f.path)
crack_passwd_on(null)
end function
consider = function(of)
@@ -334,11 +339,13 @@ login_accounts = function(accounts)
end function
crack_passwd_on = function(comp)
if state.passwd_processed then return 1
content = read_passwd_text(comp)
if not content then return 0
note("reading /etc/passwd")
accounts = parse_passwd(content)
if accounts.len == 0 then return 0
state.passwd_processed = 1
login_accounts accounts
return 1
end function