You've already forked greyhack
added decipherall script, made use of all File objects in rootshell
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user