Skip to content

Commit

Permalink
new feature: generate mother's name as well
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-kisteleki committed Dec 13, 2021
1 parent 0d89ba6 commit 94773fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
# Date Of Birth Generator
# Date Of Birth (and Mother's Name) )Generator

A simple Python script to consistently generate a date of birth (DoB) for you.
A simple Python script to consistently generate a date of birth (DoB) and a mother's name for you.

## Why?

Many websites, during signup, require that you fill in your date of birth. This is used in many cases to "prove" you're above a certain age, e.g. 13 or 18 or wahtever. In fact the DoB is not needed for that as it is no proof in itself; simply asking for your age would be enough. (IANAL but the practice is probably illegal in the EU because of GDPR; but that's a different story.) In reality this is just data harvesting.

You may need to remember your own DoB you filled in during signup in case you later want to recover your password or such. So filling in a random date is not good enough (unless you actually remember, or make your keychain remember it, or always fill in the same fake date, or ...)

As an additional feature, v0.2 also generates a semi-random "mother's name" for you, just in case.

## What?

This script generates a DoB for you. Given the same inputs it'll generate the same "random" DoB. Inputs are:
This script generates a DoB and a "mother's name" (really just a string) for you. Given the same inputs it'll generate the same "random" DoB and name. Inputs are:
* your account name, ie. email address
* an optional service name, defaults to emppty string
* an optional minimum age (as a number, defaults to 18)

## How?

The script is really just a trivial function that takes the above arguments (at a minimum the account name) and returns a DoB.
The script is really just a trivial function that takes the above arguments (at a minimum the account name) and returns a DoB and a string.

## Demo / DoB-as-a-Service

Expand Down
2 changes: 1 addition & 1 deletion dob-generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ def dob_generator(account, service="", minyears=18):
hash_val = int(hash, base=16)
s_notrandom = hash_val % (s_max-s_min)

return datetime.date.fromtimestamp(s_min + s_notrandom)
return datetime.date.fromtimestamp(s_min + s_notrandom), hash[1:16]

print(dob_generator("[email protected]","twitter"))

0 comments on commit 94773fe

Please sign in to comment.