Skip to content

Commit

Permalink
Merge pull request #1997 from sepinf-inc/#1996_TransferOfFunds
Browse files Browse the repository at this point in the history
Handle UFDR "Transfer of Funds" and its child "Price" (#1996)
  • Loading branch information
lfcnassif authored Jan 23, 2024
2 parents 7193db9 + d813db5 commit f0886a0
Show file tree
Hide file tree
Showing 12 changed files with 43 additions and 2 deletions.
1 change: 1 addition & 0 deletions iped-app/resources/config/conf/CategoriesConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@
{"name": "File Downloads", "mimes": ["application/x-ufed-filedownload"]},
{"name": "File Uploads", "mimes": ["application/x-ufed-fileupload"]},
{"name": "Financial Accounts", "mimes": ["application/x-ufed-financialaccount"]},
{"name": "Transfers of Funds", "mimes": ["application/x-ufed-transferoffunds"]},
{"name": "Fuzzy Data", "mimes": ["application/x-ufed-fuzzyentitymodel", "application/x-ufed-fuzzytimelinemodel"]},
{"name": "Journeys", "mimes": ["application/x-ufed-journey"]},
{"name": "Networks Usage", "mimes": ["application/x-ufed-networkusage"]},
Expand Down
1 change: 1 addition & 0 deletions iped-app/resources/config/conf/CategoriesToExport.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
#File Downloads
#File Uploads
#Financial Accounts
#Transfers of Funds
#Fuzzy Data
#Journeys
#Networks Usage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ Windows Registry
#File Downloads
#File Uploads
#Financial Accounts
#Transfers of Funds
#Fuzzy Data
#Journeys
#Networks Usage
Expand Down
1 change: 1 addition & 0 deletions iped-app/resources/localization/iped-categories.properties
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ File\ Downloads=File\ Downloads
File\ Uploads=File\ Uploads
Fuzzy\ Data=Fuzzy\ Data
Financial\ Accounts=Financial\ Accounts
Transfers\ of\ Funds=Transfers\ of\ Funds
Journeys=Journeys
Networks\ Usage=Networks\ Usage
Recognized\ Devices=Recognized\ Devices
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ File\ Downloads=Datei-Downloads
File\ Uploads=File\ Uploads[TBT]
Financial\ Accounts=Financial\ Accounts[TBT]
Fuzzy\ Data=Fuzzy\ Data[TBT]
Transfers\ of\ Funds=Transfers\ of\ Funds[TBT]
Journeys=Reisen
Networks\ Usage=Netzwerknutzung
Recognized\ Devices=erkannte Geräte
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ File\ Downloads=Archivos\ Descargados
File\ Uploads=Subida\ de\ Archivos
Financial\ Accounts=Cuentas\ Financieras
Fuzzy\ Data=Difusos\ Datos
Transfers\ of\ Funds=Transfers\ of\ Funds[TBT]
Journeys=Viajes
Networks\ Usage=Uso\ de\ Redes
Recognized\ Devices=Dispositivos\ Reconocidos
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ File\ Downloads=Download\ File
File\ Uploads=File\ Uploads[TBT]
Financial\ Accounts=Financial\ Accounts[TBT]
Fuzzy\ Data=Fuzzy\ Data[TBT]
Transfers\ of\ Funds=Transfers\ of\ Funds[TBT]
Journeys=Viaggi
Networks\ Usage=Utilizzo\ Rete
Recognized\ Devices=Dispositivi\ Riconosciuti
Social\ Media\ Activities=Actività\ su\ Social\ Media
Social\ Media\ Activities=Actività\ su\ Social\ Media
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ File\ Downloads=Download\ de\ Arquivos
File\ Uploads=Upload \ de\ Arquivos
Fuzzy\ Data=Dados\ Indistintos
Financial\ Accounts=Contas Financeiras
Transfers\ of\ Funds=Transferências\ de\ Fundos
Journeys=Jornadas
Networks\ Usage=Uso\ de\ Redes
Recognized\ Devices=Dispositivos\ Identificados
Expand Down
5 changes: 5 additions & 0 deletions iped-app/src/main/java/iped/app/ui/IconManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,11 @@ private static Map<String, QualityIcon> initMimeToIconMap(int size) {
mimeIconMap.put("application/x-ufed-financialaccount", icon);
}

icon = availableIconsMap.get("transfer-funds");
if (icon != null) {
mimeIconMap.put("application/x-ufed-transferoffunds", icon);
}

icon = availableIconsMap.get("fuzzy-object");
if (icon != null) {
mimeIconMap.put("application/x-ufed-fuzzyentitymodel", icon);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import java.sql.ResultSet;
import java.sql.Statement;
import java.text.DateFormat;
import java.text.DecimalFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
Expand Down Expand Up @@ -88,6 +89,7 @@
import iped.properties.MediaTypes;
import iped.utils.FileInputStreamFactory;
import iped.utils.IOUtil;
import iped.utils.LocalizedFormat;
import iped.utils.SimpleHTMLEncoder;

public class UfedXmlReader extends DataSourceReader {
Expand Down Expand Up @@ -366,6 +368,8 @@ private class XMLContentHandler implements ContentHandler {

DateFormat out = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");

private final DecimalFormat currencyFormat = LocalizedFormat.getDecimalInstance("#,##0.00");

ArrayList<XmlNode> nodeSeq = new ArrayList<>();
ArrayList<Item> itemSeq = new ArrayList<>();

Expand Down Expand Up @@ -430,7 +434,8 @@ private XmlNode(String element, Attributes atts) {
"MessageLabel", //$NON-NLS-1$
"ProfilePicture", //$NON-NLS-1$
"WebAddress", //$NON-NLS-1$
"Reaction" //$NON-NLS-1$
"Reaction", //$NON-NLS-1$
"Price"
));

@Override
Expand Down Expand Up @@ -1017,6 +1022,29 @@ else if ("Bcc".equalsIgnoreCase(role)) //$NON-NLS-1$
if (reaction != null) {
parentItem.getMetadata().add(ExtraProperties.UFED_META_PREFIX + "Reaction", reaction);
}
} else if ("Price".equals(type)) {
String prop = ExtraProperties.UFED_META_PREFIX + "Amount";
String amount = item.getMetadata().get(prop);
if (amount != null) {
try {
double v = Double.parseDouble(amount);
if (v > 922337203685477.0) {
// Undefined values
amount = null;
} else {
amount = currencyFormat.format(v);
}
} catch (Exception e) {
}
if (amount != null) {
parentItem.getMetadata().add(prop, amount);
}
}
prop = ExtraProperties.UFED_META_PREFIX + "Currency";
String currency = item.getMetadata().get(prop);
if (currency != null) {
parentItem.getMetadata().add(prop, currency);
}
}
} else {
if (!ignoreItems) {
Expand Down

0 comments on commit f0886a0

Please sign in to comment.