mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-19 19:14:55 +00:00
a bit more cleanup
This commit is contained in:
parent
de51946bac
commit
aacd6d99ba
@ -589,9 +589,10 @@ final class Chrome extends Extract {
|
|||||||
List<HashMap<String, Object>> tempList = this.dbConnect(temps, LOGIN_QUERY);
|
List<HashMap<String, Object>> tempList = this.dbConnect(temps, LOGIN_QUERY);
|
||||||
logger.log(Level.INFO, "{0}- Now getting login information from {1} with {2}artifacts identified.", new Object[]{getModuleName(), temps, tempList.size()}); //NON-NLS
|
logger.log(Level.INFO, "{0}- Now getting login information from {1} with {2}artifacts identified.", new Object[]{getModuleName(), temps, tempList.size()}); //NON-NLS
|
||||||
for (HashMap<String, Object> result : tempList) {
|
for (HashMap<String, Object> result : tempList) {
|
||||||
Collection<BlackboardAttribute> bbattributes = Arrays.asList(new BlackboardAttribute(
|
Collection<BlackboardAttribute> bbattributes = Arrays.asList(
|
||||||
TSK_URL, PARENT_MODULE_NAME,
|
new BlackboardAttribute(
|
||||||
Objects.toString(result.get("origin_url"), "")), //NON-NLS
|
TSK_URL, PARENT_MODULE_NAME,
|
||||||
|
Objects.toString(result.get("origin_url"), "")), //NON-NLS
|
||||||
new BlackboardAttribute(
|
new BlackboardAttribute(
|
||||||
TSK_DATETIME_ACCESSED, PARENT_MODULE_NAME,
|
TSK_DATETIME_ACCESSED, PARENT_MODULE_NAME,
|
||||||
(Long.valueOf(result.get("last_visit_time").toString()) / 1000000) - SECONDS_SINCE_JAN_1_1601), //NON-NLS
|
(Long.valueOf(result.get("last_visit_time").toString()) / 1000000) - SECONDS_SINCE_JAN_1_1601), //NON-NLS
|
||||||
@ -624,23 +625,18 @@ final class Chrome extends Extract {
|
|||||||
this.getModuleName(), signonFile.getName()));
|
this.getModuleName(), signonFile.getName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't add TSK_OS_ACCOUNT artifacts to the ModuleDataEvent
|
Set<BlackboardAttribute> osAccountAttriubtes = Collections.singleton(
|
||||||
//TODO: Why not? Because it has a different artifact type? We can just post it seperately?
|
new BlackboardAttribute(
|
||||||
|
TSK_USER_NAME, PARENT_MODULE_NAME,
|
||||||
|
Objects.toString(result.get("username_value"), "").replaceAll("'", "''")));//NON-NLS
|
||||||
try {
|
try {
|
||||||
BlackboardAttribute osAcctAttribute = new BlackboardAttribute(TSK_USER_NAME, PARENT_MODULE_NAME,
|
|
||||||
Objects.toString(result.get("username_value"), "").replaceAll("'", "''")); //NON-NLS
|
|
||||||
BlackboardArtifact osAccountArtifact = signonFile.newArtifact(TSK_OS_ACCOUNT);
|
BlackboardArtifact osAccountArtifact = signonFile.newArtifact(TSK_OS_ACCOUNT);
|
||||||
osAccountArtifact.addAttributes(Collections.singleton(osAcctAttribute));
|
osAccountArtifact.addAttributes(osAccountAttriubtes);
|
||||||
|
bbartifacts.add(osAccountArtifact);
|
||||||
blackboard.postArtifact(osAccountArtifact, PARENT_MODULE_NAME);
|
|
||||||
|
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
logger.log(Level.SEVERE, "Error while trying to insert Chrome os account artifact.", ex); //NON-NLS
|
logger.log(Level.SEVERE, "Error while trying to insert Chrome os account artifact.", ex); //NON-NLS
|
||||||
this.addErrorMessage(NbBundle.getMessage(Chrome.class, "Chrome.getLogin.errMsg.errAnalyzingFiles",
|
this.addErrorMessage(NbBundle.getMessage(Chrome.class, "Chrome.getLogin.errMsg.errAnalyzingFiles",
|
||||||
this.getModuleName(), signonFile.getName()));
|
this.getModuleName(), signonFile.getName()));
|
||||||
} catch (Blackboard.BlackboardException ex) {
|
|
||||||
logger.log(Level.SEVERE, "Error while trying to post Chrome os account artifact.", ex); //NON-NLS
|
|
||||||
this.addErrorMessage(Bundle.Extractor_errPostingArtifacts(getModuleName()));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ class Util {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String getBaseDomain(String url) {
|
public static String getBaseDomain(String url) {
|
||||||
//TODO: There is no utility in apache or guave to do this for us?
|
//JIRA-2384: There is no utility in apache or guave to do this for us?
|
||||||
//strip protocol
|
//strip protocol
|
||||||
String cleanUrl = url.replaceFirst(".*:\\/\\/", "");
|
String cleanUrl = url.replaceFirst(".*:\\/\\/", "");
|
||||||
|
|
||||||
@ -112,7 +112,7 @@ class Util {
|
|||||||
|
|
||||||
public static String extractDomain(String value) {
|
public static String extractDomain(String value) {
|
||||||
|
|
||||||
//TODO: There is no utility in apache or guave to do this for us?
|
//JIRA-2384: There is no utility in apache or guave to do this for us?
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user