First i'd like to say that this is for testing only. If you try to use this program for any illegal practices what so ever... you will be responsable for your actions and i will be responsable for nothing. you would need some kind of security code generator to illegally use these generated card numbers any ways. and im pretty sure that they don't exist because the banks issue them. but im not the most knowlagable about these kinds of things either. i just researched the anatomy of a credit card a little.
This program will generate sudo random credit card numbers for Master, Discover, American Express, and Visa cards. There is also a check in the code that will verify that it has generated a valid card number based on card prefix to card issuer, card lenth to card issuer, and Luhn check.
if there is anything that you see wrong with the logic, please let me know. and if you guys have any suggestions of what i can do better, or how to make it less lines, then shoot me a line. also sorry that it's so sloppy. i try to keep it clean but im not a very organized person and i have only been programming in python for a few months. thanks