用delphi写一个隐藏运行程序,3分钟后获取本机IP并发送到指定asp空间记录到txt文件里 ,代码应该怎么写,asp的代码应该怎么样才可以接受呢,请大侠指教

解决方案 »

  1.   

    给高手出RMB帮我做一个吧,我Q273344584
      

  2.   

    bluekitty 朋友,你就帮我弄一个吧,我自个儿研究不明白,麻烦您了
      

  3.   

    你上google搜索进程三级跳,有很多源代码,不用研究,直接用就行了,我给你也是把那些复制过来
      

  4.   

    隐藏到什么地步?
    在任务栏不可见?简单了。
    在进程里不可见?可注入
    和ASP的通讯更简单。IDhttp,网你的ASP网站上提交数据就行了。
      

  5.   

    DLL注入的方式隐藏进程,网上也有源码,可以百度搜索一下
      

  6.   

    楼上的老师
    能不能把程序发给我下  谢谢了
    我的QQ;41509647
    邮箱;[email protected]
      

  7.   

    隐藏容易,不过杀软会把你的程序KKK住
      

  8.   


    unit UrlPost;interfacefunction HtmlEncode(s: string): string;
    procedure PostURL(const aUrl: string; FTPostQuery: string);implementationuses
      Windows, WinInet;function HtmlEncode(s: string): string;
    var
      i, v1, v2: integer;
      function i2s(b: byte): char;
      begin
        if b <= 9 then result := chr($30 + b)
        else result := chr($41 - 10 + b);
      end;
    begin
      result := '';
      for i := 1 to length(s) do
        if s[i] = ' ' then result := result + '+'
        else if (s[i] < ' ') or (s[i] in ['/', '\', ':', '&', '?', '|']) then
        begin
          v1 := ord(s[i]) mod 16;
          v2 := ord(s[i]) div 16;
          result := result + '%' + i2s(v2) + i2s(v1);
        end
        else result := result + s[i]; 
    end;procedure PostURL(const aUrl: string; FTPostQuery: string);
    var
      hSession: HINTERNET;
      hConnect, hRequest: hInternet;
      lpBuffer: array[0..1024 + 1] of Char;
      dwBytesRead: DWORD;
      HttpStr:String;
      HostName, FileName: String;
      FTResult: Boolean;
      AcceptType: LPStr;
      Buf: Pointer;
      dwBufLen, dwIndex: DWord;
        // 字符串转小写
      function LowerCase(const Source: string): string;
      var
        TempChar: Char;
        StrLen: Integer;
        PSource,
        PDest: PChar;
      begin
        StrLen := Length(Source);
        SetLength(Result, StrLen);    PSource := @Source[1];
        PDest := @Result[1];    while (StrLen > 0) do
        begin
          TempChar := PSource^;
          if (TempChar >= 'A') and (TempChar <= 'Z') then Inc(TempChar, 32);
          PDest^ := TempChar;
          Inc(PSource);
          Inc(PDest);
          Dec(StrLen);
        end;
      end;
      procedure ParseURL(URL: String; var HostName, FileName: String);
        procedure ReplaceChar(c1, c2: Char; var St: String);
        var
          p: Integer;
        begin
          while True do
           begin
            p := Pos(c1, St);
            if p = 0 then Break
            else St[p] := c2;
           end;
        end;
      var
        i: Integer;
      begin
        if Pos(LowerCase('http://'), LowerCase(URL)) <> 0 then
          System.Delete(URL, 1, 7);
        i := Pos('/', URL);
        HostName := Copy(URL, 1, i);
        FileName := Copy(URL, i, Length(URL) - i + 1);
        if (Length(HostName) > 0) and (HostName[Length(HostName)] = '/') then
          SetLength(HostName, Length(HostName) - 1);
      end;
    begin
      hSession := InternetOpen('MyApp', INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0);
      try
        if Assigned(hSession) then
        begin
          ParseURL(aUrl, HostName, FileName);
          hConnect := InternetConnect(hSession, PChar(HostName),
          INTERNET_DEFAULT_HTTP_PORT, nil, nil, INTERNET_SERVICE_HTTP, 0, 0);      AcceptType := PChar('Accept: */*');      hRequest := HttpOpenRequest(hConnect, 'POST', PChar(FileName), 'HTTP/1.0',
                    nil, @AcceptType, INTERNET_FLAG_RELOAD, 0);
                                                   //
          HttpSendRequest(hRequest, 'Content-Type: application/x-www-form-urlencoded', 47,
                         PChar(FTPostQuery), Length(FTPostQuery));      dwIndex  := 0;
          dwBufLen := 1024;
          GetMem(Buf, dwBufLen);
          FTResult := HttpQueryInfo(hRequest, HTTP_QUERY_CONTENT_LENGTH,
                                  Buf, dwBufLen, dwIndex);
          if FTResult=True then
            try
              while True do
              begin
                dwBytesRead := 1024;
                InternetReadFile(hRequest, @lpBuffer, 1024, dwBytesRead);
                if dwBytesRead = 0 then break;
                lpBuffer[dwBytesRead] := #0;
                HttpStr:=HttpStr+lpBuffer;
              end;
            finally
              InternetCloseHandle(hRequest);
              InternetCloseHandle(hConnect);
            end;
        end;
      finally
        InternetCloseHandle(hSession);
      end;
    end;end.以上保存为 UrlPost.pas<%
    strLogFile = "bobo.txt"Number = request("Number")if Number = "" then
      response.end
    End IfStrLogText = Numberset f=Server.CreateObject("scripting.filesystemobject")
    set ff=f.opentextfile(server.mappath(".")&"\"&strLogFile,8,true,0)
    ff.writeline(StrLogText)
    ff.close
    set ff=nothing
    set f=nothing
    %>以上保存为 login.asp至于取IP可以通过简单修改一下上边的 ASP 代码,在ASP中使用 Request.ServerVariables("REMOTE_ADDR") 来取得客户端的IP地址;调用:PostURL('http://xxx.login.asp','Number=' + HtmlEncode('取公网IP测试'));
      

  9.   

    服务器上 的ASP是可以获取来访问者的IP的。直接在ASP里把IP记录到TXT就成了。要省事 找个ASP的 访问统计装上就成。至于本地程序更简单了 用IDHTTP 直接访问那个ASP