mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-14 17:06:16 +00:00
revert broken change that attempted to find more hits, but actually found less...
This commit is contained in:
parent
b09b9d6d25
commit
ec85979bbe
@ -187,25 +187,18 @@ final class TermComponentQuery implements KeywordSearchQuery {
|
||||
try {
|
||||
//if the keyword hit matched the credit card number keyword/regex...
|
||||
if (keyword.getType() == ATTRIBUTE_TYPE.TSK_ACCOUNT_NUMBER) {
|
||||
termHit = CharMatcher.inRange('0', '9').negate().trimFrom(termHit);
|
||||
newArtifact = hit.getContent().newArtifact(ARTIFACT_TYPE.TSK_CREDIT_CARD_ACCOUNT);
|
||||
// make account artifact
|
||||
//try to match it against the track 1 regex
|
||||
Matcher matcher = TRACK1_PATTERN.matcher(hit.getSnippet());
|
||||
while (matcher.find()) {
|
||||
if (termHit.equals(matcher.group("accountNumber"))) {
|
||||
if (matcher.find()) {
|
||||
parseTrack1Data(newArtifact, matcher);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//then try to match it against the track 2 regex
|
||||
matcher = TRACK2_PATTERN.matcher(hit.getSnippet());
|
||||
while (matcher.find()) {
|
||||
final String group = matcher.group("accountNumber");
|
||||
if (termHit.equals(group)) {
|
||||
if (matcher.find()) {
|
||||
parseTrack2Data(newArtifact, matcher);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (hit.getContent() instanceof AbstractFile) {
|
||||
AbstractFile file = (AbstractFile) hit.getContent();
|
||||
|
Loading…
x
Reference in New Issue
Block a user