|
|
|
var ft:text; s,t,r,e:string; ch1,ch2,ch3:char; a,b,c,x,y,i,j,leng,vibor,sch1:integer; | |
begin if a=0 then ch1:='0'; | |
if a=1 then ch1:='1'; if a=81 then ch1:='?'; | |
if a=2 then ch1:='2'; if a=82 then ch1:=','; | |
if a=3 then ch1:='3'; if a=83 then ch1:='.'; | |
if a=4 then ch1:='4'; if a=84 then ch1:='/'; | |
if a=5 then ch1:='5'; if a=85 then ch1:='?'; | |
if a=6 then ch1:='6'; if a=86 then ch1:=''; | |
if a=7 then ch1:='7'; if a=87 then ch1:='|'; | |
if a=8 then ch1:='8'; if a=88 then ch1:='`'; | |
if a=9 then ch1:='9'; if a=89 then ch1:='~'; | |
if a=10 then ch1:='a'; if a=90 then ch1:='_'; | |
if a=11 then ch1:='b'; if a=91 then ch1:='-'; | |
if a=12 then ch1:='c'; if a=92 then ch1:='+'; | |
if a=13 then ch1:='d'; if a=93{}then ch1:='='; | |
if a=14 then ch1:='e'; | |
if a=15 then ch1:='f'; | |
if a=16 then ch1:='g'; | |
if a=17 then ch1:='h'; | |
if a=18 then ch1:='i'; | |
if a=19 then ch1:='j'; | |
if a=20 then ch1:='k'; | |
if a=21 then ch1:='l'; | |
if a=22 then ch1:='m'; | |
if a=23 then ch1:='n'; | |
if a=24 then ch1:='o'; | |
if a=25 then ch1:='p'; | |
if a=26 then ch1:='q'; | |
if a=27 then ch1:='r'; | |
if a=28 then ch1:='s'; | |
if a=29 then ch1:='t'; | |
if a=30 then ch1:='u'; | |
if a=31 then ch1:='v'; | |
if a=32 then ch1:='w'; | |
if a=33 then ch1:='x'; | |
if a=34 then ch1:='y'; | |
if a=35 then ch1:='z'; | |
if a=36 then ch1:='A'; | |
if a=37 then ch1:='B'; | |
if a=38 then ch1:='C'; | |
if a=39 then ch1:='D'; | |
if a=40 then ch1:='E'; | |
if a=41 then ch1:='F'; | |
if a=42 then ch1:='G'; | |
if a=43 then ch1:='H'; | |
if a=44 then ch1:='I'; | |
if a=45 then ch1:='J'; | |
if a=46 then ch1:='K'; | |
if a=47 then ch1:='L'; | |
if a=48 then ch1:='M'; | |
if a=49 then ch1:='N'; | |
if a=50 then ch1:='O'; | |
if a=51 then ch1:='P'; | |
if a=52 then ch1:='Q'; | |
if a=53 then ch1:='R'; | |
if a=54 then ch1:='S'; | |
if a=55 then ch1:='T'; | |
if a=56 then ch1:='U'; | |
if a=57 then ch1:='V'; | |
if a=58 then ch1:='W'; | |
if a=59 then ch1:='X'; | |
if a=60 then ch1:='Y'; | |
if a=61 then ch1:='Z'; | |
if a=62 then ch1:='!'; | |
if a=63 then ch1:='@'; | |
if a=64 then ch1:='#'; | |
if a=65 then ch1:='$'; | |
if a=66 then ch1:='%'; | |
if a=67 then ch1:='^'; | |
if a=68 then ch1:='&'; | |
if a=69 then ch1:='*'; | |
if a=70 then ch1:='('; | |
if a=71 then ch1:=')'; | |
if a=72 then ch1:='{'; | |
if a=73 then ch1:='}'; | |
if a=74 then ch1:='['; | |
if a=75 then ch1:=']'; | |
if a=76 then ch1:=':'; | |
if a=77 then ch1:='"'; | |
if a=78 then ch1:=';'; | |
if a=79 then ch1:='<'; | |
if a=80 then ch1:='>'; | |
textbackground(7); | |
window(3,3,79,24); | |
textbackground(0); | |
window(2,2,78,23); | |
textbackground(1); | |
textcolor(3); | |
gotoxy(1,1); write('a'); | |
gotoxy(1,22); write('L'); | |
gotoxy(77,1); write('¬'); x:=1; y:=1; | |
repeat inc(y); gotoxy(x,y); write('¦'); until y>=21; x:=77; y:=1; | |
repeat inc(y); gotoxy(x,y); write('¦'); until y>=21; x:=1; y:=1; | |
repeat inc(x); gotoxy(x,y); write('='); until x>=76; x:=1; y:=22; | |
repeat inc(x); gotoxy(x,y); write('='); until x>=76; gotoxy(76,22); write(''); gotoxy(77,21); write(''); | |
window(3,3,77,22); | |
textbackground(1); | |
textcolor(10); | |
writeln('Выберете способ генерации паролей.'); textcolor(14); | |
writeln('1) - 0-9'); | |
writeln('2) - 0-9 + a-z'); | |
writeln('3) - 0-9 + A-Z'); | |
writeln('4) - 0-9 + a-z + A-Z'); | |
writeln('5) - 0-9 + a-z + A-Z + @#$...'); | |
repeat textcolor(11); readln(vibor); textcolor(14); if (vibor<=0)or(vibor>=11) then begin writeln(''); writeln('Введи правильный вариант... 1-10'); end; until (vibor>0)and(vibor<=10); | |
writeln(''); writeln('Введите длинну пароля (1...253)'); e:=' '; b:=0; | |
repeat textcolor(11); readln(leng); writeln(''); textcolor(14); if (leng<=0)or(leng>=254) then writeln('Введи правильный вариант... 1-253'); until (leng>0)and(leng<=253); | |
repeat inc(b); s:=s+e; until b=leng; i:=0; | |
repeat if vibor>=6 then writeln('Введи правильный вариант...'); until vibor<=5; | |
if vibor=1 then begin | |
repeat inc(i); | |
a:=random(10)+0; gener; s[i]:=ch1; until i=leng; textcolor(10); writeln('Ваш пароль...'); writeln(''); textcolor(11); writeln(s); end; | |
if vibor=2 then begin | |
repeat inc(i); | |
a:=random(35)+0; gener; s[i]:=ch1; until i=leng; textcolor(10); writeln('Ваш пароль...'); writeln(''); textcolor(11); writeln(s); end; | |
if vibor=3 then begin | |
repeat inc(i); | |
a:=random(10)+0; gener; ch2:=ch1; | |
a:=random(33)+36; gener; a:=random(2)+1; if a=1 then | |
s[i]:=ch1 else s[i]:=ch2; until i=leng; textcolor(10); writeln('Aao ia?ieu...'); writeln(''); textcolor(11); writeln(s); end; | |
if vibor=4 then begin | |
repeat inc(i); | |
a:=random(61)+0; gener; s[i]:=ch1; until i=leng; textcolor(10); writeln('Ваш пароль...'); writeln(''); textcolor(11); writeln(s); end; | |
if vibor=5 then begin | |
repeat inc(i); | |
a:=random(93)+0; gener; s[i]:=ch1; until i=leng; textcolor(10); writeln('Ваш пароль...'); writeln(''); textcolor(11); writeln(s); end; | |
textcolor(10); writeln('Сохранить в *.txt документе...? (y/n)'); | |
repeat textcolor(11); readln(ch3); textcolor(14); if (ch3<>'y')and(ch3<>'Y')and(ch3<>'n')and(ch3<>'N') then begin | |
textcolor(14); writeln('Введи правильный варинт... (y/n)'); end; until (ch3='y')or(ch3='Y')or(ch3='n')or(ch3='N'); | |
if (ch3='y')or(ch3='Y') then begin writeln('Введи имя сохраняемого *.txt файла...'); r:='.txt'; textcolor(11); | |
repeat readln(t); i:=0; repeat inc(i); | |
if (t[i]='a')or(t[i]='l')or(t[i]='w')or(t[i]='G')or(t[i]='Q')or | |
(t[i]='b')or(t[i]='m')or(t[i]='x')or(t[i]='H')or(t[i]='R')or | |
(t[i]='c')or(t[i]='n')or(t[i]='y')or(t[i]='I')or(t[i]='S')or | |
(t[i]='d')or(t[i]='o')or(t[i]='z')or(t[i]='J')or(t[i]='T')or | |
(t[i]='e')or(t[i]='p')or(t[i]='A')or(t[i]='K')or(t[i]='U')or | |
(t[i]='f')or(t[i]='q')or(t[i]='B')or(t[i]='L')or(t[i]='V')or | |
(t[i]='g')or(t[i]='r')or(t[i]='C')or(t[i]='M')or(t[i]='W')or | |
(t[i]='h')or(t[i]='s')or(t[i]='D')or(t[i]='N')or(t[i]='X')or | |
(t[i]='i')or(t[i]='t')or(t[i]='E')or(t[i]='O')or(t[i]='Y')or | |
(t[i]='j')or(t[i]='u')or(t[i]='F')or(t[i]='P')or(t[i]='Z')or | |
(t[i]='k')or(t[i]='v')or(t[i]=' ') then sch1:=1 else sch1:=0; until i=length(t); | |
if sch1=0 then begin textcolor(10); writeln('Введите название *.txt документа латинскими буквами'); textcolor(11); end; | |
until sch1=1; | |
textcolor(14); t:=t+r; | |
assign(ft,t); rewrite(ft); writeln(ft); write(ft,s); close(ft); c:=0; | |
repeat inc(c); | |
gotoxy(2,20); write(''); delay(20); | |
gotoxy(2,20); write('|'); delay(20); | |
gotoxy(2,20); write('/'); delay(20); | |
gotoxy(2,20); write('-'); delay(20); | |
until c=20; end; writeln(''); textcolor(10); writeln('Файл ',t,' сохранён...'); textcolor(14); writeln(''); | |
writeln('Счасливо...!'); delay(1500); | |