kenoskynci / opendlp

Automatically exported from code.google.com/p/opendlp
0 stars 0 forks source link

Consider any sequence of digits to be a credit card if that sequence passes the Luhn check #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
A sequence of numbers of a certain minimum and maximum length, if matches the 
Luhn checksum,  
should be considered a credit card number. This might be a little slower than 
regex but should 
catch all of the real ones.

The regex should also have the Luhn check applied if they match as well to cast 
out false positives.

Original issue reported on code.google.com by gger...@gmail.com on 10 May 2010 at 7:08

GoogleCodeExporter commented 9 years ago
While this is a good idea, I think this could get kind of messy.  I think the 
best
option would be for you to create a regular expression that matches any 
sequences of
numbers.  After this is done, add that regex's name to the list of credit card
numbers in a new policy.  OpenDLP already does the Luhn/mod10 check on credit 
card
regexes, so it would run those matches through the check to determine if it is a
valid number.

One caveat: OpenDLP 0.1 has a bug where it hardcodes the "these are credit 
cards"
policy option in the agent's configuration file.  I have fixed this bug on my 
end and
version 0.2 will be released in a few days.

Original comment by andrew.O...@gmail.com on 11 May 2010 at 3:14