How do you make a random number generator?

I'm a big fan of spy movies and enjoy watching them enter a room which requires a passcode with a device they have.
I was wondering if anyone knows how to have your computer run through numbers. possibly using cmd
command prompt.

Picture of How do you make a random number generator?
sort by: active | newest | oldest
Burf6 years ago
Random number generators are readily available for download all over the net for free. Here is just one I saw at CNET.com.

Search Google for many others.
Vyger6 years ago
My old digital watch has a random number generator.
Problem with many security devices is that they usually limit how many times you can try a number , then they lock you out.
Spy movies are not based on fact mostly. Watch some of the movie busting episodes of Myth Busters. The sad thing is that a lot of people accept them as fact rather than the fiction that they are.
g-one6 years ago

It makes no sense to work with random numbers. You should define a minimum, a maximum and probably the number of digits. Then run a loop over the entire range and try with each generated number.
Batch code:

@echo off &setlocal enabledelayedexpansion
set min=0
set max=500
set digits=5

set "zeros="
for /l %%i in (1,1,%digits%) do set "zeros=0!zeros!"
for /l %%i in (%min%,1,%max%) do (
  set num=%zeros%%%i
  call :proc !num:~-%digits%!
goto :eof

REM Your stuff here. You have to work with %1.
echo %1
goto :eof

rickharris6 years ago
Crack a keypad -

1. Spray with product that reacts with sweat (luminol may do)

2. Illuminate with UV light

The keys used will shine out.
lemonie6 years ago

You'd still have to punch the numbers into the keypad though?
If you can try as many times as you like these things can be unlocked. The problem is how long you've got for trying...