Giter Club home page Giter Club logo

cpfgen's Introduction

CPFgen

A CPF generator writen in Go.

Description

The CPF number (Cadastro de Pessoas Físicas; Portuguese for "Natural Persons Register") is the Brazilian individual taxpayer registry identification. This number is attributed by the Brazilian Federal Revenue to Brazilians and resident aliens who, directly or indirectly, pay taxes in Brazil. It is an 11-digit number in the format 000.000.000-00.

This program generates valid CPF numbers according to given criteria. See program help for more details.

Getting Started

After cloning the repository, you can run the program either with go run ./main.go or by compiling it with go build and then running ./CPFgen.

Usage

./CPFgen -h
Usage of ./CPFgen:
  -e	use heuristics when generating CPF
  -f int
    	output format (1: 11122233345,
    	  2: 111.222.333-45, 3: 111222333-45) (default 1)
  -l	list regions and their codes
  -n int
    	generate n random CPF numbers
  -o string
    	output results to file
  -r string
    	comma-separated list with region codes (default "0,1,2,3,4,5,6,7,8,9")
  -v	verbose

Available regions

Code Regions
0 RS
1 DF, GO, MS, MT, TO
2 AC, AM, AP, PA, RO, RR
3 CE, MA, PI
4 AL, PB, PE, RN
5 BA, SE
6 MG
7 ES, RJ
8 SP
9 PR, SC

Brazil's map

Example

Randomly generate 50000 CPFs (-n 50000) from São Paulo (-r 8) and write results to output/cpf-sp.txt.

./CPFgen -r 8 -n 50000 -o output/cpf-sp.txt

Note

  • The output can easily reach the order of Gigabytes. Ensure you have enough disk space before saving any output.
  • When using -o, the provided file will be overwritten without confirmation.

License

This program is licensed under GNU GPLv3. For more information, refer to LICENSE.txt.

cpfgen's People

Contributors

y0k4i-1337 avatar

Stargazers

sunwar avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.