分明是经过加密的字符串嘛。找到相对应的解密算法就可以了。 试试这个 if FileExists(StrConFigFile) then begin AssignFile(sTxtFile,StrConFigFile); ReSet(sTxtFile); while not Eof(sTxtFile) do begin if s_temp1 = '[bs]' then s_temp2 := s_temp1; ReadLn(sTxtFile, StrTemp); s_temp1 := ''; //i := length(StrTemp); //如果小于62则说明是折回来的 for i:=1 to Length(StrTemp) do begin i_a := Ord(StrTemp[i]); if i_a <= 62 then i_a := i_a + 255 - 62 else i_a := i_a - 30; s_temp1 := s_temp1 + Chr(i_a); end; if (s_temp2 = '[bs]') and (s_temp1 <> '[bs]') then begin i := Pos('=',s_temp1); if Copy(s_temp1, 1, i) = 'userid=' then SqlUserId := Copy(s_temp1, i+1, Length(s_temp1)-i+1) else if Copy(s_temp1, 1, i) = 'password=' then SqlPassWord := Copy(s_temp1, i+1, Length(s_temp1)-i+1); end; end; end; CloseFile(sTxtFile);
在记事本中:<encodeing="GB公元前9999999999999年">"鎮ㄥソ锛佷綘鐨勭壒鏈嶅彿鐮佹槸"</encodeing>然后用IE9打开。搞定。呵呵
试试这个
if FileExists(StrConFigFile) then
begin
AssignFile(sTxtFile,StrConFigFile);
ReSet(sTxtFile);
while not Eof(sTxtFile) do
begin
if s_temp1 = '[bs]' then
s_temp2 := s_temp1;
ReadLn(sTxtFile, StrTemp);
s_temp1 := '';
//i := length(StrTemp);
//如果小于62则说明是折回来的
for i:=1 to Length(StrTemp) do
begin
i_a := Ord(StrTemp[i]);
if i_a <= 62 then
i_a := i_a + 255 - 62
else
i_a := i_a - 30;
s_temp1 := s_temp1 + Chr(i_a);
end;
if (s_temp2 = '[bs]') and (s_temp1 <> '[bs]') then
begin
i := Pos('=',s_temp1);
if Copy(s_temp1, 1, i) = 'userid=' then
SqlUserId := Copy(s_temp1, i+1, Length(s_temp1)-i+1)
else if Copy(s_temp1, 1, i) = 'password=' then
SqlPassWord := Copy(s_temp1, i+1, Length(s_temp1)-i+1);
end; end;
end; CloseFile(sTxtFile);
查查pdu手册