level 1
这个程序用随机生成字符来加密程序,加密强度极大。。。。
放上源代码……
var
a:array[1..32] of char;
i,v,n:integer;
t:longint;
x,j:char;
begin
fillchar(a,sizeof(a),0);
randomize;
t:=0;
assign(input,'source.txt');
assign(output,'key.log');
reset(input);
rewrite(output);
for i:=1 to 32 do
begin
j:=chr(trunc(random(255-32+1))+32);
write(j,' ');
a[i]:=j;
end;
close(output);
assign(output,'output.txt');
rewrite(output);
while not eof do
begin
if (not eoln) then
begin
inc(t);
v:=t mod 32;
if (v=0) then v:=32;
read(x);
n:=(ord(x)+ord(a[v])) mod 255;
x:=' ';v:=0;
write(chr(n));
n:=0;
end
else
begin
readln;
writeln;
end;
end;
close(input);
close(output);
end.
再放上一些已知但无法解决的BUG:
1.由于Pascal的特性,随机生成的ASCII字符的编码总是向255无限靠近……
欢迎大家提交BUG或解决方案!!!新人无限感谢……
还有,GUI和模块化谁帮我写……