64,654
社区成员
发帖
与我相关
我的任务
分享
#include "stdafx.h"
#include <ReverseIP.h>
#include <afxinet.h>
#include <string>
#include <fstream>
#include <windows.h>
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// The one and only application object
CWinApp theApp;
using namespace std;
int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
{
int nRetCode = 0;
// initialize MFC and print and error on failure
if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0))
{
// TODO: change error code to suit your needs
cerr << _T("Fatal Error: MFC initialization failed") << endl;
nRetCode = 1;
}
else
{
// TODO: code your application's behavior here.
CString strHello;
strHello.LoadString(IDS_HELLO);
//cout << (LPCTSTR)strHello << endl;
}
ofstream fout("Temp.txt");
ofstream ffout("GetDomains.txt");
ifstream fin("Domain.txt");//保存有域名
ifstream ffin("1.txt");
char domain[100];
char buff[100000];
CString m_urlhead="http://www.domaintools.com/reverse-ip/?hostname=";
CString m_html;
CString m_url;
while(fin.getline(domain,100))
{
for(int i=1;i<=10;i++)
{
CString page;
page.Format("&page=%d",i);
m_url=m_urlhead+domain+page;
//以下是获取网页内容
CInternetSession httpSession;
CInternetFile* htmlFile = (CInternetFile*) httpSession.OpenURL(m_url);
CString content;
char *p;
while (htmlFile->ReadString(content))
{
char *tag="http://whois.domaintools.com/";
if (p=strstr(content,tag))
{
fout<<p<<'\n';
break;
}
}
if(!p)
break;
htmlFile->Close();
httpSession.Close();
Sleep(10000);
}
}
return nRetCode;
}
1>d:\temptest\xiazaiwangye\xiazaiwangye\xiazaiwangye.cpp(2) : fatal error C1083: 无法打开包括文件:“ReverseIP.h”: No such file or directory
这个头文件是自己写的吗?我是下载的别人的资料,有的兄弟提供下。