Splunk Search

How to create an algo for finding card numbers?

Kk
Path Finder

Hi All, I have been working on the luhn algorithm to validate the credit card. For that, I have used the below link query. The query is correct, but it is cannot validate the correct credit card numbers.Sometimes it will result the not valid cards too. Pls refer to this below link and help out to find the valid cards.

 

https://gosplunk.com/detect-credit-card-numbers-using-luhn-algorithm/

@ITWhisperer @aasabatini 

Labels (2)
Tags (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

I am not an expert on Luhn calculations but this looks a little odd to me - for example, why are the digits reversed? Doesn't this give problems with even length series of digits?

Kk
Path Finder

According to luhn algo, we take even digits from front in a number. But we fail if this case in case of odd digits. So basically if we come from reverse end whether it may be odd or even the results will be perfect.

Anyway, I have figured out the solution and thx for the response👍.

0 Karma
Get Updates on the Splunk Community!

What You Read The Most: Splunk Lantern’s Most Popular Articles!

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...

Index This | What goes away as soon as you talk about it?

May 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...