url编码与解码工具代码,做sql注入分析时会用到

代码部分:

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, HTTPApp;

type
TForm1 = class(TForm)
  Button1: TButton;
  Memo1: TMemo;
  Memo2: TMemo;
  Button2: TButton;
  procedure Button1Click(Sender: TObject);
  procedure Button2Click(Sender: TObject);
private
  { Private declarations }
  function URLEncode(const msg : String) : String;
  function GetMemoText(memo:TMemo):string;
public
  { Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
i: Integer;
ss: string;
begin
ss := GetMemoText(Memo1);
Memo1.Text :=ss;
Memo2.Clear;
for i := 1 to Length(ss) do
begin