From 91a8ac66085d5f3c6e5df142dc509039ee1bb44d Mon Sep 17 00:00:00 2001 From: "patrick.pdb" Date: Fri, 16 Jun 2023 09:35:28 -0400 Subject: [PATCH 1/7] '#467 - External parser regex group named key and value are respectively used as metadata key and value. If inexistent, uses group 1 and 2 to keep backward compatibility. - Created regex for Recyclebin and Prefetch timestamps extractions. - Created parsing logic on DateUtil class to parse Prefetch dates. --- .../resources/config/conf/ExternalParsers.xml | 7 +++ .../iped/parsers/external/ExternalParser.java | 20 ++++++++- .../src/main/java/iped/utils/DateUtil.java | 44 ++++++++++++++++++- 3 files changed, 67 insertions(+), 4 deletions(-) diff --git a/iped-app/resources/config/conf/ExternalParsers.xml b/iped-app/resources/config/conf/ExternalParsers.xml index 34921dce54..a811749381 100644 --- a/iped-app/resources/config/conf/ExternalParsers.xml +++ b/iped-app/resources/config/conf/ExternalParsers.xml @@ -79,6 +79,9 @@ application/x-prefetch ISO-8859-1 + + (?<key>[A-Za-z0-9\s]+):\s*(\d+\s*:\s*)?(?<value>((Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(0[1-9]|[1-2][0-9]|3[0-1]),?\s\d{4}\s([0-1][0-9]|2[0-3]):([0-5][0-9]):(([0-5][0-9])(\.\d*)?)\sUTC)) + @@ -94,6 +97,10 @@ UTF-8 3 + + + (\d{4}[:-](0[1-9]|1[0-2])[:-](0[1-9]|[1-2][0-9]|3[0-1])(\s|T)([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])Z?) + diff --git a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/external/ExternalParser.java b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/external/ExternalParser.java index c0dfd307c7..55bb7cebe1 100644 --- a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/external/ExternalParser.java +++ b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/external/ExternalParser.java @@ -255,7 +255,7 @@ private void parse(TikaInputStream stream, XHTMLContentHandler xhtml, Metadata m boolean inputToStdIn = true; boolean outputFromStdOut = true; boolean hasPatterns = (metadataPatterns != null && !metadataPatterns.isEmpty()); - + File outputFile = tmp.createTemporaryFile(); // Build our command @@ -286,6 +286,9 @@ private void parse(TikaInputStream stream, XHTMLContentHandler xhtml, Metadata m // Execute Process process = null; try { + if(cmd[0].contains("sccainfo")) { + System.out.println(); + } if (cmd.length == 1) { process = Runtime.getRuntime().exec(cmd[0], null, workDir); } else { @@ -515,7 +518,20 @@ private void extractMetadata(final InputStream stream, final Metadata metadata) if (metadataPatterns.get(p) != null && !metadataPatterns.get(p).equals("")) { metadata.add(metadataPatterns.get(p), m.group(1)); } else { - metadata.add(m.group(1), m.group(2)); + String propertyName; + String value; + try { + propertyName = m.group("key"); + propertyName=propertyName.replace(" ", "").replace("\t", "").replace("\n", "").replace("\r", ""); + }catch (IllegalArgumentException iae) { + propertyName = m.group(1); + } + try { + value = m.group("value"); + }catch (IllegalArgumentException iae) { + value = m.group(2); + } + metadata.add(parserName+":"+propertyName, value); } } } diff --git a/iped-utils/src/main/java/iped/utils/DateUtil.java b/iped-utils/src/main/java/iped/utils/DateUtil.java index 15560c05f6..84dc17ca33 100644 --- a/iped-utils/src/main/java/iped/utils/DateUtil.java +++ b/iped-utils/src/main/java/iped/utils/DateUtil.java @@ -23,6 +23,8 @@ public class DateUtil { private static final DateUtil INSTANCE = new DateUtil(); + private static Pattern pattern; + private static DateFormat createDateFormat(String format, TimeZone timezone) { final SimpleDateFormat sdf = new SimpleDateFormat(format, new DateFormatSymbols(Locale.US)); if (timezone != null) { @@ -38,6 +40,8 @@ private static DateFormat createDateFormat(String format, TimeZone timezone) { */ private final List iso8601InputFormats = loadDateFormats(); + private final DateFormat monthFormat = new SimpleDateFormat("MMM dd, YYYY HH:mm:ssZ"); + private List loadDateFormats() { List dateFormats = new ArrayList<>(); // yyyy-mm-ddThh... @@ -84,6 +88,26 @@ public Date tryToParse(String dateString) { return null; } + /** + * Tries to parse the date string; returns null if no parse was possible. + * + * This is not thread safe! Wrap in synchronized or create new {@link DateUtils} + * for each class. + * + * @param dateString + * @return + */ + public Date tryToParseExt(String dateString) { + try { + dateString = dateString.replaceAll("\\.\\d*\\s", "");//removes milliseconds + return monthFormat.parse(dateString); + } catch (java.text.ParseException e) { + + } + + return null; + } + /** * Thread-safe method internally synchronized * @@ -95,8 +119,15 @@ public static Date tryToParseDate(String val) { synchronized (INSTANCE) { return INSTANCE.tryToParse(val); } - } else - return null; + } else { + if(val.length()>=21 && Character.isDigit(val.charAt(4)) && val.charAt(6)==',') { + synchronized (INSTANCE) { + return INSTANCE.tryToParseExt(val); + } + }else { + return null; + } + } } // Thread local variable @@ -117,4 +148,13 @@ public static Date stringToDate(String date) throws ParseException { return threadLocal.get().parse(date); } + public static Pattern getDateStrPattern(){ + if(pattern==null) { + String patternStr = "(?\\d{4}[:-](0[1-9]|1[0-2])[:-](0[1-9]|[1-2][0-9]|3[0-1])(\\s|T)([0-1][0-9]|2[0-3])\\:([0-5][0-9])\\:([0-5][0-9])Z?)" + + "|((Mon|Tue|Wed|Thu|Fri|Sat|Sun)\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(0[1-9]|[1-2][0-9]|3[0-1])\\s([0-1][0-9]|2[0-3])\\:([0-5][0-9])\\:(([0-5][0-9])Z?)\\s\\d{4})"; + pattern = Pattern.compile(patternStr); + } + return pattern; + } + } From b11d9d2e0ae407a45717e41f8e28dc35785ea691 Mon Sep 17 00:00:00 2001 From: "patrick.pdb" Date: Wed, 21 Jun 2023 06:39:33 -0400 Subject: [PATCH 2/7] Adds a comment with info on how to use regex to extract metadata. --- iped-app/resources/config/conf/ExternalParsers.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/iped-app/resources/config/conf/ExternalParsers.xml b/iped-app/resources/config/conf/ExternalParsers.xml index a811749381..ac3415102f 100644 --- a/iped-app/resources/config/conf/ExternalParsers.xml +++ b/iped-app/resources/config/conf/ExternalParsers.xml @@ -67,6 +67,13 @@ --> + PrefetchParser tools/sccainfo/ From 2f3ddc7323450c47b6bc6eebb86b43fb28740462 Mon Sep 17 00:00:00 2001 From: "patrick.pdb" Date: Wed, 21 Jun 2023 06:39:56 -0400 Subject: [PATCH 3/7] improves comment. --- iped-app/resources/config/conf/ExternalParsers.xml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/iped-app/resources/config/conf/ExternalParsers.xml b/iped-app/resources/config/conf/ExternalParsers.xml index ac3415102f..064fed6449 100644 --- a/iped-app/resources/config/conf/ExternalParsers.xml +++ b/iped-app/resources/config/conf/ExternalParsers.xml @@ -69,10 +69,7 @@ PrefetchParser From 8f1a865d1dd1626751db211acc8a97566cb7f1da Mon Sep 17 00:00:00 2001 From: "patrick.pdb" Date: Thu, 22 Jun 2023 12:49:32 -0400 Subject: [PATCH 4/7] Creates a config tag that changes the behavior of external parsers with metadata extraction, appending the cmd output to the textual item content if the tag is present with the metadata extraction tag. --- .../resources/config/conf/ExternalParsers.xml | 16 ++++++++-- .../iped/parsers/external/ExternalParser.java | 30 ++++++++++++++----- .../external/ExternalParsersConfigReader.java | 15 ++++++++++ .../ExternalParsersConfigReaderMetKeys.java | 2 ++ 4 files changed, 52 insertions(+), 11 deletions(-) diff --git a/iped-app/resources/config/conf/ExternalParsers.xml b/iped-app/resources/config/conf/ExternalParsers.xml index 064fed6449..87faa7f620 100644 --- a/iped-app/resources/config/conf/ExternalParsers.xml +++ b/iped-app/resources/config/conf/ExternalParsers.xml @@ -85,7 +85,8 @@ ISO-8859-1 (?<key>[A-Za-z0-9\s]+):\s*(\d+\s*:\s*)?(?<value>((Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(0[1-9]|[1-2][0-9]|3[0-1]),?\s\d{4}\s([0-1][0-9]|2[0-3]):([0-5][0-9]):(([0-5][0-9])(\.\d*)?)\sUTC)) - + + @@ -104,7 +105,8 @@ (\d{4}[:-](0[1-9]|1[0-2])[:-](0[1-9]|[1-2][0-9]|3[0-1])(\s|T)([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])Z?) - + + @@ -120,6 +122,10 @@ UTF-8 3 + + (\d{4}[:-](0[1-9]|1[0-2])[:-](0[1-9]|[1-2][0-9]|3[0-1])(\s|T)([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])Z?) + + @@ -162,6 +168,10 @@ application/x-superfetch ISO-8859-1 - + + (?<key>[A-Za-z0-9\s]+):\s*(\d+\s*:\s*)?(?<value>((Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(0[1-9]|[1-2][0-9]|3[0-1]),?\s\d{4}\s([0-1][0-9]|2[0-3]):([0-5][0-9]):(([0-5][0-9])(\.\d*)?)\sUTC)) + + + diff --git a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/external/ExternalParser.java b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/external/ExternalParser.java index 55bb7cebe1..997712c094 100644 --- a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/external/ExternalParser.java +++ b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/external/ExternalParser.java @@ -67,6 +67,12 @@ public class ExternalParser extends AbstractParser { private static Logger LOGGER; + public final static int IGNORE = 0; + public final static int APPEND = 1; + public final static int SPLITSUBITEM = 2; + + int outputExtractionScheme = 0;// default is to ignore + public static final String EXTERNAL_PARSERS_ROOT = "iped.extParsers.root"; /** @@ -210,6 +216,15 @@ public void setMetadataExtractionPatterns(Map patterns) { this.metadataPatterns = patterns; } + /** + * Sets the map of regular expression patterns and Metadata keys. Any matching + * patterns will have the matching metadata entries set. Set this to null to + * disable Metadata extraction. + */ + public void setOutputExtractionScheme(int scheme) { + this.outputExtractionScheme = scheme; + } + /** * Executes the configured external command and passes the given document stream * as a simple XHTML document to the given SAX content handler. Metadata is only @@ -286,9 +301,6 @@ private void parse(TikaInputStream stream, XHTMLContentHandler xhtml, Metadata m // Execute Process process = null; try { - if(cmd[0].contains("sccainfo")) { - System.out.println(); - } if (cmd.length == 1) { process = Runtime.getRuntime().exec(cmd[0], null, workDir); } else { @@ -333,15 +345,17 @@ private void parse(TikaInputStream stream, XHTMLContentHandler xhtml, Metadata m process.waitFor(); - try (InputStream is = new FileInputStream(outputFile)) { - if (hasPatterns) { + if (hasPatterns) { + try (InputStream is = new FileInputStream(outputFile)) { extractMetadata(is, metadata); - } else { + } + } + if (outputExtractionScheme == APPEND) { + try (InputStream is = new FileInputStream(outputFile)) { File tmpFile = inputToStdIn ? null : stream.getFile(); extractOutput(is, xhtml, metadata.get(TikaCoreProperties.RESOURCE_NAME_KEY), tmpFile); } } - } catch (InterruptedException e) { LOGGER.warn( parserName + " interrupted while processing " + metadata.get(TikaCoreProperties.RESOURCE_NAME_KEY) @@ -363,8 +377,8 @@ private Thread extractOutputInBackground(final InputStream stream, final File ou public void run() { try { Files.copy(stream, outFile.toPath(), StandardCopyOption.REPLACE_EXISTING); - } catch (IOException e) { + e.printStackTrace(); } } }; diff --git a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/external/ExternalParsersConfigReader.java b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/external/ExternalParsersConfigReader.java index 300ec1d508..f3afc707d5 100644 --- a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/external/ExternalParsersConfigReader.java +++ b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/external/ExternalParsersConfigReader.java @@ -108,6 +108,7 @@ public static List read(Element element) throws TikaException, I private static ExternalParser readParser(Element parserDef) throws TikaException { ExternalParser parser = new ExternalParser(); + String appendStr = null; NodeList children = parserDef.getChildNodes(); Element checkElement = null; for (int i = 0; i < children.getLength(); i++) { @@ -122,6 +123,9 @@ private static ExternalParser readParser(Element parserDef) throws TikaException parser.setSupportedTypes(readMimeTypes(child)); } else if (child.getTagName().equals(METADATA_TAG)) { parser.setMetadataExtractionPatterns(readMetadataPatterns(child)); + parser.setOutputExtractionScheme(ExternalParser.IGNORE); + } else if (child.getTagName().equals(APPENDCONTENT_TAG)) { + appendStr = getString(child); } else if (child.getTagName().equals(PARSER_NAME_TAG)) { parser.setParserName(getString(child)); } else if (child.getTagName().equals(WIN_TOOL_PATH)) { @@ -135,6 +139,17 @@ private static ExternalParser readParser(Element parserDef) throws TikaException } } } + if (appendStr != null) { + parser.setOutputExtractionScheme(ExternalParser.APPEND); + if (!"".equals(appendStr.trim())) { + parser.setOutputExtractionScheme(Integer.parseInt(appendStr)); + } + } else { + if (parser.getMetadataExtractionPatterns() != null) { + parser.setOutputExtractionScheme(ExternalParser.IGNORE);// if metadata extraction is defined, default + // behavior is to ignore text content + } + } if (checkElement != null) { String tool = parser.getCommand()[0].split(" ")[0]; synchronized (lock) { diff --git a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/external/ExternalParsersConfigReaderMetKeys.java b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/external/ExternalParsersConfigReaderMetKeys.java index 9951759c7e..9fb287d920 100644 --- a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/external/ExternalParsersConfigReaderMetKeys.java +++ b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/external/ExternalParsersConfigReaderMetKeys.java @@ -37,6 +37,8 @@ public interface ExternalParsersConfigReaderMetKeys { String METADATA_TAG = "metadata"; + String APPENDCONTENT_TAG = "appendtextcontent"; + String METADATA_MATCH_TAG = "match"; String METADATA_KEY_ATTR = "key"; From e577760ebfa72c2d514321a44e2ed7e9b49b1570 Mon Sep 17 00:00:00 2001 From: "patrick.pdb" Date: Thu, 22 Jun 2023 13:25:02 -0400 Subject: [PATCH 5/7] Changing the name of the external parser config tag to a more java bean like name. --- iped-app/resources/config/conf/ExternalParsers.xml | 8 ++++---- .../external/ExternalParsersConfigReaderMetKeys.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/iped-app/resources/config/conf/ExternalParsers.xml b/iped-app/resources/config/conf/ExternalParsers.xml index 87faa7f620..0f14886a03 100644 --- a/iped-app/resources/config/conf/ExternalParsers.xml +++ b/iped-app/resources/config/conf/ExternalParsers.xml @@ -86,7 +86,7 @@ (?<key>[A-Za-z0-9\s]+):\s*(\d+\s*:\s*)?(?<value>((Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(0[1-9]|[1-2][0-9]|3[0-1]),?\s\d{4}\s([0-1][0-9]|2[0-3]):([0-5][0-9]):(([0-5][0-9])(\.\d*)?)\sUTC)) - + @@ -106,7 +106,7 @@ (\d{4}[:-](0[1-9]|1[0-2])[:-](0[1-9]|[1-2][0-9]|3[0-1])(\s|T)([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])Z?) - + @@ -125,7 +125,7 @@ (\d{4}[:-](0[1-9]|1[0-2])[:-](0[1-9]|[1-2][0-9]|3[0-1])(\s|T)([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])Z?) - + @@ -171,7 +171,7 @@ (?<key>[A-Za-z0-9\s]+):\s*(\d+\s*:\s*)?(?<value>((Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(0[1-9]|[1-2][0-9]|3[0-1]),?\s\d{4}\s([0-1][0-9]|2[0-3]):([0-5][0-9]):(([0-5][0-9])(\.\d*)?)\sUTC)) - + diff --git a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/external/ExternalParsersConfigReaderMetKeys.java b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/external/ExternalParsersConfigReaderMetKeys.java index 9fb287d920..d2b4cade76 100644 --- a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/external/ExternalParsersConfigReaderMetKeys.java +++ b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/external/ExternalParsersConfigReaderMetKeys.java @@ -37,7 +37,7 @@ public interface ExternalParsersConfigReaderMetKeys { String METADATA_TAG = "metadata"; - String APPENDCONTENT_TAG = "appendtextcontent"; + String APPENDCONTENT_TAG = "appendTextContent"; String METADATA_MATCH_TAG = "match"; From 3d0dc7ab72d4faa65ef06a558c4939c15bcecc63 Mon Sep 17 00:00:00 2001 From: "patrick.pdb" Date: Thu, 22 Jun 2023 14:13:50 -0400 Subject: [PATCH 6/7] Change the config to be compatible to current JUnit tests that defines a empty metadata tag (without any regex). --- .../java/iped/parsers/external/ExternalParser.java | 10 +++++----- .../parsers/external/ExternalParsersConfigReader.java | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/external/ExternalParser.java b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/external/ExternalParser.java index 997712c094..8edc5d1c4b 100644 --- a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/external/ExternalParser.java +++ b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/external/ExternalParser.java @@ -71,7 +71,7 @@ public class ExternalParser extends AbstractParser { public final static int APPEND = 1; public final static int SPLITSUBITEM = 2; - int outputExtractionScheme = 0;// default is to ignore + int outputExtractionScheme = APPEND;// default is to ignore public static final String EXTERNAL_PARSERS_ROOT = "iped.extParsers.root"; @@ -94,11 +94,11 @@ public interface LineConsumer extends Serializable { */ LineConsumer NULL = new LineConsumer() { /** - * - */ - private static final long serialVersionUID = 1L; + * + */ + private static final long serialVersionUID = 1L; - @Override + @Override public void consume(String line) { // ignores } diff --git a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/external/ExternalParsersConfigReader.java b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/external/ExternalParsersConfigReader.java index f3afc707d5..f1193b32c6 100644 --- a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/external/ExternalParsersConfigReader.java +++ b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/external/ExternalParsersConfigReader.java @@ -123,7 +123,6 @@ private static ExternalParser readParser(Element parserDef) throws TikaException parser.setSupportedTypes(readMimeTypes(child)); } else if (child.getTagName().equals(METADATA_TAG)) { parser.setMetadataExtractionPatterns(readMetadataPatterns(child)); - parser.setOutputExtractionScheme(ExternalParser.IGNORE); } else if (child.getTagName().equals(APPENDCONTENT_TAG)) { appendStr = getString(child); } else if (child.getTagName().equals(PARSER_NAME_TAG)) { @@ -145,7 +144,7 @@ private static ExternalParser readParser(Element parserDef) throws TikaException parser.setOutputExtractionScheme(Integer.parseInt(appendStr)); } } else { - if (parser.getMetadataExtractionPatterns() != null) { + if (parser.getMetadataExtractionPatterns() != null && parser.getMetadataExtractionPatterns().size() > 0) { parser.setOutputExtractionScheme(ExternalParser.IGNORE);// if metadata extraction is defined, default // behavior is to ignore text content } From f1e889db951a1fb4a13227f2fc536b36728f5e14 Mon Sep 17 00:00:00 2001 From: "patrick.pdb" Date: Thu, 22 Jun 2023 14:15:40 -0400 Subject: [PATCH 7/7] Changes config tag name to a more reasonable one. --- iped-app/resources/config/conf/ExternalParsers.xml | 8 ++++---- .../external/ExternalParsersConfigReaderMetKeys.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/iped-app/resources/config/conf/ExternalParsers.xml b/iped-app/resources/config/conf/ExternalParsers.xml index 0f14886a03..97bfd88f79 100644 --- a/iped-app/resources/config/conf/ExternalParsers.xml +++ b/iped-app/resources/config/conf/ExternalParsers.xml @@ -86,7 +86,7 @@ (?<key>[A-Za-z0-9\s]+):\s*(\d+\s*:\s*)?(?<value>((Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(0[1-9]|[1-2][0-9]|3[0-1]),?\s\d{4}\s([0-1][0-9]|2[0-3]):([0-5][0-9]):(([0-5][0-9])(\.\d*)?)\sUTC)) - + @@ -106,7 +106,7 @@ (\d{4}[:-](0[1-9]|1[0-2])[:-](0[1-9]|[1-2][0-9]|3[0-1])(\s|T)([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])Z?) - + @@ -125,7 +125,7 @@ (\d{4}[:-](0[1-9]|1[0-2])[:-](0[1-9]|[1-2][0-9]|3[0-1])(\s|T)([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])Z?) - + @@ -171,7 +171,7 @@ (?<key>[A-Za-z0-9\s]+):\s*(\d+\s*:\s*)?(?<value>((Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(0[1-9]|[1-2][0-9]|3[0-1]),?\s\d{4}\s([0-1][0-9]|2[0-3]):([0-5][0-9]):(([0-5][0-9])(\.\d*)?)\sUTC)) - + diff --git a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/external/ExternalParsersConfigReaderMetKeys.java b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/external/ExternalParsersConfigReaderMetKeys.java index d2b4cade76..21ef01e903 100644 --- a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/external/ExternalParsersConfigReaderMetKeys.java +++ b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/external/ExternalParsersConfigReaderMetKeys.java @@ -37,7 +37,7 @@ public interface ExternalParsersConfigReaderMetKeys { String METADATA_TAG = "metadata"; - String APPENDCONTENT_TAG = "appendTextContent"; + String APPENDCONTENT_TAG = "extractAsTextContent"; String METADATA_MATCH_TAG = "match";