CamRand is a flask program to generate random numbers off of a image taken by a camera.
CamRand creates its random numbers by taking a picture using FsWebcam. It then iterates over the picture's pixels to create a string of bits. This string is then hashed and compared to the previous seed. Thus, CamRand assures the creation of unique seeds.
If you keep getting 0s, make sure you have FsWebcam properly installed and have your camera facing some kind of entropy source. Even a camera facing a white wall gets enough entropy from the static generated by the camera. Any further issues should go in issues.
This project is created with:
rand.leibmann.org
rand.tennisbowling.com
Clone the Repo
git clone https://github.com/Pop101/CamRand
Install fswebcam
sudo apt update && sudo apt install fswebcam
Enter the Repo and Install requirements Note: Make sure libjpeg is installed (required for Pillow)
cd CamRand
poetry install
Run the app!
poetry run python3 webapp.py
That's it! you can access it at
127.0.0.1:1000