Skip to main content

--distance=

Part of evaluating the confidence level is to detect certain key words near the value which can hint about the presence of a card number. For example, finding words like "card", "tarjeta", "pan", etc. is a possible indicator of having a card number near that word.

Normmally we check for the presence of these words in the preceeding 50 characters before the number being evaluated. This number of characters is what we call "distance".

Using this flag we can specify a different value for that distance between the key word and the number in order to control how we calculate the confidence level.

Examples

Example A: The key word is within the specified distance (Confidence level is increased)

The customer paied with a Visa card: 4511234567890123

  • The substring preceeding the value is (37 characters): "The customer paied with a Visa card: "
  • Result: given that the used distance is 50 (value by default), we search for key words inside the full string. We find the words Visa and card so the confidence level is increased.

Example B: Key words outside the range (Confidence level unchanged)

The Visa card has been used in a transaction created by the user John Doe in the evening: 4511234567890123

  • The string preceding the value contains 90 characters.
  • With the default value (--distance 50) the string to consider is: "tion created by the user John Doe in the evening: ". No key words are present in that string so the confidence level is unchanged.
  • If we use a different value like --distance 120, the key words Visa and card would be present and the confidence level would have been increased.

Example C: The key words appear after the possible PAN (Confidence level unchanged)

4511234567890123 is the Visa card number.

  • Substrinb before the number: "" (the line starts directly with the PAN).
  • Result: As the tool only searches for words that appear before the PAN, no key words are detected in this case so the confidence level is unchanged.
⬅️ Volver a la página anterior