Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Autopsy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IRT
Autopsy
Commits
13149d60
Commit
13149d60
authored
3 years ago
by
Greg DiCristofaro
Browse files
Options
Downloads
Plain Diff
Merge branch 'develop' of github.com:sleuthkit/autopsy into 8042-getOsAccounts
parents
cfa2eb48
52c30ff7
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Core/src/org/sleuthkit/autopsy/datamodel/Bundle.properties-MERGED
+3
-0
3 additions, 0 deletions
.../org/sleuthkit/autopsy/datamodel/Bundle.properties-MERGED
Core/src/org/sleuthkit/autopsy/datamodel/OsAccounts.java
+34
-11
34 additions, 11 deletions
Core/src/org/sleuthkit/autopsy/datamodel/OsAccounts.java
with
37 additions
and
11 deletions
Core/src/org/sleuthkit/autopsy/datamodel/Bundle.properties-MERGED
+
3
−
0
View file @
13149d60
...
...
@@ -356,6 +356,9 @@ OsAccounts_accountNameProperty_name=Name
OsAccounts_accountRealmNameProperty_desc=OS Account Realm Name
OsAccounts_accountRealmNameProperty_displayName=Realm Name
OsAccounts_accountRealmNameProperty_name=RealmName
OsAccounts_accountScopeNameProperty_desc=OS Account Scope Name
OsAccounts_accountScopeNameProperty_displayName=Scope
OsAccounts_accountScopeNameProperty_name=ScopeName
OsAccounts_createdTimeProperty_desc=OS Account Creation Time
OsAccounts_createdTimeProperty_displayName=Creation Time
OsAccounts_createdTimeProperty_name=creationTime
...
...
This diff is collapsed.
Click to expand it.
Core/src/org/sleuthkit/autopsy/datamodel/OsAccounts.java
+
34
−
11
View file @
13149d60
...
...
@@ -31,6 +31,8 @@
import
java.util.logging.Level
;
import
java.util.stream.Collectors
;
import
javax.swing.Action
;
import
javax.swing.SwingUtilities
;
import
org.apache.commons.lang3.StringUtils
;
import
org.openide.nodes.ChildFactory
;
import
org.openide.nodes.Children
;
import
org.openide.nodes.Node
;
...
...
@@ -206,6 +208,8 @@ public void propertyChange(PropertyChangeEvent evt) {
&&
evt
.
getNewValue
()
instanceof
AsynchOsAcctData
&&
((
AsynchOsAcctData
)
evt
.
getNewValue
()).
getOsAccountId
()
==
account
.
getId
())
{
List
<
NodeProperty
<?>>
propertiesToUpdate
=
new
ArrayList
<>();
AsynchOsAcctData
osAcctData
=
(
AsynchOsAcctData
)
evt
.
getNewValue
();
List
<
String
>
realmNames
=
osAcctData
.
getOsAcctRealm
().
getRealmNames
();
...
...
@@ -216,13 +220,22 @@ public void propertyChange(PropertyChangeEvent evt) {
.
sorted
((
a
,
b
)
->
a
.
compareToIgnoreCase
(
b
))
.
collect
(
Collectors
.
joining
(
", "
));
updateSheet
(
new
NodeProperty
<>(
propertiesToUpdate
.
add
(
new
NodeProperty
<>(
Bundle
.
OsAccounts_accountRealmNameProperty_name
(),
Bundle
.
OsAccounts_accountRealmNameProperty_displayName
(),
Bundle
.
OsAccounts_accountRealmNameProperty_desc
(),
realmNamesStr
));
}
String
scopeName
=
osAcctData
.
getOsAcctRealm
().
getScope
().
getName
();
if
(
StringUtils
.
isNotBlank
(
scopeName
))
{
propertiesToUpdate
.
add
(
new
NodeProperty
<>(
Bundle
.
OsAccounts_accountScopeNameProperty_name
(),
Bundle
.
OsAccounts_accountScopeNameProperty_displayName
(),
Bundle
.
OsAccounts_accountScopeNameProperty_desc
(),
scopeName
));
}
List
<
Host
>
hosts
=
osAcctData
.
getHosts
();
if
(!
hosts
.
isEmpty
())
{
String
hostsString
=
hosts
.
stream
()
...
...
@@ -231,13 +244,15 @@ public void propertyChange(PropertyChangeEvent evt) {
.
sorted
((
a
,
b
)
->
a
.
compareToIgnoreCase
(
b
))
.
collect
(
Collectors
.
joining
(
", "
));
updateSheet
(
new
NodeProperty
<>(
propertiesToUpdate
.
add
(
new
NodeProperty
<>(
Bundle
.
OsAccounts_accountHostNameProperty_name
(),
Bundle
.
OsAccounts_accountHostNameProperty_displayName
(),
Bundle
.
OsAccounts_accountHostNameProperty_desc
(),
hostsString
));
}
SwingUtilities
.
invokeLater
(()
->
updateSheet
(
propertiesToUpdate
.
toArray
(
new
NodeProperty
<?>[
propertiesToUpdate
.
size
()])));
}
}
};
...
...
@@ -294,6 +309,9 @@ OsAccount getOsAccount() {
"OsAccounts_accountHostNameProperty_name=HostName"
,
"OsAccounts_accountHostNameProperty_displayName=Host"
,
"OsAccounts_accountHostNameProperty_desc=OS Account Host Name"
,
"OsAccounts_accountScopeNameProperty_name=ScopeName"
,
"OsAccounts_accountScopeNameProperty_displayName=Scope"
,
"OsAccounts_accountScopeNameProperty_desc=OS Account Scope Name"
,
"OsAccounts_createdTimeProperty_name=creationTime"
,
"OsAccounts_createdTimeProperty_displayName=Creation Time"
,
"OsAccounts_createdTimeProperty_desc=OS Account Creation Time"
,
...
...
@@ -330,20 +348,25 @@ protected Sheet createSheet() {
Bundle
.
OsAccounts_loginNameProperty_displayName
(),
Bundle
.
OsAccounts_loginNameProperty_desc
(),
optional
.
isPresent
()
?
optional
.
get
()
:
""
));
// Fill with empty string, fetch on background task.
String
realmName
=
""
;
propertiesSet
.
put
(
new
NodeProperty
<>(
Bundle
.
OsAccounts_accountRealmNameProperty_name
(),
Bundle
.
OsAccounts_accountRealmNameProperty_displayName
(),
Bundle
.
OsAccounts_accountRealmNameProperty_desc
(),
realmName
));
String
hostName
=
""
;
// Fill with empty string, fetch on background task.
propertiesSet
.
put
(
new
NodeProperty
<>(
Bundle
.
OsAccounts_accountHostNameProperty_name
(),
Bundle
.
OsAccounts_accountHostNameProperty_displayName
(),
Bundle
.
OsAccounts_accountHostNameProperty_desc
(),
hostName
));
""
));
propertiesSet
.
put
(
new
NodeProperty
<>(
Bundle
.
OsAccounts_accountScopeNameProperty_name
(),
Bundle
.
OsAccounts_accountScopeNameProperty_displayName
(),
Bundle
.
OsAccounts_accountScopeNameProperty_desc
(),
""
));
propertiesSet
.
put
(
new
NodeProperty
<>(
Bundle
.
OsAccounts_accountRealmNameProperty_name
(),
Bundle
.
OsAccounts_accountRealmNameProperty_displayName
(),
Bundle
.
OsAccounts_accountRealmNameProperty_desc
(),
""
));
Optional
<
Long
>
creationTimeValue
=
account
.
getCreationTime
();
String
timeDisplayStr
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment