Created
April 25, 2020 19:03
-
-
Save m-primo/1c53ba85fab189e5324699c6f239c5f1 to your computer and use it in GitHub Desktop.
Credit Card CVV random generator - python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Imports | |
############################################################### | |
import random | |
############################################################### | |
# Functions | |
############################################################### | |
def generateCVV(type): | |
if type == 1: | |
i = random.randint(0, 9) | |
j = random.randint(0, 9) | |
k = random.randint(0, 9) | |
cvv = str(i) + str(j) + str(k) | |
print(cvv) | |
#elif type == 2: | |
# for i in range(10): | |
# for j in range(10): | |
# for k in range(10): | |
# cvv = str(i) + str(j) + str(k) | |
# print(cvv) | |
############################################################### | |
# Application | |
############################################################### | |
def main(): | |
print("--------------------------------------------------") | |
print("--------------> CVV Generator Tool <--------------") | |
print("--------------------------------------------------") | |
print("Version 1.1 - April 27, 2019") | |
print("© Copyright 2019 Primo. All rights reserved.") | |
print("##################################################") | |
print("Please enter an option:") | |
print("(1) Generate One CVV") | |
#print("(2) Get All CVVs") | |
print("(0) Quit") | |
print("##################################################") | |
while True: | |
input_Type = int(input()) | |
if input_Type == 1 or input_Type == 0: | |
if input_Type != 0: | |
generateCVV(input_Type) | |
else: | |
quit() | |
else: | |
print("Please enter a valid option.") | |
############################################################### | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment