Jump to content

kornkaobat

Member
  • Posts

    1
  • Joined

  • Last visited

Awards

This user doesn't have any awards

kornkaobat's Achievements

  1. The `tracert` command randomly takes about 50-90 seconds to finish, depending on *ISP,IIG and server jumping*. I've made a script which measure the time which took to run this command and use that number to calculate a *pseudo-random number*. After initial testing, the script seems to be working fine and generates one pseudorandom number on a specific range of integers. @echo off cls color 0a title TimeRandom set reduct=1 set increase=1 set div=2 setlocal :notice cls echo TimeRandom uses tracert on some specific domain as a source of randomness. echo. echo Try to set the most furthest server from your location or the server echo with the highest ping. echo. echo For generation of numbers below or equal to 60, You should make sure echo the tracert command runs for at least 70 seconds or more for true randomness. echo. echo This program automatically adjusts itself to high maxbound numbers and or low valuerange echo. echo Boundaries ranging from 1-60 runtime : 75-90 seconds (est.) echo Boundaries ranging from 61-1073741824 runtime : 90 seconds (est.) echo Bizarre low valuerange boundaries : 90 seconds (est.) echo. echo The code author does not guarantee that this code generate true random numbers. Use with caution. echo. echo The code author should not be responsible for the misuse of this code against all laws and treaties. echo. set /p ackn=Continue(Y/N): if %ackn%==Y goto :setbound if %ackn%==y goto :setbound goto :EOF :setbound cls set /p lowbound=InputLowbound: set /p maxbound=InputMaxbound: if %maxbound% LEQ %lowbound% goto :EOF goto :init :init cls call :GetUnixTime utimebefore tracert www.roblox.com call :GetUnixTime utimeafter set /a deltaubm=%utimeafter%-%utimebefore% if %maxbound% LEQ 60 set /a deltau=%deltaubm% && goto :chkfn goto :initincr :initincr cls set /a med=(%lowbound%+%maxbound%)/2 set /a deltaubm=%deltaubm%*%deltaubm% if %deltaubm% GTR %maxbound% goto :reductexpo goto :initincr :reductexpo cls set /a deltaubm=%deltaubm%/%div% if %deltaubm% LEQ %maxbound% set deltau=%deltaubm% && goto :chkfn goto :reductexpo :chkfn if %deltau% GTR %maxbound% goto :reductloop if %deltau% EQU %maxbound% set varnum=%deltau% && goto :result if %deltau% GTR %lowbound% set varnum=%deltau% && goto :result if %deltau% EQU %lowbound% set varnum=%deltau% && goto :result if %deltau% LSS %lowbound% goto :incrloop :reductloop cls set /a deltau=%deltau%-%reduct% set /a reduct=%reduct%+1 if %deltau% GTR %maxbound% goto :reductloop if %deltau% EQU %maxbound% set varnum=%deltau% && goto :result if %deltau% GTR %lowbound% set varnum=%deltau% && goto :result if %deltau% EQU %lowbound% set varnum=%deltau% && goto :result if %deltau% LSS %lowbound% goto :incrloop :incrloop cls set /a deltau=%deltau%+%increase% set /a increase=%increase%+1 if %deltau% GTR %maxbound% goto :reductloop if %deltau% EQU %maxbound% set varnum=%deltau% && goto :result if %deltau% GTR %lowbound% set varnum=%deltau% && goto :result if %deltau% EQU %lowbound% set varnum=%deltau% && goto :result if %deltau% LSS %lowbound% goto :incrloop :result cls echo Random Result echo. echo %varnum% echo. pause goto :setbound :GetUnixTime setlocal enableextensions for /f %%x in ('wmic path win32_utctime get /format:list ^| findstr "="') do ( set %%x) set /a z=(14-100%Month%%%100)/12, y=10000%Year%%%10000-z set /a ut=y*365+y/4-y/100+y/400+(153*(100%Month%%%100+12*z-3)+2)/5+Day-719469 set /a ut=ut*86400+100%Hour%%%100*3600+100%Minute%%%100*60+100%Second%%%100 endlocal & set "%1=%ut%" & goto :EOF Thanks to Ritchie Lawrence for UNIX time converter script.
×