Advertisement
Guest User

Generator haseł

a guest
Oct 11th, 2013
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.71 KB | None | 0 0
  1. @echo off & setlocal enabledelayedexpansion
  2.  
  3. Set "str=ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz"
  4.  
  5. Set /p H=Podaj długo˜† hasˆa:
  6.  If %H% leq 0 (cls&echo Zbyt maˆa warto˜†&call %0)
  7.  
  8.  For /l %%a in (1;1;%H%) do (
  9.     Call :letter %%a
  10.         If %%a equ 1 (
  11.             Echo @echo !string[%%a]!^^^^>>tmp.bat
  12.     ) else (
  13.                 Echo !string[%%a]!^^^^>>tmp.bat
  14.     )
  15. )
  16.  For /f "delims=" %%x in ('call tmp.bat') do set pass=%%x
  17.  Del tmp.bat
  18.  
  19. :choice
  20. Cls
  21. Echo Wygenerowane hasˆo: %pass%
  22.  Set /p S=Zapisa†? t/n
  23.     If %S% equ t (echo %pass%>>Password.txt&exit)
  24.     If %S% neq t (if %S% neq n (goto :choice))
  25.     If %S% equ n exit
  26.  
  27. :letter
  28. Set /a R=!random!%%62
  29. Set string[%1]=!str:~%R%,1!
  30. Goto :EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement