{"id":22344850,"url":"https://github.com/sherinur/creditcard","last_synced_at":"2025-03-26T10:13:42.233Z","repository":{"id":275128415,"uuid":"847243544","full_name":"sherinur/creditcard","owner":"sherinur","description":"In this project, I created a tool called creditcard to: 1. Validate credit card numbers. 2. Generate possible card numbers. 3. Get information about card brands and issuers. 4. Issue new card numbers.","archived":false,"fork":false,"pushed_at":"2024-08-25T09:15:05.000Z","size":1260,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T11:33:11.981Z","etag":null,"topics":["creditcard","generator","go","golang","luhn-algorithm","luhn-checksum","validation"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sherinur.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-25T09:01:50.000Z","updated_at":"2024-12-13T06:39:02.000Z","dependencies_parsed_at":"2025-01-31T11:45:23.713Z","dependency_job_id":null,"html_url":"https://github.com/sherinur/creditcard","commit_stats":null,"previous_names":["sherinur/creditcard"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sherinur%2Fcreditcard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sherinur%2Fcreditcard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sherinur%2Fcreditcard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sherinur%2Fcreditcard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sherinur","download_url":"https://codeload.github.com/sherinur/creditcard/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245632418,"owners_count":20647194,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["creditcard","generator","go","golang","luhn-algorithm","luhn-checksum","validation"],"created_at":"2024-12-04T09:15:16.786Z","updated_at":"2025-03-26T10:13:42.227Z","avatar_url":"https://github.com/sherinur.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# creditcard\nIn this project, I created a tool called creditcard to: \n  1. Validate credit card numbers.\n  2. Generate possible card numbers.\n  3. Get information about card brands and issuers.\n  4. Issue new card numbers.\n     \n## Context\nCredit cards are used to pay for goods and services. Each card has a unique number that helps identify the cardholder and the issuing bank. Credit card numbers are long to ensure each card is unique. \nFor example:\n   1. Visa uses 13- and 16-digit numbers.\n   2. MasterCard uses 16-digit numbers.\n   3. American Express uses 15-digit numbers.\n\nThese numbers are not random. They follow specific patterns:\n   1. Visa numbers start with 4.\n   2. MasterCard numbers start with 51, 52, 53, 54, or 55.\n   3. American Express numbers start with 34 or 37.\n\nCredit card numbers also include a \"checksum\" that helps detect errors. This is done using Luhn's Algorithm, a simple math formula that checks if the number is valid.\n\n### Validate\nThe validate feature checks if a credit card number is valid using Luhn's Algorithm.\n  Requirements:\n    The number must be at least 13 digits long.\n    If valid, print OK to stdout and exit with status 0.\n    If invalid, print INCORRECT to stderr and exit with status 1.\n    Support passing multiple entries.\n    Support --stdin flag to pass number from stdin.\n\n    $ ./creditcard validate \"4400430180300003\"\n    OK\n    $ ./creditcard validate \"4400430180300002\"\n    INCORRECT\n    $ ./creditcard validate \"4400430180300003\" \"4400430180300011\"\n    OK\n    OK\n    $ echo \"4400430180300003\" | ./creditcard validate --stdin\n    OK\n    $ echo \"4400430180300003\" \"4400430180300011\" | ./creditcard validate --stdin\n    OK\n    OK\n\n### Generate\nThe generate feature creates possible credit card numbers by replacing asterisks (*) with digits.\n  Requirements:\n    Replace up to 4 asterisks (*) with digits. If more - it's an error. Asterisks should be at the end of the given credit card number.\n    Print the generated numbers to stdout.\n    Numbers must be printed in ascending order.\n    Exit with status 1 if there is any error.\n    Support --pick flag to randomly pick a single entry.\n\n    $ ./creditcard generate \"440043018030****\"\n    4400430180300003\n    4400430180300011\n    4400430180300029\n    ...\n    4400430180309988\n    4400430180309996\n    $ ./creditcard generate --pick \"440043018030****\"\n    4400430180304385\n\n    In case of an error:\n    $ ./creditcard generate --pick \"44004301803*****\"\n    $ echo $?\n    1\n\n### Information\nThe information feature provides details about the card based on data in brands.txt and issuers.txt.\n  Requirements:\n    Output the card number, validity, brand, and issuer.\n    Support --stdin flag to pass number from stdin.\n    Support passing multiple entries.\n\n    $ ./creditcard information --brands=brands.txt --issuers=issuers.txt \"4400430180300003\"\n    4400430180300003\n    Correct: yes\n    Card Brand: VISA\n    Card Issuer: Kaspi Gold\n    \n### Issue\nThe issue feature generates a random valid credit card number for a specified brand and issuer.\n    Requirements:\n      Pick a random number for the specified brand and issuer.\n      Exit with status 1 if there is any error.\n\n      $ ./creditcard issue --brands=brands.txt --issuers=issuers.txt --brand=VISA --issuer=\"Kaspi Gold\"\n      4400430180300003\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsherinur%2Fcreditcard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsherinur%2Fcreditcard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsherinur%2Fcreditcard/lists"}