السلام عليكم
إليكم الكود
كود بلغة HTML:
program sHTML;
{$APPTYPE CONSOLE}
uses
sysutils;
var
Bt: Byte;
Pff: String;
Huh: TextFile;
F: File of Byte;
begin
WriteLn;
WriteLn('sHTML - simple HTML encoder.');
WriteLn;
if paramcount=0 then Begin
WriteLn('sHTML FILE.HTML');
WriteLn('Or Drag & Drop an HTML file on me!');
Writeln(#10#13'Press ENTER');
Readln;
Halt(1);
End;
Pff := 'index.htm';
if paramcount<>0 then Pff:=Paramstr(1);
Write('Opening :'+Pff);
AssignFile(F, Pff);
Reset(F);
WriteLn(' OK.');
AssignFile(Huh, Pff+'.HTM');
ReWrite(Huh);
WriteLn(Huh,'<!--This HTML page was tampeted by sHTML--!>');
Write(Huh,'<script LANGUAGE=JAVASCRIPT>document.write(unescape("');
Write('eNcoding: ');
Repeat
Read(f,bt);
Write(Huh,'\x'+inttoHex(bt,2));
Until Eof(F);
WriteLn(' OK.');
WriteLn(Huh, '"));</SCRIPT>');
CloseFile(Huh);
CloseFile(F);
WriteLn(#10#13+'Press ENTER');
Readln;
end.
الملفات المرفقة هنا:
1/sHTML
http://www.mediafire.com/?sharekey=9...e6c3dd3253007e
2/sHTMLed_index._example
http://www.mediafire.com/?sharekey=9...bfd3c805e5ece4