CVV – Misc – CSAW17

CVV – Misc – CSAW17

In this challenge we were asked to give card number, there are different steps, firstly we are asked card number for Visa, Master Card, Discovery, American Express they must be sent only once.

The next step is to give cards numbers which start with 4 given digits, next card number finish with one given number and finally tell if the given card number is valid or not.

First of all we implemented luhn algorithm which is used to check validity of card number.

def luhncheck(values):
    values_check = []
    for i in range (0, 15):
        if i % 2 == 0:
            if values[i] * 2 <10:
                values_check.append(values[i]*2 - 9)
    som = 0
    for v in values_check:
        som += v
    return (10 - (som % 10)) % 10

You can find full script to solve tis challenge on my Github. The flag is flag{ch3ck-exp3rian-dat3-b3for3-us3}

Leave a Reply

Your email address will not be published. Required fields are marked *