diff --git a/iped-app/resources/localization/iped-parsers-messages.properties b/iped-app/resources/localization/iped-parsers-messages.properties
index c9836cfa6e..3d48cc6f15 100644
--- a/iped-app/resources/localization/iped-parsers-messages.properties
+++ b/iped-app/resources/localization/iped-parsers-messages.properties
@@ -333,6 +333,10 @@ WhatsAppReport.PinnedMessage=pinned a message
WhatsAppReport.AIThirdParty=This AI is from a third-party developer. Meta receives your AI chats to improve AI quality.
WhatsAppReport.Over256MembersOnlyAdminsCanEdit=This group has over 256 members so now only admins can edit the groups settings.
WhatsAppReport.SecurityNotificationsNoLongerAvailable=Security code notifications are no longer available for this chat.
+UFEDChatParser.Broadcast=Broadcast
+UFEDChatParser.Group=Group
+UFEDChatParser.Status=Status
+UFEDChatParser.Unknown=Unknown
VCardParser.FormattedName=Formatted Name
VCardParser.Name=Name
VCardParser.Nickname=Nickname
diff --git a/iped-app/resources/localization/iped-parsers-messages_de_DE.properties b/iped-app/resources/localization/iped-parsers-messages_de_DE.properties
index 75f3839d10..53c65f6519 100644
--- a/iped-app/resources/localization/iped-parsers-messages_de_DE.properties
+++ b/iped-app/resources/localization/iped-parsers-messages_de_DE.properties
@@ -333,6 +333,10 @@ WhatsAppReport.PinnedMessage=pinned a message[TBT]
WhatsAppReport.AIThirdParty=This AI is from a third-party developer. Meta receives your AI chats to improve AI quality.[TBT]
WhatsAppReport.Over256MembersOnlyAdminsCanEdit=Diese Gruppe hat mehr als 256 Mitglieder. Daher können jetzt nur noch Admins die Gruppeneinstellungen bearbeiten.
WhatsAppReport.SecurityNotificationsNoLongerAvailable=Benachrichtigungen zur Sicherheitsnummer sind für diesen Chat nicht länger verfügbar.
+UFEDChatParser.Broadcast=Broadcast[TBT]
+UFEDChatParser.Group=Group[TBT]
+UFEDChatParser.Status=Status[TBT]
+UFEDChatParser.Unknown=Unknown[TBT]
VCardParser.FormattedName=Name formatiert
VCardParser.Name=Name
VCardParser.Nickname=Nickname
diff --git a/iped-app/resources/localization/iped-parsers-messages_es_AR.properties b/iped-app/resources/localization/iped-parsers-messages_es_AR.properties
index 8f2e03964c..657264be21 100644
--- a/iped-app/resources/localization/iped-parsers-messages_es_AR.properties
+++ b/iped-app/resources/localization/iped-parsers-messages_es_AR.properties
@@ -333,6 +333,10 @@ WhatsAppReport.PinnedMessage=pinned a message[TBT]
WhatsAppReport.AIThirdParty=This AI is from a third-party developer. Meta receives your AI chats to improve AI quality.[TBT]
WhatsAppReport.Over256MembersOnlyAdminsCanEdit=This group has over 256 members so now only admins can edit the groups settings.[TBT]
WhatsAppReport.SecurityNotificationsNoLongerAvailable=Security code notifications are no longer available for this chat.[TBT]
+UFEDChatParser.Broadcast=Broadcast[TBT]
+UFEDChatParser.Group=Group[TBT]
+UFEDChatParser.Status=Status[TBT]
+UFEDChatParser.Unknown=Unknown[TBT]
VCardParser.FormattedName=Nombre con formato
VCardParser.Name=Nombre
VCardParser.Nickname=Sobrenombre
diff --git a/iped-app/resources/localization/iped-parsers-messages_fr_FR.properties b/iped-app/resources/localization/iped-parsers-messages_fr_FR.properties
index b4f6b74443..6fb435b33d 100644
--- a/iped-app/resources/localization/iped-parsers-messages_fr_FR.properties
+++ b/iped-app/resources/localization/iped-parsers-messages_fr_FR.properties
@@ -333,6 +333,10 @@ WhatsAppReport.PinnedMessage=a epinglé un message
WhatsAppReport.AIThirdParty=Cette IA provient d'un développeur tiers. Meta reçoit vos discussions IA pour améliorer la qualité de l'IA.
WhatsAppReport.Over256MembersOnlyAdminsCanEdit=Comme ce groupe inclut plus de 256 membres, désormais, seulement les admins peuvent modifier les paramètres du groupe.
WhatsAppReport.SecurityNotificationsNoLongerAvailable=Les notifications relatives aux codes de sécurité ne sont plus disponibles pour cette discoussion.
+UFEDChatParser.Broadcast=Broadcast[TBT]
+UFEDChatParser.Group=Group[TBT]
+UFEDChatParser.Status=Status[TBT]
+UFEDChatParser.Unknown=Unknown[TBT]
VCardParser.FormattedName=Nom formaté
VCardParser.Name=Nom
VCardParser.Nickname=Surnom
diff --git a/iped-app/resources/localization/iped-parsers-messages_it_IT.properties b/iped-app/resources/localization/iped-parsers-messages_it_IT.properties
index c03a30d7e1..9fccc84fda 100644
--- a/iped-app/resources/localization/iped-parsers-messages_it_IT.properties
+++ b/iped-app/resources/localization/iped-parsers-messages_it_IT.properties
@@ -333,6 +333,10 @@ WhatsAppReport.PinnedMessage=pinned a message[TBT]
WhatsAppReport.AIThirdParty=This AI is from a third-party developer. Meta receives your AI chats to improve AI quality.[TBT]
WhatsAppReport.Over256MembersOnlyAdminsCanEdit=Dato che questo gruppo ha più di 256 membri, solo gli amministratori potranno modificarne le impostazioni.
WhatsAppReport.SecurityNotificationsNoLongerAvailable=Le notifiche sul codice di sicurezza non sono più disponibili per questa chat.
+UFEDChatParser.Broadcast=Broadcast[TBT]
+UFEDChatParser.Group=Group[TBT]
+UFEDChatParser.Status=Status[TBT]
+UFEDChatParser.Unknown=Unknown[TBT]
VCardParser.FormattedName=Nome formattato
VCardParser.Name=Nome
VCardParser.Nickname=Nickname
diff --git a/iped-app/resources/localization/iped-parsers-messages_pt_BR.properties b/iped-app/resources/localization/iped-parsers-messages_pt_BR.properties
index fae85613f2..ce941a11d9 100644
--- a/iped-app/resources/localization/iped-parsers-messages_pt_BR.properties
+++ b/iped-app/resources/localization/iped-parsers-messages_pt_BR.properties
@@ -333,6 +333,10 @@ WhatsAppReport.PinnedMessage=fixou uma mensagem
WhatsAppReport.AIThirdParty=Esta IA pertence a um desenvolvedor terceirizado. A Meta recebe suas conversas com IA para melhorar a qualidade desse recurso.
WhatsAppReport.Over256MembersOnlyAdminsCanEdit=Agora somente admins podem editar as configurações porque o grupo tem mais de 256 membros.
WhatsAppReport.SecurityNotificationsNoLongerAvailable=As notificações sobre o código de segurança não estão mais disponíveis para esta conversa.
+UFEDChatParser.Broadcast=Broadcast
+UFEDChatParser.Group=Grupo
+UFEDChatParser.Status=Status
+UFEDChatParser.Unknown=Desconhecido
VCardParser.FormattedName=Nome Formatado
VCardParser.Name=Nome
VCardParser.Nickname=Apelido
diff --git a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/telegram/ReportGenerator.java b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/telegram/ReportGenerator.java
index 6f8b16ba84..2efe13e10d 100644
--- a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/telegram/ReportGenerator.java
+++ b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/telegram/ReportGenerator.java
@@ -444,8 +444,8 @@ private static void printMessageFileHeader(PrintWriter out, String title, byte[]
+ " \n" //$NON-NLS-1$
+ " \n" //$NON-NLS-1$
+ " \n" //$NON-NLS-1$
- + " \n" //$NON-NLS-1$ //$NON-NLS-2$
+ + "\n"
+ "\n" + ""
diff --git a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/ufed/ReportGenerator.java b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/ufed/ReportGenerator.java
index 6c4ba2171d..4d904d052b 100644
--- a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/ufed/ReportGenerator.java
+++ b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/ufed/ReportGenerator.java
@@ -12,28 +12,21 @@
import iped.parsers.whatsapp.Message;
import iped.parsers.whatsapp.Util;
import iped.properties.ExtraProperties;
-import iped.search.IItemSearcher;
import iped.utils.EmojiUtil;
import iped.utils.SimpleHTMLEncoder;
/**
- *
* @author Fabio Melo Pfeifer
*/
public class ReportGenerator {
private int minChatSplitSize = 6000000;
- private final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); //$NON-NLS-1$
- private final SimpleDateFormat timeFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ssZ"); //$NON-NLS-1$
- private IItemSearcher searcher;
+ private final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
+ private final SimpleDateFormat timeFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ssZ");
private boolean firstHtml = true;
private int currentMsg = 0;
- public ReportGenerator(IItemSearcher searcher) {
- this.searcher = searcher;
- }
-
public int getNextMsgNum() {
return currentMsg;
}
@@ -48,35 +41,101 @@ private static final String format(String text) {
public byte[] generateNextChatHtml(IItemReader c, List msgs) throws UnsupportedEncodingException {
- if ((!firstHtml && currentMsg == 0) || (currentMsg > 0 && currentMsg == msgs.size()))
+ if ((!firstHtml && currentMsg == 0) || (currentMsg > 0 && currentMsg == msgs.size())) {
return null;
+ }
ByteArrayOutputStream bout = new ByteArrayOutputStream();
- PrintWriter out = new PrintWriter(new OutputStreamWriter(bout, "UTF-8")); //$NON-NLS-1$
+ PrintWriter out = new PrintWriter(new OutputStreamWriter(bout, "UTF-8"));
- String[] split = c.getName().split("_", 3); //$NON-NLS-1$
+ String[] split = c.getName().split("_", 3);
String title = split[split.length - 1];
- printMessageFileHeader(out, title, c.getName(), null);
+
+ String source = c.getMetadata().get(ExtraProperties.UFED_META_PREFIX + "Source");
+ String phoneOwner = c.getMetadata().get(ExtraProperties.UFED_META_PREFIX + "phoneOwner");
+ String idProperty = "ufedId=" + c.getMetadata().get(ExtraProperties.UFED_META_PREFIX + "id");
+ String nameProperty = c.getMetadata().get(ExtraProperties.UFED_META_PREFIX + "Name");
+ String chatType = c.getMetadata().get(ExtraProperties.UFED_META_PREFIX + "ChatType");
+ String[] parties = c.getMetadata().getValues(ExtraProperties.UFED_META_PREFIX + "Participants");
+
+ if (chatType != null) {
+ if (chatType.equals(UFEDChatParser.CHATTYPE_ONEONONE)) {
+ if (parties != null) {
+ title = ((parties.length > 1) && (parties[0].equals(phoneOwner)) ? parties[1] : parties[0]);
+ } else {
+ title = idProperty;
+ }
+
+ } else if (chatType.equals(UFEDChatParser.CHATTYPE_GROUP)) {
+ title = UFEDChatParser.CHATTYPE_GROUP_TITLE + ": " + (nameProperty != null ? nameProperty : idProperty);
+
+ } else if (chatType.equals(UFEDChatParser.CHATTYPE_BROADCAST)) {
+ if (parties != null) {
+ if ((parties.length == 1) && ((source != null) && (source.equals(UFEDChatParser.WHATSAPP)
+ || source.equals(UFEDChatParser.WHATSAPP_BUSINESS)
+ || source.equals(UFEDChatParser.TELEGRAM)))) {
+ // "Status" chat type (known from behaviour)
+ // NOTE: Apps with this behaviour should be added to this if condition
+ title = UFEDChatParser.CHATTYPE_STATUS_TITLE + ": " + parties[0];
+ } else {
+ title = UFEDChatParser.CHATTYPE_BROADCAST_TITLE + ": "
+ + (nameProperty != null ? nameProperty : idProperty);
+ }
+
+ } else {
+ title = UFEDChatParser.CHATTYPE_BROADCAST_TITLE + ": "
+ + (nameProperty != null ? nameProperty : idProperty);
+ }
+
+ } else if (chatType.equals(UFEDChatParser.CHATTYPE_UNKNOWN)) {
+ if ((source != null) && (source.equals(UFEDChatParser.WHATSAPP)
+ || source.equals(UFEDChatParser.WHATSAPP_BUSINESS) || source.equals(UFEDChatParser.TELEGRAM))) {
+ // "Unknown" chat type regarding apps for which there are specific chat types
+ // NOTE: Apps with similar behaviour should be added to this if condition
+ title = UFEDChatParser.CHATTYPE_UNKNOWN_TITLE + ": " + idProperty;
+
+ } else {
+ // "Unknown" chat type regarding apps for which there aren't specific chat types
+ // Communication type is derived from the number of participants
+ if ((parties != null) && (parties.length > 0)) {
+ if (parties.length > 2) {
+ title = UFEDChatParser.CHATTYPE_GROUP_TITLE + ": " + idProperty;
+ } else {
+ title = parties.length > 1 && parties[0].equals(phoneOwner) ? parties[1] : parties[0];
+ }
+
+ } else {
+ title = UFEDChatParser.CHATTYPE_UNKNOWN_TITLE + ": " + idProperty;
+ }
+ }
+ } else {
+ title = chatType + ": " + idProperty;
+ }
+
+ } else {
+ title = idProperty;
+ }
+
+ printMessageFileHeader(out, title, c.getName(), null, source);
if (currentMsg > 0)
- out.println("