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 {
|
try {
|
||||||
//if the keyword hit matched the credit card number keyword/regex...
|
//if the keyword hit matched the credit card number keyword/regex...
|
||||||
if (keyword.getType() == ATTRIBUTE_TYPE.TSK_ACCOUNT_NUMBER) {
|
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);
|
newArtifact = hit.getContent().newArtifact(ARTIFACT_TYPE.TSK_CREDIT_CARD_ACCOUNT);
|
||||||
// make account artifact
|
// make account artifact
|
||||||
//try to match it against the track 1 regex
|
//try to match it against the track 1 regex
|
||||||
Matcher matcher = TRACK1_PATTERN.matcher(hit.getSnippet());
|
Matcher matcher = TRACK1_PATTERN.matcher(hit.getSnippet());
|
||||||
while (matcher.find()) {
|
if (matcher.find()) {
|
||||||
if (termHit.equals(matcher.group("accountNumber"))) {
|
parseTrack1Data(newArtifact, matcher);
|
||||||
parseTrack1Data(newArtifact, matcher);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//then try to match it against the track 2 regex
|
//then try to match it against the track 2 regex
|
||||||
matcher = TRACK2_PATTERN.matcher(hit.getSnippet());
|
matcher = TRACK2_PATTERN.matcher(hit.getSnippet());
|
||||||
while (matcher.find()) {
|
if (matcher.find()) {
|
||||||
final String group = matcher.group("accountNumber");
|
parseTrack2Data(newArtifact, matcher);
|
||||||
if (termHit.equals(group)) {
|
|
||||||
parseTrack2Data(newArtifact, matcher);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (hit.getContent() instanceof AbstractFile) {
|
if (hit.getContent() instanceof AbstractFile) {
|
||||||
AbstractFile file = (AbstractFile) hit.getContent();
|
AbstractFile file = (AbstractFile) hit.getContent();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user