From 0c62c5730b4ad80875d739c5ee37adf0827b0355 Mon Sep 17 00:00:00 2001 From: tc-wleite Date: Fri, 5 Jan 2024 16:16:06 -0300 Subject: [PATCH] '#1923: Handle iOS type 10/event 5 (changed number chatting with old). --- .../resources/localization/iped-parsers-messages.properties | 1 + .../localization/iped-parsers-messages_de_DE.properties | 1 + .../localization/iped-parsers-messages_es_AR.properties | 1 + .../localization/iped-parsers-messages_it_IT.properties | 1 + .../localization/iped-parsers-messages_pt_BR.properties | 1 + .../src/main/java/iped/parsers/whatsapp/ExtractorIOS.java | 3 +++ .../src/main/java/iped/parsers/whatsapp/Message.java | 2 +- .../src/main/java/iped/parsers/whatsapp/ReportGenerator.java | 4 ++++ 8 files changed, 13 insertions(+), 1 deletion(-) diff --git a/iped-app/resources/localization/iped-parsers-messages.properties b/iped-app/resources/localization/iped-parsers-messages.properties index 5099ef11e4..bb7b898fc4 100644 --- a/iped-app/resources/localization/iped-parsers-messages.properties +++ b/iped-app/resources/localization/iped-parsers-messages.properties @@ -285,6 +285,7 @@ WhatsAppReport.GroupChangedOnlyAdminsCanSend=changed this group's settings to al WhatsAppReport.GroupOnlyAdminsCanSend=Only admins can send messages to this group. WhatsAppReport.ChangedNumberTo=change to WhatsAppReport.ChangedNumberChattingWithNew=changed their phone number. You're currently chatting with their new number. +WhatsAppReport.ChangedNumberChattingWithOld=changed their phone number to a new number. Tap to message the new number. WhatsAppReport.SenderInContacts=is in your contacts. WhatsAppReport.ChatBusinessOfficial=This chat is with an official business account. WhatsAppReport.GroupAddedToCommunity=Group was added to a community. 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 9dc30302aa..b630773d6e 100644 --- a/iped-app/resources/localization/iped-parsers-messages_de_DE.properties +++ b/iped-app/resources/localization/iped-parsers-messages_de_DE.properties @@ -285,6 +285,7 @@ WhatsAppReport.GroupChangedOnlyAdminsCanSend=changed this group's settings to al WhatsAppReport.GroupOnlyAdminsCanSend=Only admins can send messages to this group.[TBT] WhatsAppReport.ChangedNumberTo=change to[TBT] WhatsAppReport.ChangedNumberChattingWithNew=changed their phone number. You're currently chatting with their new number.[TBT] +WhatsAppReport.ChangedNumberChattingWithOld=changed their phone number to a new number. Tap to message the new number.[TBT] WhatsAppReport.SenderInContacts=is in your contacts.[TBT] WhatsAppReport.ChatBusinessOfficial=This chat is with an official business account.[TBT] WhatsAppReport.GroupAddedToCommunity=Group was added to a community.[TBT] 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 d26a382b64..ceb733fa32 100644 --- a/iped-app/resources/localization/iped-parsers-messages_es_AR.properties +++ b/iped-app/resources/localization/iped-parsers-messages_es_AR.properties @@ -285,6 +285,7 @@ WhatsAppReport.GroupChangedOnlyAdminsCanSend=changed this group's settings to al WhatsAppReport.GroupOnlyAdminsCanSend=Only admins can send messages to this group.[TBT] WhatsAppReport.ChangedNumberTo=change to[TBT] WhatsAppReport.ChangedNumberChattingWithNew=changed their phone number. You're currently chatting with their new number.[TBT] +WhatsAppReport.ChangedNumberChattingWithOld=changed their phone number to a new number. Tap to message the new number.[TBT] WhatsAppReport.SenderInContacts=is in your contacts.[TBT] WhatsAppReport.ChatBusinessOfficial=This chat is with an official business account.[TBT] WhatsAppReport.GroupAddedToCommunity=Group was added to a community.[TBT] 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 5ffc01059b..c9c2955770 100644 --- a/iped-app/resources/localization/iped-parsers-messages_it_IT.properties +++ b/iped-app/resources/localization/iped-parsers-messages_it_IT.properties @@ -285,6 +285,7 @@ WhatsAppReport.GroupChangedOnlyAdminsCanSend=changed this group's settings to al WhatsAppReport.GroupOnlyAdminsCanSend=Only admins can send messages to this group.[TBT] WhatsAppReport.ChangedNumberTo=change to[TBT] WhatsAppReport.ChangedNumberChattingWithNew=changed their phone number. You're currently chatting with their new number.[TBT] +WhatsAppReport.ChangedNumberChattingWithOld=changed their phone number to a new number. Tap to message the new number.[TBT] WhatsAppReport.SenderInContacts=is in your contacts.[TBT] WhatsAppReport.ChatBusinessOfficial=This chat is with an official business account.[TBT] WhatsAppReport.GroupAddedToCommunity=Group was added to a community.[TBT] 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 b0e083701c..08931103b1 100644 --- a/iped-app/resources/localization/iped-parsers-messages_pt_BR.properties +++ b/iped-app/resources/localization/iped-parsers-messages_pt_BR.properties @@ -285,6 +285,7 @@ WhatsAppReport.GroupChangedOnlyAdminsCanSend=mudou as configurações deste grup WhatsAppReport.GroupOnlyAdminsCanSend=Somente admins podem enviar mensagens ao grupo. WhatsAppReport.ChangedNumberTo=mudou para WhatsAppReport.ChangedNumberChattingWithNew=mudou de número de telefone. Você está em contato com o número novo neste momento. +WhatsAppReport.ChangedNumberChattingWithOld=mudou de número de telefone. Toque para enviar uma mensagem ao novo número. WhatsAppReport.SenderInContacts=está na sua lista de contatos. WhatsAppReport.ChatBusinessOfficial=Você está conversando com uma conta comercial oficial. WhatsAppReport.GroupAddedToCommunity=Grupo foi adicionado a comunidade. diff --git a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/ExtractorIOS.java b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/ExtractorIOS.java index 159447a892..eb2a693090 100644 --- a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/ExtractorIOS.java +++ b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/ExtractorIOS.java @@ -6,6 +6,7 @@ import static iped.parsers.whatsapp.Message.MessageType.BUSINESS_CHAT; import static iped.parsers.whatsapp.Message.MessageType.BUSINESS_TO_STANDARD; import static iped.parsers.whatsapp.Message.MessageType.CHANGED_NUMBER_CHATTING_WITH_NEW; +import static iped.parsers.whatsapp.Message.MessageType.CHANGED_NUMBER_CHATTING_WITH_OLD; import static iped.parsers.whatsapp.Message.MessageType.CONTACT_MESSAGE; import static iped.parsers.whatsapp.Message.MessageType.DELETED_BY_SENDER; import static iped.parsers.whatsapp.Message.MessageType.ENCRYPTION_KEY_CHANGED; @@ -749,6 +750,8 @@ protected Message.MessageType decodeMessageType(int messageType, int gEventType) result = ENCRYPTION_KEY_CHANGED; } else if (gEventType == 4) { result = MISSED_VIDEO_CALL; + } else if (gEventType == 5) { + result = CHANGED_NUMBER_CHATTING_WITH_OLD; } else if (gEventType == 6) { result = CHANGED_NUMBER_CHATTING_WITH_NEW; } else if (gEventType == 22) { diff --git a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/Message.java b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/Message.java index 85cc351b62..40d5324dd8 100644 --- a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/Message.java +++ b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/Message.java @@ -579,7 +579,7 @@ public void setOrder(MessageOrder order) { } public static enum MessageType { - TEXT_MESSAGE, IMAGE_MESSAGE, AUDIO_MESSAGE, VIDEO_MESSAGE, UNKNOWN_MEDIA_MESSAGE, CONTACT_MESSAGE, LOCATION_MESSAGE, SHARE_LOCATION_MESSAGE, VOICE_CALL, VIDEO_CALL, APP_MESSAGE, GIF_MESSAGE, BLOCKED_CONTACT, UNBLOCKED_CONTACT, BUSINESS_CHAT, BUSINESS_TO_STANDARD, MESSAGES_ENCRYPTED, MESSAGES_NOW_ENCRYPTED, ENCRYPTION_KEY_CHANGED, MISSED_VOICE_CALL, MISSED_VIDEO_CALL, DELETED_MESSAGE, DELETED_BY_ADMIN, DELETED_BY_SENDER, GROUP_CREATED, USER_JOINED_GROUP, USER_JOINED_GROUP_FROM_LINK, USERS_JOINED_GROUP, USER_LEFT_GROUP, USER_REMOVED_FROM_GROUP, URL_MESSAGE, GROUP_ICON_CHANGED, GROUP_ICON_DELETED, GROUP_DESCRIPTION_CHANGED, SUBJECT_CHANGED, YOU_ADMIN, YOU_NOT_ADMIN, WAITING_MESSAGE, STICKER_MESSAGE, REFUSED_VIDEO_CALL, REFUSED_VOICE_CALL, UNAVAILABLE_VIDEO_CALL, UNAVAILABLE_VOICE_CALL, UNKNOWN_VOICE_CALL, UNKNOWN_VIDEO_CALL, VIEW_ONCE_IMAGE_MESSAGE, VIEW_ONCE_VIDEO_MESSAGE, CALL_MESSAGE, BUSINESS_META_SECURE_SERVICE, GROUP_INVITE, TEMPLATE_MESSAGE, TEMPLATE_QUOTE, POLL_MESSAGE, EPHEMERAL_DURATION_CHANGED, EPHEMERAL_CHANGED, EPHEMERAL_DEFAULT, EPHEMERAL_SAVE, GROUP_CHANGED_ONLY_ADMINS_CAN_SEND, GROUP_CHANGED_ALL_MEMBERS_CAN_SEND, GROUP_CHANGED_ONLY_ADMINS_CAN_EDIT, GROUP_CHANGED_ALL_MEMBERS_CAN_EDIT, GROUP_ONLY_ADMINS_CAN_SEND, CHANGED_NUMBER_TO, CHANGED_NUMBER_CHATTING_WITH_NEW, STANDARD_CHAT, SENDER_IN_CONTACTS, BUSINESS_OFFICIAL, GROUP_ADDED_TO_COMMUNITY, COMMUNITY_MANAGEMENT_ACTION, UI_ELEMENTS, UI_ELEMENTS_QUOTE, CHANNEL_ADDED_PRIVACY, CHANNEL_CREATED, ORDER_MESSAGE, UNKNOWN_MESSAGE + TEXT_MESSAGE, IMAGE_MESSAGE, AUDIO_MESSAGE, VIDEO_MESSAGE, UNKNOWN_MEDIA_MESSAGE, CONTACT_MESSAGE, LOCATION_MESSAGE, SHARE_LOCATION_MESSAGE, VOICE_CALL, VIDEO_CALL, APP_MESSAGE, GIF_MESSAGE, BLOCKED_CONTACT, UNBLOCKED_CONTACT, BUSINESS_CHAT, BUSINESS_TO_STANDARD, MESSAGES_ENCRYPTED, MESSAGES_NOW_ENCRYPTED, ENCRYPTION_KEY_CHANGED, MISSED_VOICE_CALL, MISSED_VIDEO_CALL, DELETED_MESSAGE, DELETED_BY_ADMIN, DELETED_BY_SENDER, GROUP_CREATED, USER_JOINED_GROUP, USER_JOINED_GROUP_FROM_LINK, USERS_JOINED_GROUP, USER_LEFT_GROUP, USER_REMOVED_FROM_GROUP, URL_MESSAGE, GROUP_ICON_CHANGED, GROUP_ICON_DELETED, GROUP_DESCRIPTION_CHANGED, SUBJECT_CHANGED, YOU_ADMIN, YOU_NOT_ADMIN, WAITING_MESSAGE, STICKER_MESSAGE, REFUSED_VIDEO_CALL, REFUSED_VOICE_CALL, UNAVAILABLE_VIDEO_CALL, UNAVAILABLE_VOICE_CALL, UNKNOWN_VOICE_CALL, UNKNOWN_VIDEO_CALL, VIEW_ONCE_IMAGE_MESSAGE, VIEW_ONCE_VIDEO_MESSAGE, CALL_MESSAGE, BUSINESS_META_SECURE_SERVICE, GROUP_INVITE, TEMPLATE_MESSAGE, TEMPLATE_QUOTE, POLL_MESSAGE, EPHEMERAL_DURATION_CHANGED, EPHEMERAL_CHANGED, EPHEMERAL_DEFAULT, EPHEMERAL_SAVE, GROUP_CHANGED_ONLY_ADMINS_CAN_SEND, GROUP_CHANGED_ALL_MEMBERS_CAN_SEND, GROUP_CHANGED_ONLY_ADMINS_CAN_EDIT, GROUP_CHANGED_ALL_MEMBERS_CAN_EDIT, GROUP_ONLY_ADMINS_CAN_SEND, CHANGED_NUMBER_TO, CHANGED_NUMBER_CHATTING_WITH_NEW, CHANGED_NUMBER_CHATTING_WITH_OLD, STANDARD_CHAT, SENDER_IN_CONTACTS, BUSINESS_OFFICIAL, GROUP_ADDED_TO_COMMUNITY, COMMUNITY_MANAGEMENT_ACTION, UI_ELEMENTS, UI_ELEMENTS_QUOTE, CHANNEL_ADDED_PRIVACY, CHANNEL_CREATED, ORDER_MESSAGE, UNKNOWN_MESSAGE } public static enum MessageStatus { diff --git a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/ReportGenerator.java b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/ReportGenerator.java index c90d65ee61..f495819d59 100644 --- a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/ReportGenerator.java +++ b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/ReportGenerator.java @@ -585,6 +585,10 @@ private synchronized void printMessage(PrintWriter out, Message message, boolean out.println("
"); out.println(name + " " + Messages.getString("WhatsAppReport.ChangedNumberChattingWithNew") + "
"); break; + case CHANGED_NUMBER_CHATTING_WITH_OLD: + out.println("
"); + out.println(name + " " + Messages.getString("WhatsAppReport.ChangedNumberChattingWithOld") + "
"); + break; case CHANNEL_ADDED_PRIVACY: out.println("
"); out.println(Messages.getString("WhatsAppReport.ChannelAddedPrivacy") + "
");