c++

c/c++实现获取NOD32升级账号密码

小云
99
2023-09-13 09:15:32
栏目: 编程语言

#include

#include

#include

#include

#include

#include

#include

using namespace std;

/造过wget 来获舰网页

string GetHtmlBywget(string url)

//获软待下载网页文件名string fileName = url.substr(

(int)url.find last of("/") + 1);

if(fileName != "")

string strCom =“wget -q; //wget令,-q表示不显示下截信息

strCom.append(ur1);

system(strCom.c str()); //执wget

ifstream fin(fileName.c str()

);

if(!fin)

 return

string strHtml =00char chTemp[1024] = "//凌软网真文件剑内存中

while(

fin.getline(chTemp ,1024)

)

strHtml.append(

string(chTemp)

);

);

strcpy(chTemp ,

fin.close();

strCom =“del -f“; //刚除文件命令,-f竞示直族刚除不做任何提示

strCom.append(fileName);

system(strCom.c_str()); //刚除刚才下我下来的文件return strHtml; //返回网页源码

else

return ..

string GetHtmlPath(int y, int m, int d)

stringstream str;

string now;

string path = "http://www.nod32jihuoma.cn/nod32-id/";

str << y + 190B;str >> now;path.append(now);path.append("-");

now.clear();

str.clear();

int month = m + 1;

if(month / 1 == @)

str << 日;

str >> now;path.append(now);now.clear();

str.clear();

str << month;

str >> now;

path.append(now);

path.append("-");

now.clear();

str.clear();

int day = d;

if(day / 1 == @)

str << 日;

str >> now;

path.append(now);

now.clear();str.clear();

str << day;

str >> now;

path.append(now);

path.append(".html");

now.clear();str.clear();

return path;

void SearchData(int n)

ofstream cout( key.txt ) ;

const string key =“

用户名:";//13

const string value = "密 码:;//14

time t t = time(NULL);

struct tm* cur = localtime(&t);

int y = cur->tm year;

int m = cur->tm mon;

int d = cur->tm mday;

for(int i = @ ; i < n; i++)

int dd = d - i;

string path = GetHtmlPath(y, m, dd);

cout <<“铁取网址”cepath <

//cout << data << endl;

cout << y + 1900 <<"年"<< m + 1 <<“月"<< dd <<“日"<< endl;cout <<“用户名:密码:” <

for(size t pos = ; pos < data.size(); pos++)

size t t = data.find(key,pos);if(t == string::npos)

break;

t += 13;for(int i = 1; i <= 14; i++,t++)cout << data[t];cout <<"t += 14;for(int i = 1; i <= 1; i++,t++)cout << data[t];

pos = t;cout << endl;

cout.close();

int main()

SearchData(2);

string str;

ifstream fin("key.txt");

while(fin)

{

getline(fin,str);cout << str << endl;

str.clear();

{

fin.close();

return 0;

}

0
看了该问题的人还看了