1.

Solve : random password genrator?

Answer» <html><body><p>i made this code to generate random passwords.<br/>the password often has spaces in it can some one help me fix it.<br/> Code: <a>[Select]</a>echo off<br/>:7<br/>cls<br/>set /p t=password length: <br/>set /a t=%t%-1<br/>set /a p=%random% %%9<br/>for /l<br/>set /a c=%random% %%<a href="https://interviewquestions.tuteehub.com/tag/18-242944" style="font-weight:bold;" target="_blank" title="Click to know more about 18">18</a><br/>set d=%c%<br/>if %c%==10 set d=a<br/>if %c%==11 set d=b<br/>if %c%==12 set d=c<br/>if %c%==13 set d=d <br/>if %c%==14 set d=e<br/>if %c%==15 set d=f <br/>if %c%==16 set d=g<br/>if %c%==17 set d=h <br/>if %c%==18 set d=i <br/>set p=%p%%d%<br/>set /a l=%l%+1<br/>goto a<br/>:out <br/>echo %p%<br/><a href="https://interviewquestions.tuteehub.com/tag/pause-1149128" style="font-weight:bold;" target="_blank" title="Click to know more about PAUSE">PAUSE</a> &gt; nul<br/>goto 7<br/>I tried to fix it, but I simply could not <a href="https://interviewquestions.tuteehub.com/tag/guess-1013936" style="font-weight:bold;" target="_blank" title="Click to know more about GUESS">GUESS</a> how the <strong>for</strong> statement was constructed. I checked in with the snippet closet and turned up this masterpiece that only needed a few tweaks.<br/><br/> Code: <a>[Select]</a>echo off<br/>setlocal<br/>set pool=ABCDEFGHIJKLMNOPQRSTUVWXYZabcde<a href="/cdn-cgi/l/email-protection">[email protected]</a>$?<br/><br/>:retry<br/>  set /p len=Enter length of <a href="https://interviewquestions.tuteehub.com/tag/key-11608" style="font-weight:bold;" target="_blank" title="Click to know more about KEY">KEY</a>: <br/>  if %len% GTR 65 goto retry<br/><br/>for /l %%i in (1, 1, %len%) do call :GetNext<br/>echo Key: %key%<br/>goto :eof<br/><br/>:GetNext<br/>  set /a rnd=(%random% %% 65) - 1<br/>  call set <a href="https://interviewquestions.tuteehub.com/tag/new-1114486" style="font-weight:bold;" target="_blank" title="Click to know more about NEW">NEW</a>=%%pool:~%rnd%,1%%<br/>  set key=%key%%new%<br/>  goto :eof<br/><br/>Good luck.</p></body></html>


Discussion

No Comment Found