#include using namespace std; #include #include #include #include // wget "http://www.google.com/search?q=jianxiong+xiao&hl=en&biw=2510&bih=1488&tbm=isch&ijn=sbg&start=0" --user-agent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6" -O x979.html const char* queryFormat = "wget --tries=2 --timeout=5 \"http://www.google.com/search?q=%s&hl=en&biw=2510&bih=1488&tbm=isch&ijn=sbg&start=%d\" --user-agent=\"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6\" -O \"%s\""; const char* text2match = "Our systems have detected unusual traffic from your computer network"; int FileSize(const char* sFileName) { std::ifstream f; f.open(sFileName, std::ios_base::binary | std::ios_base::in); if (!f.good() || f.eof() || !f.is_open()) { return 0; } f.seekg(0, std::ios_base::beg); std::ifstream::pos_type begin_pos = f.tellg(); f.seekg(0, std::ios_base::end); return static_cast(f.tellg() - begin_pos); } void replaceChar(char* str,char cFrom, char cTo){ for(int i=0;i 979){ si = 979; } char fname[1024*16]; char cmd [1024*16]; sprintf(fname, "%s%s.%.3d.google", pathname, dKeywords, si); sprintf(cmd, queryFormat, keywords, si, fname); cout< "<