- Rongsen.Com.Cn 版权所有 2008-2010 京ICP备08007000号 京公海网安备11010802026356号 朝阳网安编号:110105199号
- 北京黑客防线网安工作室-黑客防线网安服务器维护基地为您提供专业的
服务器维护
,企业网站维护
,网站维护
服务 - (建议采用1024×768分辨率,以达到最佳视觉效果) Powered by 黑客防线网安 ©2009-2010 www.rongsen.com.cn
作者:黑客防线网安C/C++教程基地 来源:黑客防线网安C/C++教程基地 浏览次数:0 |
ret=readString(f, exeOffset, str);
}else if(ipFlag == 0x2) ...{ // 重定向模式2: 城市信息沒有隨國家信息定向
ipSeek=read3Bit(f);
tmpSeek=f.tellg();
f.seekg(exeOffset+ipSeek, ios_base::beg);
ret=readString(f, exeOffset, str);
f.seekg(exeOffset+tmpSeek, ios_base::beg);
} else ...{
f.seekg(-1, ios_base::cur);
ret=read2Zero(f, str);
}
return ret;
}
int read2Zero(ifstream& f, char*buf)...{
f.get(buf, 128, 0);
return strlen(buf);
}
void printHelp(char* exePath)...{
char *fileName;
fileName=strrchr(exePath,’’);
if(fileName==NULL)...{
strcpy(fileName, exePath);
}else...{
fileName++;
}
cout<<endl
<<"Wry IP Search Beta by cangwu.lee@gmail.com "
<<"Usage:"
<<" "<<fileName<<"<ip address> <Path to wry.dat> "
<<endl;
free(fileName);
}
DWORD convertIP(char*sip)...{
char *c1, *c2, *c3, *c4;
DWORD i1, i2, i3, i4, dd;
#if defined _DEBUG_
cout<<" ip="<<sip<<endl;
#endif
c1 = strtok(sip, " ,.-");
if(c1==NULL)...{
cout<<"IP address incorrect."<<endl;
return 0;
}
c2 = strtok(NULL," ,.-");if(c2==NULL)c2="0";
c3 = strtok(NULL," ,.-");if(c3==NULL)c3="0";
c4 = strtok(NULL," ,.-");if(c4==NULL)c4="0";
i1=atol(c1); i2=atol(c2); i3=atol(c3); i4=atol(c4);
if(i1<0 || i2<0 || i3<0 || i4<0
|| i1>254 || i2>255 || i3>255 || i4>255)...{
cout<<"IP address incorrect."<<endl;
delete[]c1; delete[]c2; delete[]c3; delete[]c4;
return 0;
}
我要申请本站:N点 | 黑客防线官网 | |
专业服务器维护及网站维护手工安全搭建环境,网站安全加固服务。黑客防线网安服务器维护基地招商进行中!QQ:29769479 |