From 729defb418b6ddfe774729fa9193a3881521493c Mon Sep 17 00:00:00 2001 From: Marcos Moura Date: Sat, 16 Mar 2024 22:56:22 -0300 Subject: [PATCH 01/30] #1: fix UFDR attachment's extracted path --- .../iped/engine/datasource/UfedXmlReader.java | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/iped-engine/src/main/java/iped/engine/datasource/UfedXmlReader.java b/iped-engine/src/main/java/iped/engine/datasource/UfedXmlReader.java index d8445ca6a1..c3efb6e8e8 100644 --- a/iped-engine/src/main/java/iped/engine/datasource/UfedXmlReader.java +++ b/iped-engine/src/main/java/iped/engine/datasource/UfedXmlReader.java @@ -118,6 +118,9 @@ public class UfedXmlReader extends DataSourceReader { private static final String ESCAPED_UFED_ID = QueryBuilder.escape(UFED_ID); private static final String EMPTY_EXTRACTION_STR = "-"; + private static final String FILE_ID_ATTR = ExtraProperties.UFED_META_PREFIX + "file_id"; //$NON-NLS-1$ + private static final String LOCAL_PATH_META = ExtraProperties.UFED_META_PREFIX + "local_path"; //$NON-NLS-1$ + private final Set supportedApps = new HashSet( Arrays.asList(WhatsAppParser.WHATSAPP, TelegramParser.TELEGRAM, WhatsAppParser.WHATSAPP + " Business")); @@ -133,6 +136,7 @@ public class UfedXmlReader extends DataSourceReader { HashMap pathToParent = new HashMap<>(); boolean ignoreSupportedChats = false; HashMap ufdrPathToUfedId = new HashMap<>(); + HashMap ufedFileIdToLocalPath = new HashMap<>(); // used to replace non-existent attachment extracted path by local path private final List deviceInfoData = new ArrayList(); private HashSet addedImUfedIds = new HashSet<>(); private HashSet addedTrackIds = new HashSet<>(); @@ -405,7 +409,6 @@ private XmlNode(String element, Attributes atts) { )); HashSet ignoreNameAttrs = new HashSet<>(Arrays.asList("Tags", //$NON-NLS-1$ - "Local Path", //$NON-NLS-1$ "CreationTime", //$NON-NLS-1$ "ModifyTime", //$NON-NLS-1$ "AccessTime", //$NON-NLS-1$ @@ -722,7 +725,15 @@ public void endElement(String uri, String localName, String qName) throws SAXExc item.setCategory(chars.toString()); } else if ("Local Path".equals(nameAttr)) { //$NON-NLS-1$ - setContent(item, normalizePaths(chars.toString())); + String normalizedPath = normalizePaths(chars.toString()); + setContent(item, normalizedPath); + + // Add "Local Path" to item metadata + item.getMetadata().add(LOCAL_PATH_META, normalizedPath); + + // Add key to map item id to "Local Path" + ufedFileIdToLocalPath.put(item.getMetadata().get(UFED_ID), normalizedPath); + if (item.getPath().endsWith("wireless/Library/Databases/CellularUsage.db")) { parseIphoneSimSwitch(item); } @@ -1390,6 +1401,18 @@ private String handleAttachment(Item item) { if (extracted_path != null) { extracted_path = normalizePaths(extracted_path); ufedId = ufdrPathToUfedId.get(extracted_path); + + // If extracted path doesn't exist, replace non-existent extracted path by attached file's local path + if (!getUISF().entryExists(extracted_path)) { + // Debug messages + // System.out.println("Attachment path problem : extracted path (non-existent) will be replaced by local path -> " + item.getPath()); + // System.out.println(" extracted path -> " + extracted_path); + // System.out.println(" local path -> " + ufedFileIdToLocalPath.get(item.getMetadata().get(FILE_ID_ATTR))); + + // Replace extracted path by attached file's local path + extracted_path = ufedFileIdToLocalPath.get(item.getMetadata().get(FILE_ID_ATTR)); + } + } setContent(item, extracted_path); return ufedId; From e853fe7601a8ce06afc7f7375858836fe315e8f5 Mon Sep 17 00:00:00 2001 From: Marcos Moura Date: Tue, 19 Mar 2024 21:56:03 -0300 Subject: [PATCH 02/30] #1: fix UFDR attachment's extracted path --- .../src/main/java/iped/engine/datasource/UfedXmlReader.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/iped-engine/src/main/java/iped/engine/datasource/UfedXmlReader.java b/iped-engine/src/main/java/iped/engine/datasource/UfedXmlReader.java index c3efb6e8e8..0ab84ffddf 100644 --- a/iped-engine/src/main/java/iped/engine/datasource/UfedXmlReader.java +++ b/iped-engine/src/main/java/iped/engine/datasource/UfedXmlReader.java @@ -1404,11 +1404,6 @@ private String handleAttachment(Item item) { // If extracted path doesn't exist, replace non-existent extracted path by attached file's local path if (!getUISF().entryExists(extracted_path)) { - // Debug messages - // System.out.println("Attachment path problem : extracted path (non-existent) will be replaced by local path -> " + item.getPath()); - // System.out.println(" extracted path -> " + extracted_path); - // System.out.println(" local path -> " + ufedFileIdToLocalPath.get(item.getMetadata().get(FILE_ID_ATTR))); - // Replace extracted path by attached file's local path extracted_path = ufedFileIdToLocalPath.get(item.getMetadata().get(FILE_ID_ATTR)); } From c157e67e47389c305eec6d624a323ebc3c12206e Mon Sep 17 00:00:00 2001 From: tc-wleite Date: Wed, 10 Apr 2024 18:08:24 -0300 Subject: [PATCH 03/30] '#2160: Sort by hash when reading NSRL databases to optimize importing. --- .../src/main/java/iped/engine/hashdb/HashDBTool.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/iped-engine/src/main/java/iped/engine/hashdb/HashDBTool.java b/iped-engine/src/main/java/iped/engine/hashdb/HashDBTool.java index a29ede0715..36d7688f9b 100644 --- a/iped-engine/src/main/java/iped/engine/hashdb/HashDBTool.java +++ b/iped-engine/src/main/java/iped/engine/hashdb/HashDBTool.java @@ -911,7 +911,11 @@ private boolean readNsrlDb(File file) { byte[][] prevHashes = new byte[hashTypes.length][]; byte[][] hashes = new byte[hashTypes.length][]; Map> properties = new HashMap>(); - stmt.execute(nsrlDBSelectHashes); + + // Sort by MD5, so records related to the same hashes are treated sequentially + // to speed up importing, specially for "full" versions of RDS hash sets. + // See issue #2160. + stmt.execute(nsrlDBSelectHashes + " order by md5"); stmt.setFetchSize(65536); rs = stmt.getResultSet(); int cnt = 0; From ed98a4c8e3984edb98403b39c5b9ef52f6217116 Mon Sep 17 00:00:00 2001 From: tc-wleite Date: Fri, 12 Apr 2024 19:50:19 -0300 Subject: [PATCH 04/30] '#1568: Icon to Chrome Cache category. --- .../resources/iped/app/ui/cat/Chrome Cache.png | Bin 0 -> 1182 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 iped-app/src/main/resources/iped/app/ui/cat/Chrome Cache.png diff --git a/iped-app/src/main/resources/iped/app/ui/cat/Chrome Cache.png b/iped-app/src/main/resources/iped/app/ui/cat/Chrome Cache.png new file mode 100644 index 0000000000000000000000000000000000000000..525601a947e62eecda7fad182b1d2a60ba74daa3 GIT binary patch literal 1182 zcmV;P1Y!G$P)5MoX1Qi+LC_}))K#>83-ff#O7c{#?w-1|%nvErkhD=?yeV9=77B}37{gZ$C2rp=ibcp=ZH==**Ch}VZ`<6o3UQ(cUg9Q46pRoT1zz(EFkU zeVf*!?`0)3ZQNHRLrFg+?E zI3hLa! zJsuC7R~BO6>H@g0&&R0du}P0~JdUxkvCshq1_t~9+Lp#nLO7f*Y(Cn7x4ylN?Z@w6 z$M<)zwfr`=klf(lpkHHO09rF-0He|92S9xzItCrfo`zz-8bycO@amCv215NBi8q$E zL3uzO)O-Sf)(jb-^wMD{&-nvfSR4herx*DjUuFNL%?dxIz6lkHX^viVI-NlP_ixRG zPQ5d9fI}BQgYv9D0JX(pMaG`X$oilexgWN$hSa$qwXj^~-X_@W{lNh3Pe6Mu3;?ZG z3&m+!&@#MGE&%VndZd(`2mk#>r0>4OoJL}rOC;9+57t1?&ZC zU6&q_o4-Qz>t$F%97ST2*%I9R);tW|h=8Lpn$-*$fNIaFy^x)hPPr5lzN^(itLuWe zN(@1nFrfKdHubJ6PeIcV=0QY7pJ~xI;y)qCOem*-ke`+^0N*vg-#!l>bp&Z139f!Q zs}(i?l}@LFs7wrL6-V%kd4%EY9+Ll&*0bc1T Date: Fri, 12 Apr 2024 20:02:05 -0300 Subject: [PATCH 05/30] Specialized icons for x-chrome-sqlite and x-safari-sqlite. --- .../src/main/java/iped/app/ui/IconManager.java | 8 ++++++++ .../resources/iped/app/ui/mime/chrome-sqlite.png | Bin 0 -> 2227 bytes .../resources/iped/app/ui/mime/safari-sqlite.png | Bin 0 -> 2423 bytes 3 files changed, 8 insertions(+) create mode 100644 iped-app/src/main/resources/iped/app/ui/mime/chrome-sqlite.png create mode 100644 iped-app/src/main/resources/iped/app/ui/mime/safari-sqlite.png diff --git a/iped-app/src/main/java/iped/app/ui/IconManager.java b/iped-app/src/main/java/iped/app/ui/IconManager.java index dc60874265..df29a54054 100644 --- a/iped-app/src/main/java/iped/app/ui/IconManager.java +++ b/iped-app/src/main/java/iped/app/ui/IconManager.java @@ -333,6 +333,10 @@ private static Map initMimeToIconMap(int size) { mimeIconMap.put("application/x-ufed-visitedpage", icon); mimeIconMap.put("application/x-safari-history-registry", icon); mimeIconMap.put("application/x-safari-history", icon); + } + + icon = availableIconsMap.get("safari-sqlite"); + if (icon != null) { mimeIconMap.put("application/x-safari-sqlite", icon); } @@ -343,6 +347,10 @@ private static Map initMimeToIconMap(int size) { mimeIconMap.put("application/x-chrome-downloads", icon); mimeIconMap.put("application/x-chrome-history", icon); mimeIconMap.put("application/x-chrome-searches", icon); + } + + icon = availableIconsMap.get("chrome-sqlite"); + if (icon != null) { mimeIconMap.put("application/x-chrome-sqlite", icon); } diff --git a/iped-app/src/main/resources/iped/app/ui/mime/chrome-sqlite.png b/iped-app/src/main/resources/iped/app/ui/mime/chrome-sqlite.png new file mode 100644 index 0000000000000000000000000000000000000000..0cda4bd7ba39984880b6d76d7466e026ffa63914 GIT binary patch literal 2227 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 BA!Psn literal 0 HcmV?d00001 diff --git a/iped-app/src/main/resources/iped/app/ui/mime/safari-sqlite.png b/iped-app/src/main/resources/iped/app/ui/mime/safari-sqlite.png new file mode 100644 index 0000000000000000000000000000000000000000..eff30bddb1a05c70404abb8e778e492b9726008d GIT binary patch literal 2423 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 literal 0 HcmV?d00001 From 211b40565da779afc7dca66224ef60e70374783a Mon Sep 17 00:00:00 2001 From: tc-wleite Date: Fri, 12 Apr 2024 20:16:21 -0300 Subject: [PATCH 06/30] Icon for p7s extension. --- .../src/main/resources/iped/app/ui/file/p7s.png | Bin 0 -> 736 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 iped-app/src/main/resources/iped/app/ui/file/p7s.png diff --git a/iped-app/src/main/resources/iped/app/ui/file/p7s.png b/iped-app/src/main/resources/iped/app/ui/file/p7s.png new file mode 100644 index 0000000000000000000000000000000000000000..110a63c71843ee36c0b7e653b4b93848f8ab8375 GIT binary patch literal 736 zcmV<60w4W}P)uwT36oC6UybMIj#gtn7Q=sAxt$hI!r3D%j1*#Ea!V8pEeF1&|%f*JYAeX8QcH3@g zbqj@pT*7hBBp}O@1%_fwoa771W@paFoXgJ5{mVHy>oaQiJ<#HXFSJ zZpRP>7gsaMx!Ajolf_#+t)!gB-kJ;D^@sW&*=o} z_4-ge-YrQWtOcF^F8M{UJKp%-k-*f0s8*{<7#>^+KHpnt3Ta_a&xCxlP`<8`Hk|5P zP_0%)Jbh*#nsbNK1^Ij)GTAH{PWuNbGKi-B7E~&g9&Wc+6x?jKkRsgP4v-ebg~JIa zX8$0X>ITZ?G9eaENdCFQ;Ut}a?Km@mQmI5>qOo3JgJF^6I}q4`OeO Date: Fri, 12 Apr 2024 20:32:08 -0300 Subject: [PATCH 07/30] Icon for text/x-web-markdown. --- .../src/main/java/iped/app/ui/IconManager.java | 5 +++++ .../main/resources/iped/app/ui/mime/markdown.png | Bin 0 -> 409 bytes 2 files changed, 5 insertions(+) create mode 100644 iped-app/src/main/resources/iped/app/ui/mime/markdown.png diff --git a/iped-app/src/main/java/iped/app/ui/IconManager.java b/iped-app/src/main/java/iped/app/ui/IconManager.java index df29a54054..2c4f9bc3d2 100644 --- a/iped-app/src/main/java/iped/app/ui/IconManager.java +++ b/iped-app/src/main/java/iped/app/ui/IconManager.java @@ -615,6 +615,11 @@ private static Map initMimeToIconMap(int size) { mimeIconMap.put("application/x-vlc-ini", icon); } + icon = availableIconsMap.get("markdown"); + if (icon != null) { + mimeIconMap.put("text/x-web-markdown", icon); + } + return mimeIconMap; } diff --git a/iped-app/src/main/resources/iped/app/ui/mime/markdown.png b/iped-app/src/main/resources/iped/app/ui/mime/markdown.png new file mode 100644 index 0000000000000000000000000000000000000000..a7ab4c943d93310eead6149462d4f880e178a684 GIT binary patch literal 409 zcmV;K0cQS*P)MqW&el_QPPIsQ}%xOd-kw}%$3`_74J{ha`*n^EiY`}Xs2aCoo zz!$hIL>X@Lz?cKL!-F#1;(;+G$tW--$#YU?Y3}KhG+zxer9;wuCdib`0*mm&`3^@Z zYl7F5pHk-Omo#4sG9_05^%=IqI(Qgl|589bgXq%HkIsXItf?iPOeS;IUFLwcDz|EDP3Mg&x)@9!5 zFFXENfcdR}(j&>q(R@D0l*|G}Nk1NAH1}u$pC1L8X9%uH@@|A=7O Date: Fri, 12 Apr 2024 20:58:29 -0300 Subject: [PATCH 08/30] Icons to UFED notifications and mobile cards. --- .../src/main/java/iped/app/ui/IconManager.java | 10 ++++++++++ .../resources/iped/app/ui/mime/mobilecard.png | Bin 0 -> 1236 bytes .../resources/iped/app/ui/mime/notification.png | Bin 0 -> 815 bytes 3 files changed, 10 insertions(+) create mode 100644 iped-app/src/main/resources/iped/app/ui/mime/mobilecard.png create mode 100644 iped-app/src/main/resources/iped/app/ui/mime/notification.png diff --git a/iped-app/src/main/java/iped/app/ui/IconManager.java b/iped-app/src/main/java/iped/app/ui/IconManager.java index 2c4f9bc3d2..7db730872c 100644 --- a/iped-app/src/main/java/iped/app/ui/IconManager.java +++ b/iped-app/src/main/java/iped/app/ui/IconManager.java @@ -620,6 +620,16 @@ private static Map initMimeToIconMap(int size) { mimeIconMap.put("text/x-web-markdown", icon); } + icon = availableIconsMap.get("notification"); + if (icon != null) { + mimeIconMap.put("application/x-ufed-notification", icon); + } + + icon = availableIconsMap.get("mobilecard"); + if (icon != null) { + mimeIconMap.put("application/x-ufed-mobilecard", icon); + } + return mimeIconMap; } diff --git a/iped-app/src/main/resources/iped/app/ui/mime/mobilecard.png b/iped-app/src/main/resources/iped/app/ui/mime/mobilecard.png new file mode 100644 index 0000000000000000000000000000000000000000..744cd301827f2551928518a2caee8d165dfdcf16 GIT binary patch literal 1236 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dy>?NMQuIw*Zc*NB?jh{{h$#52U zL>4nJFzo?h#%Q*OkqivX3;{kNu0Y8KFm3=-4M1K)!vP?;b70x24-A%G3>*Rs0zf3e zAfd^i2tG2B#$Yhnod!MhE9f-UWP$l zhEYM5PC=Gl$xcpQPSx37LB(F#bG(XyXsH*F+fp1fr6sE8T-4H@)l>FXAKO}e4v6-)OgYvv2Z+wKT-)2T^jy!hE&{I zIyu|>uz^V1??{a@u59Pj>+4qNtSv5{y=GU{%IR?v9&P*czdlK?_1Tet7vE~EEGs!U z)z>?682Vf;$+y(gxK97{D1C!!Y$0f_kQ7KzNOJu9UM*s zI+%&fd98ln!~73_ICofvbu{fvc*FZE*)d*dk;-*}t4!D4KHni$v*z&n)(uw#w+X0~ zTdC>ldA5G9kUpN-{6PG5|9jQ@9%(&mm15S~?5W7GV4Obtk^7tvqQ>_`63xE;dC4ul zY0AWtP77*XFC;~L-NEksc8CA3!0+oDCTcCvI}+BSWnpAsF)ibk*ixZ{FD@0SQ$BS4 e@ILV4KjRmMFUcJrKHUTcIfJLGpUXO@geCyM4K_6Z literal 0 HcmV?d00001 diff --git a/iped-app/src/main/resources/iped/app/ui/mime/notification.png b/iped-app/src/main/resources/iped/app/ui/mime/notification.png new file mode 100644 index 0000000000000000000000000000000000000000..0936a160be55c9f4e4acade890ba8b71419116f4 GIT binary patch literal 815 zcmV+~1JL}5P)XCjIV>5~x(!763PZ9VP7Z zG^c^402f3Da7!_(LJH`^yw$mYEdykMG1=WQCfmw@&nema6uTlW$>BNBD6S6Ebbn+k z0R2FZM!z@@m;g@WSGQ4i54cb%`8r?{7zP%JYXI&jz%Sqg#mm_YoCHR-_BQ?-F9Ajr zdu=%Z_vC!g;jW7t09I6b1I!i-$mg2F9};)BoTCQ}I?8v6`-)$YYOoj>lJ8D&Dd3~H z<;9$i%h>I3Z^dm3k=&wFzONkathl4a93INpuICMUeik9Qg>AlI%m;RXdk$nUP4ZID zn>F{u5MX_6tQX3W2@0qITJSp+{QvXo7y{k|Vikbzm>#Kd1*Cu}OaofX)%+udfDz5} z9qxm2r2y(h=7BAkZnv=FreX-NzV22Zz`R`E6#(!wMxroqt6cUQZp9U1B(wcgUur=) z0WF&2^uSNe3!^v>;WSG`G$_WGu#R(pzrd#$$t^x(8ZKSTSZWJ8F#Gm60Rc}iRoogz zz;?|^2zaEqvs#B{%r|`$vlVfX#@r)vRN0JK%m*WzKyr(Vig~`$!Zu(Wqqa3c0m~Hg zH?XSIq9))SM(MExlUvyP#(SKtbx)|Pz-r9twFbD7uz)(nZd2?%L1T{TSM8Y^IpzFc z0ef2w-sywb4RirFnO>nT*)LQ15;KVZod|_i%)Ngc*oQesYJvUYCxE3<0*Ap~jCxy2 tyLFQU_H`!Fj=A3tV-BqQ!1^eG{sG4_#g2INFI)fs002ovPDHLkV1jY=Xubdd literal 0 HcmV?d00001 From 7c85e1a5c7c8be39412e49aa41c2e024dc0a2cce Mon Sep 17 00:00:00 2001 From: tc-wleite Date: Fri, 19 Apr 2024 16:24:03 -0300 Subject: [PATCH 09/30] '#1923: Handle Android WA system action 21 (reset group link). --- .../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 + .../main/java/iped/parsers/whatsapp/ExtractorAndroidNew.java | 4 ++++ .../src/main/java/iped/parsers/whatsapp/Message.java | 2 +- .../src/main/java/iped/parsers/whatsapp/ReportGenerator.java | 5 +++++ 8 files changed, 15 insertions(+), 1 deletion(-) diff --git a/iped-app/resources/localization/iped-parsers-messages.properties b/iped-app/resources/localization/iped-parsers-messages.properties index 6eb3d8386f..0212df9216 100644 --- a/iped-app/resources/localization/iped-parsers-messages.properties +++ b/iped-app/resources/localization/iped-parsers-messages.properties @@ -258,6 +258,7 @@ WhatsAppReport.VideoCall=Video Call WhatsAppReport.UserJoinedGroupCommunity=joined group from community WhatsAppReport.UserJoinedGroupInvitation=joined group from invitation WhatsAppReport.UserJoinedGroupLink=joined group from shared link +WhatsAppReport.ResetGroupLink=reset this group's invite link WhatsAppReport.GroupDescriptionChanged=Group description changed WhatsAppReport.GroupDescriptionDeleted=deleted group description WhatsAppReport.GroupNameChanged=changed the group name to 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 13754dfc24..2d5edc3dd8 100644 --- a/iped-app/resources/localization/iped-parsers-messages_de_DE.properties +++ b/iped-app/resources/localization/iped-parsers-messages_de_DE.properties @@ -258,6 +258,7 @@ WhatsAppReport.VideoCall=Videoanruf WhatsAppReport.UserJoinedGroupCommunity=joined group from community[TBT] WhatsAppReport.UserJoinedGroupInvitation=joined group from invitation[TBT] WhatsAppReport.UserJoinedGroupLink=hat sich über geteilten Link der Gruppe angeschlossen +WhatsAppReport.ResetGroupLink=reset this group's invite link[TBT] WhatsAppReport.GroupDescriptionChanged=Gruppenbeschreibung geändert WhatsAppReport.GroupDescriptionDeleted=deleted group description[TBT] WhatsAppReport.GroupNameChanged=changed the group name to [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 02b40a804f..30f0d6b27f 100644 --- a/iped-app/resources/localization/iped-parsers-messages_es_AR.properties +++ b/iped-app/resources/localization/iped-parsers-messages_es_AR.properties @@ -258,6 +258,7 @@ WhatsAppReport.VideoCall=Video Llamada WhatsAppReport.UserJoinedGroupCommunity=joined group from community[TBT] WhatsAppReport.UserJoinedGroupInvitation=joined group from invitation[TBT] WhatsAppReport.UserJoinedGroupLink=se unió al grupo desde un enlace compartido +WhatsAppReport.ResetGroupLink=reset this group's invite link[TBT] WhatsAppReport.GroupDescriptionChanged=Se ha modificado la descripción del grupo WhatsAppReport.GroupDescriptionDeleted=deleted group description[TBT] WhatsAppReport.GroupNameChanged=changed the group name to [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 8fcb752de3..8348d989fc 100644 --- a/iped-app/resources/localization/iped-parsers-messages_it_IT.properties +++ b/iped-app/resources/localization/iped-parsers-messages_it_IT.properties @@ -258,6 +258,7 @@ WhatsAppReport.VideoCall=Videochiamata WhatsAppReport.UserJoinedGroupCommunity=joined group from community[TBT] WhatsAppReport.UserJoinedGroupInvitation=joined group from invitation[TBT] WhatsAppReport.UserJoinedGroupLink=si è unito al gruppo tramite link condiviso +WhatsAppReport.ResetGroupLink=reset this group's invite link[TBT] WhatsAppReport.GroupDescriptionChanged=Descrizione gruppo modificata WhatsAppReport.GroupDescriptionDeleted=deleted group description[TBT] WhatsAppReport.GroupNameChanged=changed the group name to [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 2d620dc822..07a7b45f54 100644 --- a/iped-app/resources/localization/iped-parsers-messages_pt_BR.properties +++ b/iped-app/resources/localization/iped-parsers-messages_pt_BR.properties @@ -258,6 +258,7 @@ WhatsAppReport.VideoCall=Chamada de vídeo WhatsAppReport.UserJoinedGroupCommunity=entrou no grupo através da comunidade WhatsAppReport.UserJoinedGroupInvitation=entrou no grupo usando convite WhatsAppReport.UserJoinedGroupLink=entrou no grupo através de link de convite deste grupo +WhatsAppReport.ResetGroupLink=redefiniu o link de convite deste grupo WhatsAppReport.GroupDescriptionChanged=Descrição do grupo alterada WhatsAppReport.GroupDescriptionDeleted=apagou a descrição do grupo WhatsAppReport.GroupNameChanged=mudou o nome do grupo para diff --git a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/ExtractorAndroidNew.java b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/ExtractorAndroidNew.java index 7b5d0c0ca3..47d8ff12ab 100644 --- a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/ExtractorAndroidNew.java +++ b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/ExtractorAndroidNew.java @@ -49,6 +49,7 @@ import static iped.parsers.whatsapp.Message.MessageType.PRODUCT_MESSAGE; import static iped.parsers.whatsapp.Message.MessageType.REFUSED_VIDEO_CALL; import static iped.parsers.whatsapp.Message.MessageType.REFUSED_VOICE_CALL; +import static iped.parsers.whatsapp.Message.MessageType.RESET_GROUP_LINK; import static iped.parsers.whatsapp.Message.MessageType.SENDER_IN_CONTACTS; import static iped.parsers.whatsapp.Message.MessageType.SHARE_LOCATION_MESSAGE; import static iped.parsers.whatsapp.Message.MessageType.STANDARD_CHAT; @@ -664,6 +665,9 @@ protected Message.MessageType decodeMessageType(int messageType, int status, Int case 20: result = USER_JOINED_GROUP_FROM_LINK; break; + case 21: + result = RESET_GROUP_LINK; + break; case 27: result = GROUP_DESCRIPTION_CHANGED; break; 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 5310e75042..86ce5d4a7f 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 @@ -635,7 +635,7 @@ public void setAddress(String address) { } 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, DOC_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_ADDED_TO_COMMUNITY, USER_ADDED_TO_GROUP, USER_JOINED_GROUP_FROM_COMMUNITY, USER_JOINED_GROUP_FROM_LINK, USER_JOINED_GROUP_FROM_INVITATION, USER_LEFT_GROUP, USER_REMOVED_FROM_GROUP, USER_COMMUNITY_ADMIN, URL_MESSAGE, GROUP_ICON_CHANGED, GROUP_ICON_DELETED, GROUP_DESCRIPTION_CHANGED, GROUP_DESCRIPTION_DELETED, SUBJECT_CHANGED, YOU_ADMIN, YOU_NOT_ADMIN, USER_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_AUDIO_MESSAGE, 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_SETTINGS_NOT_APPLIED, EPHEMERAL_CHANGED, EPHEMERAL_DEFAULT, EPHEMERAL_SAVE, GROUP_CHANGED_ONLY_ADMINS_CAN_ADD, 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_DEVICE, CHANGED_NUMBER_TO, CHANGED_NUMBER_CHATTING_WITH_NEW, CHANGED_NUMBER_CHATTING_WITH_OLD, STANDARD_CHAT, SENDER_ADDED_TO_CONTACTS, SENDER_IN_CONTACTS, BUSINESS_OFFICIAL, GROUP_ADDED_TO_COMMUNITY, GROUP_REMOVED_FROM_COMMUNITY, COMMUNITY_MANAGEMENT_ACTION, COMMUNITY_WELCOME, UI_ELEMENTS, UI_ELEMENTS_QUOTE, CHAT_ADDED_PRIVACY, CHANNEL_ADDED_PRIVACY, CHANNEL_CREATED, ORDER_MESSAGE, PRODUCT_MESSAGE, BUSINESS_CHANGED_NAME, USER_JOINED_WHATSAPP, PINNED_MESSAGE, GROUP_NAME_CHANGED, AI_THIRD_PARTY, NEW_PARTICIPANTS_NEED_ADMIN_APPROVAL, UNKNOWN_MESSAGE + TEXT_MESSAGE, IMAGE_MESSAGE, AUDIO_MESSAGE, VIDEO_MESSAGE, UNKNOWN_MEDIA_MESSAGE, CONTACT_MESSAGE, LOCATION_MESSAGE, SHARE_LOCATION_MESSAGE, VOICE_CALL, VIDEO_CALL, DOC_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_ADDED_TO_COMMUNITY, USER_ADDED_TO_GROUP, USER_JOINED_GROUP_FROM_COMMUNITY, USER_JOINED_GROUP_FROM_LINK, USER_JOINED_GROUP_FROM_INVITATION, USER_LEFT_GROUP, USER_REMOVED_FROM_GROUP, USER_COMMUNITY_ADMIN, URL_MESSAGE, GROUP_ICON_CHANGED, GROUP_ICON_DELETED, GROUP_DESCRIPTION_CHANGED, GROUP_DESCRIPTION_DELETED, SUBJECT_CHANGED, YOU_ADMIN, YOU_NOT_ADMIN, USER_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_AUDIO_MESSAGE, 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_SETTINGS_NOT_APPLIED, EPHEMERAL_CHANGED, EPHEMERAL_DEFAULT, EPHEMERAL_SAVE, GROUP_CHANGED_ONLY_ADMINS_CAN_ADD, 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_DEVICE, CHANGED_NUMBER_TO, CHANGED_NUMBER_CHATTING_WITH_NEW, CHANGED_NUMBER_CHATTING_WITH_OLD, STANDARD_CHAT, SENDER_ADDED_TO_CONTACTS, SENDER_IN_CONTACTS, BUSINESS_OFFICIAL, GROUP_ADDED_TO_COMMUNITY, GROUP_REMOVED_FROM_COMMUNITY, COMMUNITY_MANAGEMENT_ACTION, COMMUNITY_WELCOME, UI_ELEMENTS, UI_ELEMENTS_QUOTE, CHAT_ADDED_PRIVACY, CHANNEL_ADDED_PRIVACY, CHANNEL_CREATED, ORDER_MESSAGE, PRODUCT_MESSAGE, BUSINESS_CHANGED_NAME, USER_JOINED_WHATSAPP, PINNED_MESSAGE, GROUP_NAME_CHANGED, AI_THIRD_PARTY, NEW_PARTICIPANTS_NEED_ADMIN_APPROVAL, RESET_GROUP_LINK, 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 5f091f458f..e8af04498b 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 @@ -669,6 +669,11 @@ private synchronized void printMessage(PrintWriter out, Message message, boolean out.println("
"); out.println(Messages.getString("WhatsAppReport.GroupOnlyAdminsCanSend") + "
"); break; + case RESET_GROUP_LINK: + out.println("
"); + out.print(name + " "); + out.println(Messages.getString("WhatsAppReport.ResetGroupLink") + ".
"); + break; case CHANGED_DEVICE: out.println("
"); out.println(name + " " + Messages.getString("WhatsAppReport.ChangedDevice") + "
"); From 5216f0a23c6343cb814859cc1041d73b3e64bb82 Mon Sep 17 00:00:00 2001 From: tc-wleite Date: Fri, 19 Apr 2024 19:39:42 -0300 Subject: [PATCH 10/30] '#2175: Use actual (non localized) field names to check if it is a date. --- .../src/main/java/iped/engine/lucene/analysis/AppAnalyzer.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/iped-engine/src/main/java/iped/engine/lucene/analysis/AppAnalyzer.java b/iped-engine/src/main/java/iped/engine/lucene/analysis/AppAnalyzer.java index 852f8e7f6b..a3ad5e4d18 100644 --- a/iped-engine/src/main/java/iped/engine/lucene/analysis/AppAnalyzer.java +++ b/iped-engine/src/main/java/iped/engine/lucene/analysis/AppAnalyzer.java @@ -74,6 +74,8 @@ public static Analyzer get() { return new NonFinalPerFieldAnalyzerWrapper(defaultAnalyzer, analyzerPerField) { protected Analyzer getWrappedAnalyzer(String fieldName) { + // Use actual (non localized) field names to check if it is a date (See #2175). + fieldName = LocalizedProperties.getNonLocalizedField(fieldName); if (Date.class.equals(IndexItem.getMetadataTypes().get(fieldName))) { return new KeywordAnalyzer(); } From e48664c6fe6083dd2b247b7bb81d7df502abf75e Mon Sep 17 00:00:00 2001 From: tc-wleite Date: Mon, 22 Apr 2024 20:04:22 -0300 Subject: [PATCH 11/30] '#2177: Mention [TAB] to autocomplete properties in search field hint. --- .../resources/localization/iped-desktop-messages.properties | 2 +- .../localization/iped-desktop-messages_de_DE.properties | 2 +- .../localization/iped-desktop-messages_es_AR.properties | 2 +- .../localization/iped-desktop-messages_it_IT.properties | 2 +- .../localization/iped-desktop-messages_pt_BR.properties | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/iped-app/resources/localization/iped-desktop-messages.properties b/iped-app/resources/localization/iped-desktop-messages.properties index dadf70c1c9..8a4504e69e 100644 --- a/iped-app/resources/localization/iped-desktop-messages.properties +++ b/iped-app/resources/localization/iped-desktop-messages.properties @@ -16,7 +16,7 @@ App.NoFilter=[No filter] App.Options=Options App.RecursiveListing=Recursive Listing App.Search=Search -App.SearchBoxTip=[Type or choose the search expression] +App.SearchBoxTip=[Type or choose the search expression. Use [TAB] to autocomplete properties.] App.SearchLabel=Search: App.Table=Table App.ToggleTimelineView=Toggle Table Timeline View diff --git a/iped-app/resources/localization/iped-desktop-messages_de_DE.properties b/iped-app/resources/localization/iped-desktop-messages_de_DE.properties index 698172eca2..4365723074 100644 --- a/iped-app/resources/localization/iped-desktop-messages_de_DE.properties +++ b/iped-app/resources/localization/iped-desktop-messages_de_DE.properties @@ -16,7 +16,7 @@ App.NoFilter=[kein Filter] App.Options=Optionen App.RecursiveListing=Rekursive Auflistung App.Search=Suche -App.SearchBoxTip=[Suchbegriff eingeben oder auswählen] +App.SearchBoxTip=[Suchbegriff eingeben oder auswählen. Use [TAB] to autocomplete properties.][TBT]] App.SearchLabel=Suche: App.Table=Tabelle App.ToggleTimelineView=Tabelle in Zeitleistenansicht umschalten diff --git a/iped-app/resources/localization/iped-desktop-messages_es_AR.properties b/iped-app/resources/localization/iped-desktop-messages_es_AR.properties index 5444c2d333..7035a96eff 100644 --- a/iped-app/resources/localization/iped-desktop-messages_es_AR.properties +++ b/iped-app/resources/localization/iped-desktop-messages_es_AR.properties @@ -16,7 +16,7 @@ App.NoFilter=[Sin filtrar] App.Options=Opciones App.RecursiveListing=Lista recursiva App.Search=Buscar -App.SearchBoxTip=[Escriba o elija la expresión de búsqueda] +App.SearchBoxTip=[Escriba o elija la expresión de búsqueda. Use [TAB] to autocomplete properties.][TBT] App.SearchLabel=Buscar: App.Table=Tabla App.ToggleTimelineView=Alternar vista de línea de tiempo de tabla diff --git a/iped-app/resources/localization/iped-desktop-messages_it_IT.properties b/iped-app/resources/localization/iped-desktop-messages_it_IT.properties index 7d2decec81..a0747a92a6 100644 --- a/iped-app/resources/localization/iped-desktop-messages_it_IT.properties +++ b/iped-app/resources/localization/iped-desktop-messages_it_IT.properties @@ -16,7 +16,7 @@ App.NoFilter=[Nessun filtro] App.Options=Opzioni App.RecursiveListing=Elenco ricorsivo App.Search=Ricerca -App.SearchBoxTip=[Digita o scegli l''espressione di ricerca] +App.SearchBoxTip=[Digita o scegli l''espressione di ricerca. Use [TAB] to autocomplete properties.][TBT] App.SearchLabel=Ricerca: App.Table=Tabella App.ToggleTimelineView=Visualizzazione Timeline della Tabella diff --git a/iped-app/resources/localization/iped-desktop-messages_pt_BR.properties b/iped-app/resources/localization/iped-desktop-messages_pt_BR.properties index 9b6866765c..28561328a3 100644 --- a/iped-app/resources/localization/iped-desktop-messages_pt_BR.properties +++ b/iped-app/resources/localization/iped-desktop-messages_pt_BR.properties @@ -16,7 +16,7 @@ App.NoFilter=[Sem Filtro] App.Options=Opções App.RecursiveListing=Listagem recursiva de diretórios App.Search=Pesquisar -App.SearchBoxTip=[Digite ou escolha a expressão a ser pesquisada] +App.SearchBoxTip=[Digite ou escolha a expressão a ser pesquisada. Use [TAB] para autocompletar propriedades.] App.SearchLabel=Pesquisar: App.Table=Tabela App.ToggleTimelineView=Alternar Visualização de Timeline na Tabela From e1e91ca1e06cee2229d2d271cd651a8b0c8c1182 Mon Sep 17 00:00:00 2001 From: tc-wleite Date: Tue, 23 Apr 2024 20:26:33 -0300 Subject: [PATCH 12/30] '#2178: Place most recent searches in the top of search history. --- .../main/java/iped/app/ui/AppListener.java | 16 +++++---- .../java/iped/app/ui/BookmarksController.java | 33 ++++++++++++++----- .../iped/engine/data/BitmapBookmarks.java | 8 ++--- .../main/java/iped/engine/data/Bookmarks.java | 8 ++--- 4 files changed, 41 insertions(+), 24 deletions(-) diff --git a/iped-app/src/main/java/iped/app/ui/AppListener.java b/iped-app/src/main/java/iped/app/ui/AppListener.java index 1e264dde09..af1a713d49 100644 --- a/iped-app/src/main/java/iped/app/ui/AppListener.java +++ b/iped-app/src/main/java/iped/app/ui/AppListener.java @@ -38,7 +38,7 @@ public class AppListener implements ActionListener, MouseListener { private String searchText = ""; //$NON-NLS-1$ boolean clearAllFilters = false; - private boolean clearSearchBox = false; + private boolean updateSearchBox = false; public void updateFileListing() { updateFileListing(null); @@ -118,16 +118,18 @@ public void actionPerformed(ActionEvent evt) { updateFileList = true; } - if (evt.getSource() == App.get().queryComboBox && !clearSearchBox && evt.getActionCommand().equals("comboBoxChanged") && !BookmarksController.get().isUpdatingHistory()) { + if (evt.getSource() == App.get().queryComboBox && !updateSearchBox && evt.getActionCommand().equals("comboBoxChanged") && !BookmarksController.get().isUpdatingHistory()) { if (App.get().queryComboBox.getSelectedItem() != null) { searchText = App.get().queryComboBox.getSelectedItem().toString(); + updateSearchBox = true; if (searchText.equals(BookmarksController.HISTORY_DIV) || searchText.equals(App.SEARCH_TOOL_TIP)) { searchText = ""; //$NON-NLS-1$ - clearSearchBox = true; App.get().queryComboBox.setSelectedItem(""); //$NON-NLS-1$ + } else { + searchText = searchText.trim(); + BookmarksController.get().addToRecentSearches(searchText); + App.get().queryComboBox.setSelectedItem(searchText); } - searchText = searchText.trim(); - BookmarksController.get().addToRecentSearches(searchText); } if (!searchText.isEmpty()) @@ -187,7 +189,7 @@ public void actionPerformed(ActionEvent evt) { App.get().getContextMenu().menuListener.exportFileTree(true, true); } - clearSearchBox = false; + updateSearchBox = false; } @@ -212,7 +214,7 @@ public void mousePressed(MouseEvent evt) { Object termo = App.get().queryComboBox.getSelectedItem(); if (termo != null && termo.equals(App.SEARCH_TOOL_TIP) && App.get().queryComboBox.isAncestorOf((Component) evt.getSource())) { - clearSearchBox = true; + updateSearchBox = true; App.get().queryComboBox.setSelectedItem(""); //$NON-NLS-1$ } diff --git a/iped-app/src/main/java/iped/app/ui/BookmarksController.java b/iped-app/src/main/java/iped/app/ui/BookmarksController.java index d8779467a0..5fa5b0a2aa 100644 --- a/iped-app/src/main/java/iped/app/ui/BookmarksController.java +++ b/iped-app/src/main/java/iped/app/ui/BookmarksController.java @@ -3,10 +3,12 @@ import java.io.File; import java.io.IOException; +import javax.swing.JComboBox; import javax.swing.JFileChooser; import javax.swing.JOptionPane; import javax.swing.SwingUtilities; +import iped.data.IMultiBookmarks; import iped.engine.data.Bookmarks; import iped.utils.LocalizedFormat; import iped.viewers.bookmarks.IBookmarksController; @@ -54,15 +56,27 @@ public boolean isMultiSetting() { return this.multiSetting; } - public void addToRecentSearches(String texto) { + public void addToRecentSearches(String text) { - if (!texto.equals(HISTORY_DIV) && !texto.trim().isEmpty() && !App.get().appCase.getMultiBookmarks().getTypedWords().contains(texto) && !App.get().appCase.getKeywords().contains(texto)) { - - if (App.get().appCase.getMultiBookmarks().getTypedWords().size() == 0) - App.get().queryComboBox.addItem(HISTORY_DIV); - - App.get().queryComboBox.addItem(texto); - App.get().appCase.getMultiBookmarks().addToTypedWords(texto); + if (!text.equals(HISTORY_DIV) && !text.trim().isEmpty() && !App.get().appCase.getKeywords().contains(text)) { + JComboBox queryComboBox = App.get().queryComboBox; + IMultiBookmarks multiBookmarks = App.get().appCase.getMultiBookmarks(); + + if (multiBookmarks.getTypedWords().isEmpty()) { + queryComboBox.addItem(HISTORY_DIV); + } + multiBookmarks.addToTypedWords(text); + + // Remove if already present + queryComboBox.removeItem(text); + + // Insert at the top, right after HISTORY_DIV + for (int i = 0; i < queryComboBox.getItemCount(); i++) { + if (queryComboBox.getItemAt(i).equals(HISTORY_DIV)) { + queryComboBox.insertItemAt(text, i + 1); + break; + } + } } } @@ -122,8 +136,9 @@ public void updateUIHistory() { if (App.get().appCase.getMultiBookmarks().getTypedWords().size() != 0) App.get().queryComboBox.addItem(HISTORY_DIV); + int insPos = App.get().queryComboBox.getItemCount(); for (String text : App.get().appCase.getMultiBookmarks().getTypedWords()) { - App.get().queryComboBox.addItem(text); + App.get().queryComboBox.insertItemAt(text, insPos); } App.get().queryComboBox.setSelectedItem(prevText); updatingHistory = false; diff --git a/iped-engine/src/main/java/iped/engine/data/BitmapBookmarks.java b/iped-engine/src/main/java/iped/engine/data/BitmapBookmarks.java index e13a954a37..e0ca746484 100644 --- a/iped-engine/src/main/java/iped/engine/data/BitmapBookmarks.java +++ b/iped-engine/src/main/java/iped/engine/data/BitmapBookmarks.java @@ -431,10 +431,10 @@ public void saveState(File file, boolean synchronous) throws IOException { } } - public synchronized void addToTypedWords(String texto) { - - if (!texto.trim().isEmpty() && !typedWords.contains(texto)) { - typedWords.add(texto); + public synchronized void addToTypedWords(String text) { + if (!text.trim().isEmpty()) { + typedWords.remove(text); // Remove if present before adding, to update insertion order + typedWords.add(text); saveState(); } } diff --git a/iped-engine/src/main/java/iped/engine/data/Bookmarks.java b/iped-engine/src/main/java/iped/engine/data/Bookmarks.java index 1197076882..e57be113e5 100644 --- a/iped-engine/src/main/java/iped/engine/data/Bookmarks.java +++ b/iped-engine/src/main/java/iped/engine/data/Bookmarks.java @@ -474,10 +474,10 @@ public void saveState(File file, boolean synchronous) throws IOException { } } - public synchronized void addToTypedWords(String texto) { - - if (!texto.trim().isEmpty() && !typedWords.contains(texto)) { - typedWords.add(texto); + public synchronized void addToTypedWords(String text) { + if (!text.trim().isEmpty()) { + typedWords.remove(text); // Remove if present before adding, to update insertion order + typedWords.add(text); saveState(); } } From 15214e1e11297e171681c988019c58434762d67d Mon Sep 17 00:00:00 2001 From: tc-wleite Date: Wed, 24 Apr 2024 18:20:38 -0300 Subject: [PATCH 13/30] '#1923: Handle Android WA system action 107 (community renamed). --- .../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 + .../main/java/iped/parsers/whatsapp/ExtractorAndroidNew.java | 4 ++++ .../src/main/java/iped/parsers/whatsapp/Message.java | 2 +- .../src/main/java/iped/parsers/whatsapp/ReportGenerator.java | 4 ++++ 8 files changed, 14 insertions(+), 1 deletion(-) diff --git a/iped-app/resources/localization/iped-parsers-messages.properties b/iped-app/resources/localization/iped-parsers-messages.properties index 0212df9216..e3155c8847 100644 --- a/iped-app/resources/localization/iped-parsers-messages.properties +++ b/iped-app/resources/localization/iped-parsers-messages.properties @@ -310,6 +310,7 @@ WhatsAppReport.ChatBusinessOfficial=This chat is with an official business accou WhatsAppReport.GroupAddedToCommunity=Group was added to the community WhatsAppReport.GroupRemovedFromCommunity=Group was removed from the community WhatsAppReport.CommunityManagementAction=Community management action. +WhatsAppReport.CommunityRenamed=changed the community's name WhatsAppReport.CommunityWelcome=Welcome to the community. WhatsAppReport.NewParticipantsNeedAdminApproval=New participants need admin approval to join this group. WhatsAppReport.ChatAddedPrivacy=This chat has added privacy for your profile and phone number. 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 2d5edc3dd8..ac6a7466f7 100644 --- a/iped-app/resources/localization/iped-parsers-messages_de_DE.properties +++ b/iped-app/resources/localization/iped-parsers-messages_de_DE.properties @@ -310,6 +310,7 @@ WhatsAppReport.ChatBusinessOfficial=This chat is with an official business accou WhatsAppReport.GroupAddedToCommunity=Group was added to the community[TBT] WhatsAppReport.GroupRemovedFromCommunity=Group was removed from the community[TBT] WhatsAppReport.CommunityManagementAction=Community management action.[TBT] +WhatsAppReport.CommunityRenamed=changed the community's name[TBT] WhatsAppReport.CommunityWelcome=Welcome to the community.[TBT] WhatsAppReport.NewParticipantsNeedAdminApproval=New participants need admin approval to join this group.[TBT] WhatsAppReport.ChatAddedPrivacy=This chat has added privacy for your profile and phone number.[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 30f0d6b27f..2e0b6072f2 100644 --- a/iped-app/resources/localization/iped-parsers-messages_es_AR.properties +++ b/iped-app/resources/localization/iped-parsers-messages_es_AR.properties @@ -310,6 +310,7 @@ WhatsAppReport.ChatBusinessOfficial=This chat is with an official business accou WhatsAppReport.GroupAddedToCommunity=Group was added to the community[TBT] WhatsAppReport.GroupRemovedFromCommunity=Group was removed from the community[TBT] WhatsAppReport.CommunityManagementAction=Community management action.[TBT] +WhatsAppReport.CommunityRenamed=cambió al nombre de la comunidad WhatsAppReport.CommunityWelcome=Welcome to the community.[TBT] WhatsAppReport.NewParticipantsNeedAdminApproval=New participants need admin approval to join this group.[TBT] WhatsAppReport.ChatAddedPrivacy=This chat has added privacy for your profile and phone number.[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 8348d989fc..7bb94e7ca5 100644 --- a/iped-app/resources/localization/iped-parsers-messages_it_IT.properties +++ b/iped-app/resources/localization/iped-parsers-messages_it_IT.properties @@ -310,6 +310,7 @@ WhatsAppReport.ChatBusinessOfficial=This chat is with an official business accou WhatsAppReport.GroupAddedToCommunity=Group was added to the community[TBT] WhatsAppReport.GroupRemovedFromCommunity=Group was removed from the community[TBT] WhatsAppReport.CommunityManagementAction=Community management action.[TBT] +WhatsAppReport.CommunityRenamed=changed the community's name[TBT] WhatsAppReport.CommunityWelcome=Welcome to the community.[TBT] WhatsAppReport.NewParticipantsNeedAdminApproval=New participants need admin approval to join this group.[TBT] WhatsAppReport.ChatAddedPrivacy=This chat has added privacy for your profile and phone number.[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 07a7b45f54..245111856d 100644 --- a/iped-app/resources/localization/iped-parsers-messages_pt_BR.properties +++ b/iped-app/resources/localization/iped-parsers-messages_pt_BR.properties @@ -310,6 +310,7 @@ WhatsAppReport.ChatBusinessOfficial=Você está conversando com uma conta comerc WhatsAppReport.GroupAddedToCommunity=Grupo foi adicionado a comunidade WhatsAppReport.GroupRemovedFromCommunity=Grupo foi removido da comunidade WhatsAppReport.CommunityManagementAction=Ação de gerenciamento de comunidade. +WhatsAppReport.CommunityRenamed=mudou o nome da comunidade WhatsAppReport.CommunityWelcome=Bem-vindo à comunidade. WhatsAppReport.NewParticipantsNeedAdminApproval=Novos participantes precisam da autorização de um admin para entrar no grupo. WhatsAppReport.ChatAddedPrivacy=Esta conversa oferece maior privacidade para seu perfil e número de telefone. diff --git a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/ExtractorAndroidNew.java b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/ExtractorAndroidNew.java index 47d8ff12ab..b1273446e7 100644 --- a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/ExtractorAndroidNew.java +++ b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/ExtractorAndroidNew.java @@ -12,6 +12,7 @@ import static iped.parsers.whatsapp.Message.MessageType.CHANNEL_ADDED_PRIVACY; import static iped.parsers.whatsapp.Message.MessageType.CHANNEL_CREATED; import static iped.parsers.whatsapp.Message.MessageType.COMMUNITY_MANAGEMENT_ACTION; +import static iped.parsers.whatsapp.Message.MessageType.COMMUNITY_RENAMED; import static iped.parsers.whatsapp.Message.MessageType.CONTACT_MESSAGE; import static iped.parsers.whatsapp.Message.MessageType.DELETED_BY_ADMIN; import static iped.parsers.whatsapp.Message.MessageType.DELETED_BY_SENDER; @@ -770,6 +771,9 @@ protected Message.MessageType decodeMessageType(int messageType, int status, Int case 92: result = GROUP_CHANGED_ONLY_ADMINS_CAN_ADD; break; + case 107: + result = COMMUNITY_RENAMED; + break; case 118: result = PINNED_MESSAGE; break; 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 86ce5d4a7f..583b4f7340 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 @@ -635,7 +635,7 @@ public void setAddress(String address) { } 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, DOC_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_ADDED_TO_COMMUNITY, USER_ADDED_TO_GROUP, USER_JOINED_GROUP_FROM_COMMUNITY, USER_JOINED_GROUP_FROM_LINK, USER_JOINED_GROUP_FROM_INVITATION, USER_LEFT_GROUP, USER_REMOVED_FROM_GROUP, USER_COMMUNITY_ADMIN, URL_MESSAGE, GROUP_ICON_CHANGED, GROUP_ICON_DELETED, GROUP_DESCRIPTION_CHANGED, GROUP_DESCRIPTION_DELETED, SUBJECT_CHANGED, YOU_ADMIN, YOU_NOT_ADMIN, USER_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_AUDIO_MESSAGE, 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_SETTINGS_NOT_APPLIED, EPHEMERAL_CHANGED, EPHEMERAL_DEFAULT, EPHEMERAL_SAVE, GROUP_CHANGED_ONLY_ADMINS_CAN_ADD, 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_DEVICE, CHANGED_NUMBER_TO, CHANGED_NUMBER_CHATTING_WITH_NEW, CHANGED_NUMBER_CHATTING_WITH_OLD, STANDARD_CHAT, SENDER_ADDED_TO_CONTACTS, SENDER_IN_CONTACTS, BUSINESS_OFFICIAL, GROUP_ADDED_TO_COMMUNITY, GROUP_REMOVED_FROM_COMMUNITY, COMMUNITY_MANAGEMENT_ACTION, COMMUNITY_WELCOME, UI_ELEMENTS, UI_ELEMENTS_QUOTE, CHAT_ADDED_PRIVACY, CHANNEL_ADDED_PRIVACY, CHANNEL_CREATED, ORDER_MESSAGE, PRODUCT_MESSAGE, BUSINESS_CHANGED_NAME, USER_JOINED_WHATSAPP, PINNED_MESSAGE, GROUP_NAME_CHANGED, AI_THIRD_PARTY, NEW_PARTICIPANTS_NEED_ADMIN_APPROVAL, RESET_GROUP_LINK, UNKNOWN_MESSAGE + TEXT_MESSAGE, IMAGE_MESSAGE, AUDIO_MESSAGE, VIDEO_MESSAGE, UNKNOWN_MEDIA_MESSAGE, CONTACT_MESSAGE, LOCATION_MESSAGE, SHARE_LOCATION_MESSAGE, VOICE_CALL, VIDEO_CALL, DOC_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_ADDED_TO_COMMUNITY, USER_ADDED_TO_GROUP, USER_JOINED_GROUP_FROM_COMMUNITY, USER_JOINED_GROUP_FROM_LINK, USER_JOINED_GROUP_FROM_INVITATION, USER_LEFT_GROUP, USER_REMOVED_FROM_GROUP, USER_COMMUNITY_ADMIN, URL_MESSAGE, GROUP_ICON_CHANGED, GROUP_ICON_DELETED, GROUP_DESCRIPTION_CHANGED, GROUP_DESCRIPTION_DELETED, SUBJECT_CHANGED, YOU_ADMIN, YOU_NOT_ADMIN, USER_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_AUDIO_MESSAGE, 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_SETTINGS_NOT_APPLIED, EPHEMERAL_CHANGED, EPHEMERAL_DEFAULT, EPHEMERAL_SAVE, GROUP_CHANGED_ONLY_ADMINS_CAN_ADD, 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_DEVICE, CHANGED_NUMBER_TO, CHANGED_NUMBER_CHATTING_WITH_NEW, CHANGED_NUMBER_CHATTING_WITH_OLD, STANDARD_CHAT, SENDER_ADDED_TO_CONTACTS, SENDER_IN_CONTACTS, BUSINESS_OFFICIAL, GROUP_ADDED_TO_COMMUNITY, GROUP_REMOVED_FROM_COMMUNITY, COMMUNITY_MANAGEMENT_ACTION, COMMUNITY_WELCOME, UI_ELEMENTS, UI_ELEMENTS_QUOTE, CHAT_ADDED_PRIVACY, CHANNEL_ADDED_PRIVACY, CHANNEL_CREATED, ORDER_MESSAGE, PRODUCT_MESSAGE, BUSINESS_CHANGED_NAME, USER_JOINED_WHATSAPP, PINNED_MESSAGE, GROUP_NAME_CHANGED, AI_THIRD_PARTY, NEW_PARTICIPANTS_NEED_ADMIN_APPROVAL, RESET_GROUP_LINK, COMMUNITY_RENAMED, 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 e8af04498b..9c8cf00a02 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 @@ -523,6 +523,10 @@ private synchronized void printMessage(PrintWriter out, Message message, boolean } out.println("
"); break; + case COMMUNITY_RENAMED: + out.println("
"); + out.println(name + " " + Messages.getString("WhatsAppReport.CommunityRenamed") + ".
"); + break; case COMMUNITY_MANAGEMENT_ACTION: out.println("
"); out.println(Messages.getString("WhatsAppReport.CommunityManagementAction") + "
"); From a518814d03ec5aed628e256878d4428072405c65 Mon Sep 17 00:00:00 2001 From: tc-wleite Date: Wed, 24 Apr 2024 18:29:42 -0300 Subject: [PATCH 14/30] '#1923: Handle Android WA system action 102 (any comm. member can join). --- .../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 + .../main/java/iped/parsers/whatsapp/ExtractorAndroidNew.java | 4 ++++ .../src/main/java/iped/parsers/whatsapp/Message.java | 2 +- .../src/main/java/iped/parsers/whatsapp/ReportGenerator.java | 4 ++++ 8 files changed, 14 insertions(+), 1 deletion(-) diff --git a/iped-app/resources/localization/iped-parsers-messages.properties b/iped-app/resources/localization/iped-parsers-messages.properties index e3155c8847..6b441d003d 100644 --- a/iped-app/resources/localization/iped-parsers-messages.properties +++ b/iped-app/resources/localization/iped-parsers-messages.properties @@ -309,6 +309,7 @@ WhatsAppReport.BusinessChangedName=This business account changed its name. WhatsAppReport.ChatBusinessOfficial=This chat is with an official business account. WhatsAppReport.GroupAddedToCommunity=Group was added to the community WhatsAppReport.GroupRemovedFromCommunity=Group was removed from the community +WhatsAppReport.AnyCommunityMemberCanJoinThisGroup=Anyone in the community can join this group. WhatsAppReport.CommunityManagementAction=Community management action. WhatsAppReport.CommunityRenamed=changed the community's name WhatsAppReport.CommunityWelcome=Welcome to the 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 ac6a7466f7..d6fb7cfd7d 100644 --- a/iped-app/resources/localization/iped-parsers-messages_de_DE.properties +++ b/iped-app/resources/localization/iped-parsers-messages_de_DE.properties @@ -309,6 +309,7 @@ WhatsAppReport.BusinessChangedName=This business account changed its name.[TBT] WhatsAppReport.ChatBusinessOfficial=This chat is with an official business account.[TBT] WhatsAppReport.GroupAddedToCommunity=Group was added to the community[TBT] WhatsAppReport.GroupRemovedFromCommunity=Group was removed from the community[TBT] +WhatsAppReport.AnyCommunityMemberCanJoinThisGroup=Any community member can join this group.[TBT] WhatsAppReport.CommunityManagementAction=Community management action.[TBT] WhatsAppReport.CommunityRenamed=changed the community's name[TBT] WhatsAppReport.CommunityWelcome=Welcome to the 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 2e0b6072f2..9be3564e7c 100644 --- a/iped-app/resources/localization/iped-parsers-messages_es_AR.properties +++ b/iped-app/resources/localization/iped-parsers-messages_es_AR.properties @@ -309,6 +309,7 @@ WhatsAppReport.BusinessChangedName=This business account changed its name.[TBT] WhatsAppReport.ChatBusinessOfficial=This chat is with an official business account.[TBT] WhatsAppReport.GroupAddedToCommunity=Group was added to the community[TBT] WhatsAppReport.GroupRemovedFromCommunity=Group was removed from the community[TBT] +WhatsAppReport.AnyCommunityMemberCanJoinThisGroup=Cualquier miembro de la comunidad puede unirse a este grupo. WhatsAppReport.CommunityManagementAction=Community management action.[TBT] WhatsAppReport.CommunityRenamed=cambió al nombre de la comunidad WhatsAppReport.CommunityWelcome=Welcome to the 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 7bb94e7ca5..881167492d 100644 --- a/iped-app/resources/localization/iped-parsers-messages_it_IT.properties +++ b/iped-app/resources/localization/iped-parsers-messages_it_IT.properties @@ -309,6 +309,7 @@ WhatsAppReport.BusinessChangedName=This business account changed its name.[TBT] WhatsAppReport.ChatBusinessOfficial=This chat is with an official business account.[TBT] WhatsAppReport.GroupAddedToCommunity=Group was added to the community[TBT] WhatsAppReport.GroupRemovedFromCommunity=Group was removed from the community[TBT] +WhatsAppReport.AnyCommunityMemberCanJoinThisGroup=Any community member can join this group.[TBT] WhatsAppReport.CommunityManagementAction=Community management action.[TBT] WhatsAppReport.CommunityRenamed=changed the community's name[TBT] WhatsAppReport.CommunityWelcome=Welcome to the 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 245111856d..05b80e9e62 100644 --- a/iped-app/resources/localization/iped-parsers-messages_pt_BR.properties +++ b/iped-app/resources/localization/iped-parsers-messages_pt_BR.properties @@ -309,6 +309,7 @@ WhatsAppReport.BusinessChangedName=Esta conta comercial mudou seu nome. WhatsAppReport.ChatBusinessOfficial=Você está conversando com uma conta comercial oficial. WhatsAppReport.GroupAddedToCommunity=Grupo foi adicionado a comunidade WhatsAppReport.GroupRemovedFromCommunity=Grupo foi removido da comunidade +WhatsAppReport.AnyCommunityMemberCanJoinThisGroup=Todos os membros da comunidade podem entrar neste grupo. WhatsAppReport.CommunityManagementAction=Ação de gerenciamento de comunidade. WhatsAppReport.CommunityRenamed=mudou o nome da comunidade WhatsAppReport.CommunityWelcome=Bem-vindo à comunidade. diff --git a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/ExtractorAndroidNew.java b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/ExtractorAndroidNew.java index b1273446e7..9bfd3e09b3 100644 --- a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/ExtractorAndroidNew.java +++ b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/ExtractorAndroidNew.java @@ -1,6 +1,7 @@ package iped.parsers.whatsapp; import static iped.parsers.whatsapp.Message.MessageType.AI_THIRD_PARTY; +import static iped.parsers.whatsapp.Message.MessageType.ANY_COMMUNITY_MEMBER_CAN_JOIN_GROUP; import static iped.parsers.whatsapp.Message.MessageType.AUDIO_MESSAGE; import static iped.parsers.whatsapp.Message.MessageType.BLOCKED_CONTACT; import static iped.parsers.whatsapp.Message.MessageType.BUSINESS_CHAT; @@ -771,6 +772,9 @@ protected Message.MessageType decodeMessageType(int messageType, int status, Int case 92: result = GROUP_CHANGED_ONLY_ADMINS_CAN_ADD; break; + case 102: + result = ANY_COMMUNITY_MEMBER_CAN_JOIN_GROUP; + break; case 107: result = COMMUNITY_RENAMED; break; 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 583b4f7340..2eb4e85870 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 @@ -635,7 +635,7 @@ public void setAddress(String address) { } 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, DOC_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_ADDED_TO_COMMUNITY, USER_ADDED_TO_GROUP, USER_JOINED_GROUP_FROM_COMMUNITY, USER_JOINED_GROUP_FROM_LINK, USER_JOINED_GROUP_FROM_INVITATION, USER_LEFT_GROUP, USER_REMOVED_FROM_GROUP, USER_COMMUNITY_ADMIN, URL_MESSAGE, GROUP_ICON_CHANGED, GROUP_ICON_DELETED, GROUP_DESCRIPTION_CHANGED, GROUP_DESCRIPTION_DELETED, SUBJECT_CHANGED, YOU_ADMIN, YOU_NOT_ADMIN, USER_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_AUDIO_MESSAGE, 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_SETTINGS_NOT_APPLIED, EPHEMERAL_CHANGED, EPHEMERAL_DEFAULT, EPHEMERAL_SAVE, GROUP_CHANGED_ONLY_ADMINS_CAN_ADD, 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_DEVICE, CHANGED_NUMBER_TO, CHANGED_NUMBER_CHATTING_WITH_NEW, CHANGED_NUMBER_CHATTING_WITH_OLD, STANDARD_CHAT, SENDER_ADDED_TO_CONTACTS, SENDER_IN_CONTACTS, BUSINESS_OFFICIAL, GROUP_ADDED_TO_COMMUNITY, GROUP_REMOVED_FROM_COMMUNITY, COMMUNITY_MANAGEMENT_ACTION, COMMUNITY_WELCOME, UI_ELEMENTS, UI_ELEMENTS_QUOTE, CHAT_ADDED_PRIVACY, CHANNEL_ADDED_PRIVACY, CHANNEL_CREATED, ORDER_MESSAGE, PRODUCT_MESSAGE, BUSINESS_CHANGED_NAME, USER_JOINED_WHATSAPP, PINNED_MESSAGE, GROUP_NAME_CHANGED, AI_THIRD_PARTY, NEW_PARTICIPANTS_NEED_ADMIN_APPROVAL, RESET_GROUP_LINK, COMMUNITY_RENAMED, UNKNOWN_MESSAGE + TEXT_MESSAGE, IMAGE_MESSAGE, AUDIO_MESSAGE, VIDEO_MESSAGE, UNKNOWN_MEDIA_MESSAGE, CONTACT_MESSAGE, LOCATION_MESSAGE, SHARE_LOCATION_MESSAGE, VOICE_CALL, VIDEO_CALL, DOC_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_ADDED_TO_COMMUNITY, USER_ADDED_TO_GROUP, USER_JOINED_GROUP_FROM_COMMUNITY, USER_JOINED_GROUP_FROM_LINK, USER_JOINED_GROUP_FROM_INVITATION, USER_LEFT_GROUP, USER_REMOVED_FROM_GROUP, USER_COMMUNITY_ADMIN, URL_MESSAGE, GROUP_ICON_CHANGED, GROUP_ICON_DELETED, GROUP_DESCRIPTION_CHANGED, GROUP_DESCRIPTION_DELETED, SUBJECT_CHANGED, YOU_ADMIN, YOU_NOT_ADMIN, USER_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_AUDIO_MESSAGE, 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_SETTINGS_NOT_APPLIED, EPHEMERAL_CHANGED, EPHEMERAL_DEFAULT, EPHEMERAL_SAVE, GROUP_CHANGED_ONLY_ADMINS_CAN_ADD, 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_DEVICE, CHANGED_NUMBER_TO, CHANGED_NUMBER_CHATTING_WITH_NEW, CHANGED_NUMBER_CHATTING_WITH_OLD, STANDARD_CHAT, SENDER_ADDED_TO_CONTACTS, SENDER_IN_CONTACTS, BUSINESS_OFFICIAL, GROUP_ADDED_TO_COMMUNITY, GROUP_REMOVED_FROM_COMMUNITY, COMMUNITY_MANAGEMENT_ACTION, COMMUNITY_WELCOME, UI_ELEMENTS, UI_ELEMENTS_QUOTE, CHAT_ADDED_PRIVACY, CHANNEL_ADDED_PRIVACY, CHANNEL_CREATED, ORDER_MESSAGE, PRODUCT_MESSAGE, BUSINESS_CHANGED_NAME, USER_JOINED_WHATSAPP, PINNED_MESSAGE, GROUP_NAME_CHANGED, AI_THIRD_PARTY, NEW_PARTICIPANTS_NEED_ADMIN_APPROVAL, RESET_GROUP_LINK, COMMUNITY_RENAMED, ANY_COMMUNITY_MEMBER_CAN_JOIN_GROUP, 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 9c8cf00a02..cef506198a 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 @@ -527,6 +527,10 @@ private synchronized void printMessage(PrintWriter out, Message message, boolean out.println("
"); out.println(name + " " + Messages.getString("WhatsAppReport.CommunityRenamed") + ".
"); break; + case ANY_COMMUNITY_MEMBER_CAN_JOIN_GROUP: + out.println("
"); + out.println(Messages.getString("WhatsAppReport.AnyCommunityMemberCanJoinThisGroup") + "
"); + break; case COMMUNITY_MANAGEMENT_ACTION: out.println("
"); out.println(Messages.getString("WhatsAppReport.CommunityManagementAction") + "
"); From 57ebdcf8ff799de40629db030606df6c54283ebf Mon Sep 17 00:00:00 2001 From: tc-wleite Date: Wed, 24 Apr 2024 18:36:10 -0300 Subject: [PATCH 15/30] '#1923: Handle Android WA system action 99 (chat added privacy). --- .../main/java/iped/parsers/whatsapp/ExtractorAndroidNew.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/ExtractorAndroidNew.java b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/ExtractorAndroidNew.java index 9bfd3e09b3..a56e6291c9 100644 --- a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/ExtractorAndroidNew.java +++ b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/ExtractorAndroidNew.java @@ -12,6 +12,7 @@ import static iped.parsers.whatsapp.Message.MessageType.CHANGED_NUMBER_TO; import static iped.parsers.whatsapp.Message.MessageType.CHANNEL_ADDED_PRIVACY; import static iped.parsers.whatsapp.Message.MessageType.CHANNEL_CREATED; +import static iped.parsers.whatsapp.Message.MessageType.CHAT_ADDED_PRIVACY; import static iped.parsers.whatsapp.Message.MessageType.COMMUNITY_MANAGEMENT_ACTION; import static iped.parsers.whatsapp.Message.MessageType.COMMUNITY_RENAMED; import static iped.parsers.whatsapp.Message.MessageType.CONTACT_MESSAGE; @@ -103,6 +104,7 @@ import iped.parsers.sqlite.SQLite3DBParser; import iped.parsers.whatsapp.Message.MessageStatus; +import iped.parsers.whatsapp.Message.MessageType; /** * @@ -772,6 +774,9 @@ protected Message.MessageType decodeMessageType(int messageType, int status, Int case 92: result = GROUP_CHANGED_ONLY_ADMINS_CAN_ADD; break; + case 99: + result = CHAT_ADDED_PRIVACY; + break; case 102: result = ANY_COMMUNITY_MEMBER_CAN_JOIN_GROUP; break; From 2e27296df71461e55ee38d8220054e6886079550 Mon Sep 17 00:00:00 2001 From: tc-wleite Date: Wed, 24 Apr 2024 18:38:25 -0300 Subject: [PATCH 16/30] '#1923: Handle Android WA system action 124 (community welcome). --- .../main/java/iped/parsers/whatsapp/ExtractorAndroidNew.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/ExtractorAndroidNew.java b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/ExtractorAndroidNew.java index a56e6291c9..1e55230a28 100644 --- a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/ExtractorAndroidNew.java +++ b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/ExtractorAndroidNew.java @@ -15,6 +15,7 @@ import static iped.parsers.whatsapp.Message.MessageType.CHAT_ADDED_PRIVACY; import static iped.parsers.whatsapp.Message.MessageType.COMMUNITY_MANAGEMENT_ACTION; import static iped.parsers.whatsapp.Message.MessageType.COMMUNITY_RENAMED; +import static iped.parsers.whatsapp.Message.MessageType.COMMUNITY_WELCOME; import static iped.parsers.whatsapp.Message.MessageType.CONTACT_MESSAGE; import static iped.parsers.whatsapp.Message.MessageType.DELETED_BY_ADMIN; import static iped.parsers.whatsapp.Message.MessageType.DELETED_BY_SENDER; @@ -786,6 +787,9 @@ protected Message.MessageType decodeMessageType(int messageType, int status, Int case 118: result = PINNED_MESSAGE; break; + case 124: + result = COMMUNITY_WELCOME; + break; case 129: result = SENDER_IN_CONTACTS; break; From 0a593933f71fb181a3702165ba4910e5156c7149 Mon Sep 17 00:00:00 2001 From: tc-wleite Date: Wed, 24 Apr 2024 20:40:51 -0300 Subject: [PATCH 17/30] '#2175: Avoid NPE if fieldName is null. --- .../java/iped/engine/lucene/analysis/AppAnalyzer.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/iped-engine/src/main/java/iped/engine/lucene/analysis/AppAnalyzer.java b/iped-engine/src/main/java/iped/engine/lucene/analysis/AppAnalyzer.java index a3ad5e4d18..7fcc999baf 100644 --- a/iped-engine/src/main/java/iped/engine/lucene/analysis/AppAnalyzer.java +++ b/iped-engine/src/main/java/iped/engine/lucene/analysis/AppAnalyzer.java @@ -74,10 +74,12 @@ public static Analyzer get() { return new NonFinalPerFieldAnalyzerWrapper(defaultAnalyzer, analyzerPerField) { protected Analyzer getWrappedAnalyzer(String fieldName) { - // Use actual (non localized) field names to check if it is a date (See #2175). - fieldName = LocalizedProperties.getNonLocalizedField(fieldName); - if (Date.class.equals(IndexItem.getMetadataTypes().get(fieldName))) { - return new KeywordAnalyzer(); + if (fieldName != null) { + // Use actual (non localized) field names to check if it is a date (See #2175). + fieldName = LocalizedProperties.getNonLocalizedField(fieldName); + if (Date.class.equals(IndexItem.getMetadataTypes().get(fieldName))) { + return new KeywordAnalyzer(); + } } return super.getWrappedAnalyzer(fieldName); } From cb52055905671823eed4b83ff6f7ee19f60676c1 Mon Sep 17 00:00:00 2001 From: "patrick.pdb" Date: Thu, 25 Apr 2024 07:06:34 -0400 Subject: [PATCH 18/30] '#2121 first creation of mark was setting checked information incorrectly. --- .../src/main/resources/iped/geo/openstreet/L.KML.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/iped-geo/src/main/resources/iped/geo/openstreet/L.KML.js b/iped-geo/src/main/resources/iped/geo/openstreet/L.KML.js index 9681d0794b..ca657373c2 100644 --- a/iped-geo/src/main/resources/iped/geo/openstreet/L.KML.js +++ b/iped-geo/src/main/resources/iped/geo/openstreet/L.KML.js @@ -718,11 +718,19 @@ L.KML = L.MarkerClusterGroup.extend({ var m = new L.KMLMarker(new L.LatLng(lat, long), options); m.id=id; m.styles = this.styles; - m.checked=checked; + if(checked){ + m.checked='true'; + }else{ + m.checked='false'; + } m.selected=selected; m.name = name; m.descr = descr; - m.bindPopup('

' + m.name + '

' + m.descr, { className: 'kml-popup'}); + checkedstr=''; + if(checked){ + checkedstr='checked'; + } + m.bindPopup('

' + m.name + '

' + m.descr, { className: 'kml-popup'}); this.popupOpened=false; m.styleUrl='#item'; m.parent=this; From 20e848269c34975eda8cbeebb915c5a7379eefdb Mon Sep 17 00:00:00 2001 From: "patrick.pdb" Date: Thu, 25 Apr 2024 07:08:29 -0400 Subject: [PATCH 19/30] '#2121 checks it jsWork contains a reference before canceling it avoind NPE. --- .../main/java/iped/geo/impl/AppMapPanel.java | 27 ++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/iped-geo/src/main/java/iped/geo/impl/AppMapPanel.java b/iped-geo/src/main/java/iped/geo/impl/AppMapPanel.java index a4ccd84c3f..a974491db1 100644 --- a/iped-geo/src/main/java/iped/geo/impl/AppMapPanel.java +++ b/iped-geo/src/main/java/iped/geo/impl/AppMapPanel.java @@ -75,7 +75,6 @@ public class AppMapPanel extends JPanel implements Consumer { * SwingWorker that prepares the result with georeferenced items that will be * sent to the map */ - private GetResultsJSWorker jsWorker; private PropertyChangeListener lastPropertyChangeListener; static final String[] fieldNames = { "GEOMETRIC_SIMPLE", "GEOMETRIC_COMPLEX", "GEOMETRIC_MULTIPOLYGON", "GEOJSON" }; @@ -85,7 +84,15 @@ public enum MapLoadState { }; MapLoadState loadState = MapLoadState.NOTLOADED; + + // mapLoadWorker maintain the reference to the worker that loads all maps + // placemark private GetResultsJSWorker mapLoadWorker; + + // jsWorker maintain the reference to the worker that updates changes done on + // the placemarks and result set + private GetResultsJSWorker jsWorker; + private RoaringBitmap[] geoReferencedBitmap; public AppMapPanel(IMultiSearchResultProvider resultsProvider, GUIProvider guiProvider) { @@ -282,10 +289,16 @@ public void propertyChange(PropertyChangeEvent evt) { mapLoadWorker.execute(); } else if (loadState == MapLoadState.LOADING) { + // this piece of code can occur if soon after entering map panel, before all + // placemarks are loaded some filter is + // applied to the resultset (even more than once) + if (lastPropertyChangeListener != null) { // cancels prior map update in case it hasn't finished yet mapLoadWorker.removePropertyChangeListener(lastPropertyChangeListener); - jsWorker.cancel(true); + if (jsWorker != null) { + jsWorker.cancel(true); + } } AppMapPanel self = this; // enqueue the map update to run after map load worker ends. @@ -568,7 +581,15 @@ public String[] getSelectedRegexFeatures() { } public boolean hasItem(IItemId item) { - return geoReferencedBitmap[item.getSourceId()].contains(item.getId()); + if (geoReferencedBitmap == null) { + return false; + } + RoaringBitmap casegeoReferencedBitmap = geoReferencedBitmap[item.getSourceId()]; + if (casegeoReferencedBitmap == null) { + return casegeoReferencedBitmap.contains(item.getId()); + } else { + return false; + } } } From c0c7293860761ed48f7cb4bff265b5dd7f536944 Mon Sep 17 00:00:00 2001 From: "patrick.pdb" Date: Thu, 25 Apr 2024 07:10:41 -0400 Subject: [PATCH 20/30] '#passing empty roaring bitmap arrays when result is null due to worker cancelation to avoid NPEs. --- .../java/iped/geo/js/GetResultsJSWorker.java | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/iped-geo/src/main/java/iped/geo/js/GetResultsJSWorker.java b/iped-geo/src/main/java/iped/geo/js/GetResultsJSWorker.java index 7be076ca84..0b42e98f8a 100644 --- a/iped-geo/src/main/java/iped/geo/js/GetResultsJSWorker.java +++ b/iped-geo/src/main/java/iped/geo/js/GetResultsJSWorker.java @@ -67,7 +67,11 @@ public void done() { Object[] result = new Object[2]; try { result[0] = this.get(); - result[1] = lastResultBitmap; + if (lastResultBitmap != null) { + result[1] = lastResultBitmap; + } else { + result[1] = createCasesEmptyBitmapArray(msource);// creates an empty bitmap array to avoid NPE + } } catch (Exception e) { if (e instanceof CancellationException) { @@ -357,11 +361,7 @@ protected KMLResult createAllPlacemarks() throws Exception { int batchSize = 1000; Semaphore sem = new Semaphore(batchSize); - List sources = msource.getAtomicSources(); - lastResultBitmap = new RoaringBitmap[sources.size()]; - for (int i = 0; i < sources.size(); i++) { - lastResultBitmap[i] = new RoaringBitmap(); - } + lastResultBitmap = createCasesEmptyBitmapArray(msource); for (int row = 0; row < results.getLength(); row++) { if (isCancelled()) { @@ -487,4 +487,13 @@ public void run() { return kmlResult; } + public RoaringBitmap[] createCasesEmptyBitmapArray(IPEDMultiSource msource) { + List sources = msource.getAtomicSources(); + RoaringBitmap[] result = new RoaringBitmap[sources.size()]; + for (int i = 0; i < sources.size(); i++) { + result[i] = new RoaringBitmap(); + } + return result; + } + } From 33d045940ea582cdd07bb239eb073a05818e200f Mon Sep 17 00:00:00 2001 From: "patrick.pdb" Date: Thu, 25 Apr 2024 07:28:17 -0400 Subject: [PATCH 21/30] '#2121 Corrects logic from last commit (not present in master) --- iped-geo/src/main/java/iped/geo/impl/AppMapPanel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iped-geo/src/main/java/iped/geo/impl/AppMapPanel.java b/iped-geo/src/main/java/iped/geo/impl/AppMapPanel.java index a974491db1..c4c32a0c92 100644 --- a/iped-geo/src/main/java/iped/geo/impl/AppMapPanel.java +++ b/iped-geo/src/main/java/iped/geo/impl/AppMapPanel.java @@ -585,7 +585,7 @@ public boolean hasItem(IItemId item) { return false; } RoaringBitmap casegeoReferencedBitmap = geoReferencedBitmap[item.getSourceId()]; - if (casegeoReferencedBitmap == null) { + if (casegeoReferencedBitmap != null) { return casegeoReferencedBitmap.contains(item.getId()); } else { return false; From 9e531523c4d2f8e7285ff9e8d16c4e383ea47e68 Mon Sep 17 00:00:00 2001 From: "patrick.pdb" Date: Thu, 25 Apr 2024 07:30:02 -0400 Subject: [PATCH 22/30] '#2121 corrects logic avoiding map reloading after its first time ever load. --- .../main/java/iped/geo/impl/MapViewer.java | 44 ++++++++++--------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/iped-geo/src/main/java/iped/geo/impl/MapViewer.java b/iped-geo/src/main/java/iped/geo/impl/MapViewer.java index b96263afa6..d65c7c188b 100644 --- a/iped-geo/src/main/java/iped/geo/impl/MapViewer.java +++ b/iped-geo/src/main/java/iped/geo/impl/MapViewer.java @@ -136,32 +136,34 @@ public void tableChanged(TableModelEvent e) { if (!mapaPanel.browserCanvas.isLoaded()) { mapaPanel.updateMap(); - } - - /* - * Se a alteração foi feita no próprio mapa ou a operação é de ordenação, ela - * não precisa ser refeita. - */ - if (!desabilitaTemp) { - mapaPanel.setMapOutDated(true); + updatingCheckbox = false; + } else { + /* + * Se a alteração foi feita no próprio mapa ou a operação é de ordenação, ela + * não precisa ser refeita. + */ + if (!desabilitaTemp) { + mapaPanel.setMapOutDated(true); + + /* somente chamado se o tab de mapas estiver sendo exibido */ + if (dockable != null && dockable.isShowing()) { + if (!updatingCheckbox) { + mapaPanel.updateMap(); + } else { + mapaPanel.update(); + } - /* somente chamado se o tab de mapas estiver sendo exibido */ - if (dockable != null && dockable.isShowing()) { - if (!updatingCheckbox) { - mapaPanel.updateMap(); - } else { - mapaPanel.update(); + updatingCheckbox = false; } - + } else { + // reabilita renderização automatica pela alteração no modelo + desabilitaTemp = false; + } + if (dockable == null || !dockable.isShowing()) { updatingCheckbox = false; } - } else { - // reabilita renderização automatica pela alteração no modelo - desabilitaTemp = false; - } - if (dockable == null || !dockable.isShowing()) { - updatingCheckbox = false; } + } public void applyCheckedItems() { From c37700924ebe8253f3f687d0d179e02fd3790aad Mon Sep 17 00:00:00 2001 From: "patrick.pdb" Date: Thu, 25 Apr 2024 07:39:28 -0400 Subject: [PATCH 23/30] '#2121 Initialize themeScript variable to avoid NPE. --- .../src/main/java/iped/geo/openstreet/MapCanvasOpenStreet.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iped-geo/src/main/java/iped/geo/openstreet/MapCanvasOpenStreet.java b/iped-geo/src/main/java/iped/geo/openstreet/MapCanvasOpenStreet.java index 16a8afec7f..d0c07fa464 100644 --- a/iped-geo/src/main/java/iped/geo/openstreet/MapCanvasOpenStreet.java +++ b/iped-geo/src/main/java/iped/geo/openstreet/MapCanvasOpenStreet.java @@ -49,7 +49,7 @@ public class MapCanvasOpenStreet extends AbstractMapCanvas { String lastGoogleApiKey = null; private boolean htmlloaded; private Semaphore sem; - private String themeScript; + private String themeScript = MapCanvasOpenStreet.LIGHT_THEME_SCRIPT;; public MapCanvasOpenStreet() { this.jfxPanel = new JFXPanel(); From f25647e430195214014da6012b8b6d7c86bad36c Mon Sep 17 00:00:00 2001 From: tc-wleite Date: Thu, 25 Apr 2024 10:03:24 -0300 Subject: [PATCH 24/30] '#2182: Use a shorter name for "User Activities" categories. --- iped-app/resources/localization/iped-categories.properties | 4 ++-- .../resources/localization/iped-categories_de_DE.properties | 4 ++-- .../resources/localization/iped-categories_es_AR.properties | 4 ++-- .../resources/localization/iped-categories_it_IT.properties | 4 ++-- .../resources/localization/iped-categories_pt_BR.properties | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/iped-app/resources/localization/iped-categories.properties b/iped-app/resources/localization/iped-categories.properties index 6aff718351..0be75b7742 100644 --- a/iped-app/resources/localization/iped-categories.properties +++ b/iped-app/resources/localization/iped-categories.properties @@ -28,8 +28,8 @@ Windows\ Artifacts=Windows\ Artifacts Event\ Files=Event\ Files Event\ Records=Event\ Records Prefetch\ and\ Superfetch=Prefetch\ and\ Superfetch -User\ Activities=Windows\ 10\ User\ Timeline -User\ Activities\ Entries=Windows\ 10\ User\ Timeline\ Records +User\ Activities=User\ Timeline +User\ Activities\ Entries=User\ Timeline\ Records Windows\ Registry=Windows\ Registry Main\ Registry\ Files=Main\ Registry\ Files Other\ Registry\ Files=Other\ Registry\ Files diff --git a/iped-app/resources/localization/iped-categories_de_DE.properties b/iped-app/resources/localization/iped-categories_de_DE.properties index 0b02b8358c..172c25754d 100644 --- a/iped-app/resources/localization/iped-categories_de_DE.properties +++ b/iped-app/resources/localization/iped-categories_de_DE.properties @@ -28,8 +28,8 @@ Windows\ Artifacts=Windows\ Artefakte Event\ Files=Ereignis\ Dateien Event\ Records=Ereignis\ Aufzeichnungen Prefetch\ and\ Superfetch=Prefetch\ und\ Superfetch -User\ Activities=Windows\ 10\ Benutzer\ Zeitlinie -User\ Activities\ Entries=Windows\ 10\ Benutzer\ Zeitlinienaufzeichnungen +User\ Activities=Benutzer\ Zeitlinie +User\ Activities\ Entries=Benutzer\ Zeitlinienaufzeichnungen Windows\ Registry=Windows\ Registrierung Main\ Registry\ Files=wesentliche\ Registry-Dateien Other\ Registry\ Files=andere\ Registry-Dateien diff --git a/iped-app/resources/localization/iped-categories_es_AR.properties b/iped-app/resources/localization/iped-categories_es_AR.properties index 7cb4ea9cb7..5dc341a725 100644 --- a/iped-app/resources/localization/iped-categories_es_AR.properties +++ b/iped-app/resources/localization/iped-categories_es_AR.properties @@ -28,8 +28,8 @@ Windows\ Artifacts=Windows\ Artefactos Event\ Files=Eventos\ Archivos Event\ Records=Eventos\ Grabados Prefetch\ and\ Superfetch=Prefetch\ y\ Superfetch -User\ Activities=Windows\ 10\ Usuario\ Línea de tiempo -User\ Activities\ Entries=Windows\ 10\ Usuario\ Línea de tiempo\ Registros +User\ Activities=Usuario\ Línea de tiempo +User\ Activities\ Entries=Usuario\ Línea de tiempo\ Registros Windows\ Registry=Registros\ Windows Main\ Registry\ Files=Registro\ Principal\ Archivos Other\ Registry\ Files=Otros\ Registros\ de\ Archivos diff --git a/iped-app/resources/localization/iped-categories_it_IT.properties b/iped-app/resources/localization/iped-categories_it_IT.properties index d711d4a3c1..c57a81650f 100644 --- a/iped-app/resources/localization/iped-categories_it_IT.properties +++ b/iped-app/resources/localization/iped-categories_it_IT.properties @@ -28,8 +28,8 @@ Windows\ Artifacts=Windows\ Artifacts Event\ Files=File\ Evento Event\ Records=Registro\ Eventi Prefetch\ and\ Superfetch=Prefetch\ e\ Superfetch -User\ Activities=Timeline\ Utente\ Windows\ 10 -User\ Activities\ Entries=Timeline\ Eventi\ Utente\ Windows\ 10 +User\ Activities=Timeline\ Utente +User\ Activities\ Entries=Timeline\ Eventi\ Utente Windows\ Registry=Registro\ di\ Windows Main\ Registry\ Files=File\ Registro\ Principale Other\ Registry\ Files=Altri\ File\ di\ Registro diff --git a/iped-app/resources/localization/iped-categories_pt_BR.properties b/iped-app/resources/localization/iped-categories_pt_BR.properties index 157293ecbc..6839af35ee 100644 --- a/iped-app/resources/localization/iped-categories_pt_BR.properties +++ b/iped-app/resources/localization/iped-categories_pt_BR.properties @@ -28,8 +28,8 @@ Windows\ Artifacts=Artefatos\ do\ Windows Event\ Files=Arquivos\ de\ Eventos Event\ Records=Registros\ de\ Eventos Prefetch\ and\ Superfetch=Prefetch\ e\ Superfetch -User\ Activities=Linha\ do\ Tempo\ do\ Usuário\ do\ Windows\ 10 -User\ Activities\ Entries=Registros\ da\ Linha\ do\ Tempo\ do\ Usuário\ do\ Windows\ 10 +User\ Activities=Linha\ do\ Tempo\ do\ Usuário +User\ Activities\ Entries=Registros\ da\ Linha\ do\ Tempo\ do\ Usuário Windows\ Registry=Registro\ do\ Windows Main\ Registry\ Files=Arquivos\ de\ Registro\ Principais Other\ Registry\ Files=Outros\ Arquivos\ de\ Registro From 01554650f8848b3ea2af3b426802f4f299dde9fd Mon Sep 17 00:00:00 2001 From: Luis Nassif Date: Thu, 25 Apr 2024 16:43:40 -0300 Subject: [PATCH 25/30] '#2177: removes a duplicated ] --- .../localization/iped-desktop-messages_de_DE.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iped-app/resources/localization/iped-desktop-messages_de_DE.properties b/iped-app/resources/localization/iped-desktop-messages_de_DE.properties index 4365723074..5c0e3187ee 100644 --- a/iped-app/resources/localization/iped-desktop-messages_de_DE.properties +++ b/iped-app/resources/localization/iped-desktop-messages_de_DE.properties @@ -16,7 +16,7 @@ App.NoFilter=[kein Filter] App.Options=Optionen App.RecursiveListing=Rekursive Auflistung App.Search=Suche -App.SearchBoxTip=[Suchbegriff eingeben oder auswählen. Use [TAB] to autocomplete properties.][TBT]] +App.SearchBoxTip=[Suchbegriff eingeben oder auswählen. Use [TAB] to autocomplete properties.][TBT] App.SearchLabel=Suche: App.Table=Tabelle App.ToggleTimelineView=Tabelle in Zeitleistenansicht umschalten From 15a8129f72a758c302c09468a7b49830c4d8f6af Mon Sep 17 00:00:00 2001 From: Luis Nassif Date: Sat, 27 Apr 2024 17:45:34 -0300 Subject: [PATCH 26/30] '#1923: fix Spanish localization --- .../localization/iped-parsers-messages_es_AR.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 9be3564e7c..ff175fac36 100644 --- a/iped-app/resources/localization/iped-parsers-messages_es_AR.properties +++ b/iped-app/resources/localization/iped-parsers-messages_es_AR.properties @@ -311,7 +311,7 @@ WhatsAppReport.GroupAddedToCommunity=Group was added to the community[TBT] WhatsAppReport.GroupRemovedFromCommunity=Group was removed from the community[TBT] WhatsAppReport.AnyCommunityMemberCanJoinThisGroup=Cualquier miembro de la comunidad puede unirse a este grupo. WhatsAppReport.CommunityManagementAction=Community management action.[TBT] -WhatsAppReport.CommunityRenamed=cambió al nombre de la comunidad +WhatsAppReport.CommunityRenamed=cambió el nombre de la comunidad WhatsAppReport.CommunityWelcome=Welcome to the community.[TBT] WhatsAppReport.NewParticipantsNeedAdminApproval=New participants need admin approval to join this group.[TBT] WhatsAppReport.ChatAddedPrivacy=This chat has added privacy for your profile and phone number.[TBT] From 8fc96aa2c436eeb69037c4e94579a80bbe45d324 Mon Sep 17 00:00:00 2001 From: tc-wleite Date: Tue, 30 Apr 2024 18:19:50 -0300 Subject: [PATCH 27/30] '#2190: Skip rows with NULL member, to avoid a NPE. --- .../src/main/java/iped/parsers/whatsapp/Extractor.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/Extractor.java b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/Extractor.java index 9ce78d09a4..9255ff4e5c 100644 --- a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/Extractor.java +++ b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/Extractor.java @@ -62,11 +62,10 @@ protected void setGroupMembers(Chat c, Connection conn, String SELECT_GROUP_MEMB while (rs.next()) { String memberId = rs.getString("member"); - if (!memberId.trim().isEmpty()) { + if (memberId != null && !memberId.trim().isEmpty()) { c.getGroupMembers().add(contacts.getContact(memberId)); } } - } } } From ca00ac61f8251e175dc5ab663d8f48ed87c378c3 Mon Sep 17 00:00:00 2001 From: Luis Nassif Date: Wed, 1 May 2024 09:28:45 -0300 Subject: [PATCH 28/30] closes #2184: upgrade Telegram decoder to support new Telegram versions --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index fef2ceeaa7..072755a79f 100644 --- a/pom.xml +++ b/pom.xml @@ -43,7 +43,7 @@ 1.1-p6 3.34.0 1.1.2 - 1.0.10 + 1.0.11_1 3.10.1 1.4.1 From c1c24ad467b0613f8577763371db36fe254d2fb4 Mon Sep 17 00:00:00 2001 From: "patrick.pdb" Date: Thu, 2 May 2024 06:37:50 -0400 Subject: [PATCH 29/30] '#2189 New parsing configuration with list of the ufed:source names that IPED will ignore correspondent evidences as it has an internal parser. --- .../resources/config/conf/ParsingTaskConfig.txt | 3 +++ .../java/iped/engine/config/ParsingTaskConfig.java | 14 ++++++++++++++ .../java/iped/engine/datasource/UfedXmlReader.java | 13 +++++++++++-- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/iped-app/resources/config/conf/ParsingTaskConfig.txt b/iped-app/resources/config/conf/ParsingTaskConfig.txt index 84d21f5451..fbbfe93d66 100644 --- a/iped-app/resources/config/conf/ParsingTaskConfig.txt +++ b/iped-app/resources/config/conf/ParsingTaskConfig.txt @@ -32,6 +32,9 @@ minRawStringSize = 4 # Possible values: internal, external, all phoneParsersToUse = internal +# List of UFED sources names that IPED has an internal specific parser +internalParsersList = WhatsApp, WhatsApp (Dual App), WhatsApp Business, Telegram + # If true, takes into account the characters' position on the page when reconstructing the extracted text. # Needed to properly index rotated PDFs but doubles the processing time of PDFs. sortPDFChars = false diff --git a/iped-engine/src/main/java/iped/engine/config/ParsingTaskConfig.java b/iped-engine/src/main/java/iped/engine/config/ParsingTaskConfig.java index 7361069d0f..cead786efb 100644 --- a/iped-engine/src/main/java/iped/engine/config/ParsingTaskConfig.java +++ b/iped-engine/src/main/java/iped/engine/config/ParsingTaskConfig.java @@ -26,6 +26,7 @@ public class ParsingTaskConfig extends AbstractTaskPropertiesConfig { private boolean sortPDFChars; private boolean processImagesInPDFs = false; private String phoneParsersToUse; + private String internalParsersList; @Override public String getTaskEnableProperty() { @@ -108,6 +109,11 @@ public void processProperties(UTF8Properties properties) { phoneParsersToUse = value.trim(); } + value = properties.getProperty("internalParsersList"); //$NON-NLS-1$ + if (value != null) { + internalParsersList = value.trim(); + } + } public boolean isEnableExternalParsing() { @@ -158,4 +164,12 @@ public int getMinRawStringSize() { return minRawStringSize; } + public String getInternalParsersList() { + return internalParsersList; + } + + public void setInternalParsersList(String internalParsersList) { + this.internalParsersList = internalParsersList; + } + } diff --git a/iped-engine/src/main/java/iped/engine/datasource/UfedXmlReader.java b/iped-engine/src/main/java/iped/engine/datasource/UfedXmlReader.java index d8445ca6a1..5b98cfab0d 100644 --- a/iped-engine/src/main/java/iped/engine/datasource/UfedXmlReader.java +++ b/iped-engine/src/main/java/iped/engine/datasource/UfedXmlReader.java @@ -118,8 +118,8 @@ public class UfedXmlReader extends DataSourceReader { private static final String ESCAPED_UFED_ID = QueryBuilder.escape(UFED_ID); private static final String EMPTY_EXTRACTION_STR = "-"; - private final Set supportedApps = new HashSet( - Arrays.asList(WhatsAppParser.WHATSAPP, TelegramParser.TELEGRAM, WhatsAppParser.WHATSAPP + " Business")); + private Set supportedApps = new HashSet(Arrays.asList(WhatsAppParser.WHATSAPP, + TelegramParser.TELEGRAM, WhatsAppParser.WHATSAPP + " Business", WhatsAppParser.WHATSAPP + " (Dual App)")); private static Random random = new Random(); @@ -258,6 +258,15 @@ private void configureParsers(boolean isIOS) { PhoneParsingConfig.setUfdrReaderName(UfedXmlReader.class.getSimpleName()); + try { + supportedApps = new HashSet( + Arrays.asList(parsingConfig.getInternalParsersList().split("\\s*,\\s*"))); + } catch (Exception e) { + LOGGER.warn( + "Failed to parse internalParsersList parameter from ParsingConfig.txt. Using default internal value:" + + supportedApps.toString()); + } + if (!TelegramParser.isEnabledForUfdr()) { supportedApps.remove(TelegramParser.TELEGRAM); } From a51e3f3e3b25147ecc5b2b417a373a0cd8f17c1c Mon Sep 17 00:00:00 2001 From: Luis Nassif Date: Thu, 2 May 2024 16:00:48 -0300 Subject: [PATCH 30/30] '#2189: change parameter name, better comments, use static strings --- iped-app/resources/config/conf/ParsingTaskConfig.txt | 5 +++-- .../main/java/iped/engine/config/ParsingTaskConfig.java | 5 +++-- .../main/java/iped/engine/datasource/UfedXmlReader.java | 7 ++----- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/iped-app/resources/config/conf/ParsingTaskConfig.txt b/iped-app/resources/config/conf/ParsingTaskConfig.txt index fbbfe93d66..b30a4953c5 100644 --- a/iped-app/resources/config/conf/ParsingTaskConfig.txt +++ b/iped-app/resources/config/conf/ParsingTaskConfig.txt @@ -32,8 +32,9 @@ minRawStringSize = 4 # Possible values: internal, external, all phoneParsersToUse = internal -# List of UFED sources names that IPED has an internal specific parser -internalParsersList = WhatsApp, WhatsApp (Dual App), WhatsApp Business, Telegram +# List of UFED sources names for which IPED has a specific internal parser. +# This avoids duplicated decoding results when 'phoneParsersToUse = internal' +sourcesWithInternalParsers = WhatsApp, WhatsApp (Dual App), WhatsApp Business, Telegram # If true, takes into account the characters' position on the page when reconstructing the extracted text. # Needed to properly index rotated PDFs but doubles the processing time of PDFs. diff --git a/iped-engine/src/main/java/iped/engine/config/ParsingTaskConfig.java b/iped-engine/src/main/java/iped/engine/config/ParsingTaskConfig.java index cead786efb..545c88c434 100644 --- a/iped-engine/src/main/java/iped/engine/config/ParsingTaskConfig.java +++ b/iped-engine/src/main/java/iped/engine/config/ParsingTaskConfig.java @@ -10,9 +10,10 @@ public class ParsingTaskConfig extends AbstractTaskPropertiesConfig { private static final long serialVersionUID = 1L; public static final String ENABLE_PARAM = "enableFileParsing"; - private static final String CONF_FILE = "ParsingTaskConfig.txt"; + public static final String CONF_FILE = "ParsingTaskConfig.txt"; public static final String NUM_EXTERNAL_PARSERS = "numExternalParsers"; + public static final String SOURCES_WITH_PARSERS = "sourcesWithInternalParsers"; private boolean enableExternalParsing = false; private int numExternalParsers; @@ -109,7 +110,7 @@ public void processProperties(UTF8Properties properties) { phoneParsersToUse = value.trim(); } - value = properties.getProperty("internalParsersList"); //$NON-NLS-1$ + value = properties.getProperty(SOURCES_WITH_PARSERS); // $NON-NLS-1$ if (value != null) { internalParsersList = value.trim(); } diff --git a/iped-engine/src/main/java/iped/engine/datasource/UfedXmlReader.java b/iped-engine/src/main/java/iped/engine/datasource/UfedXmlReader.java index 5b98cfab0d..746b2ea2ff 100644 --- a/iped-engine/src/main/java/iped/engine/datasource/UfedXmlReader.java +++ b/iped-engine/src/main/java/iped/engine/datasource/UfedXmlReader.java @@ -259,12 +259,9 @@ private void configureParsers(boolean isIOS) { PhoneParsingConfig.setUfdrReaderName(UfedXmlReader.class.getSimpleName()); try { - supportedApps = new HashSet( - Arrays.asList(parsingConfig.getInternalParsersList().split("\\s*,\\s*"))); + supportedApps = new HashSet(Arrays.asList(parsingConfig.getInternalParsersList().split("\\s*,\\s*"))); } catch (Exception e) { - LOGGER.warn( - "Failed to parse internalParsersList parameter from ParsingConfig.txt. Using default internal value:" - + supportedApps.toString()); + LOGGER.warn("Failed to parse {} parameter from {}. Using default internal value: {}", ParsingTaskConfig.SOURCES_WITH_PARSERS, ParsingTaskConfig.CONF_FILE, supportedApps.toString()); } if (!TelegramParser.isEnabledForUfdr()) {