Skip to content
Snippets Groups Projects
Commit 3d1063ad authored by U-BASIS\dsmyda's avatar U-BASIS\dsmyda
Browse files

Create account instances from web form address emails and phones

parent 8de7596e
No related branches found
No related tags found
No related merge requests found
......@@ -25,10 +25,11 @@
import java.util.Collections;
import java.util.StringTokenizer;
import org.apache.commons.lang3.StringUtils;
import org.sleuthkit.datamodel.AbstractFile;
import org.sleuthkit.datamodel.Account;
import org.sleuthkit.datamodel.Blackboard.BlackboardException;
import org.sleuthkit.datamodel.BlackboardArtifact;
import org.sleuthkit.datamodel.BlackboardAttribute;
import org.sleuthkit.datamodel.CommunicationsManager;
import org.sleuthkit.datamodel.Content;
import org.sleuthkit.datamodel.SleuthkitCase;
import org.sleuthkit.datamodel.TskCoreException;
......@@ -296,6 +297,15 @@ public BlackboardArtifact addWebFormAddress(String personName, String email,
BlackboardArtifact webFormAddressArtifact;
Collection<BlackboardAttribute> attributes = new ArrayList<>();
CommunicationsManager commManager = this.getSleuthkitCase().getCommunicationsManager();
if(StringUtils.isNotBlank(email)) {
commManager.createAccountFileInstance(Account.Type.EMAIL, email, this.getModuleName(), this.getContent());
}
if(StringUtils.isNotBlank(phoneNumber)) {
commManager.createAccountFileInstance(Account.Type.PHONE, phoneNumber, this.getModuleName(), this.getContent());
}
// create artifact
webFormAddressArtifact = getContent().newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_FORM_ADDRESS);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment