Author Options:

How do you make a random number generator? Answered

Picture of

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.

5 Replies

BurfBest Answer (author)2011-03-27

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.

Select as Best AnswerUndo Best Answer

Vyger (author)2011-03-28

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.

Select as Best AnswerUndo Best Answer

g-one (author)2011-03-27

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

Select as Best AnswerUndo Best Answer

rickharris (author)2011-03-27

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.

Select as Best AnswerUndo Best Answer

lemonie (author)2011-03-27

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...



Select as Best AnswerUndo Best Answer