//////////////////////////////////////////////// //////////////////////////////////////////////// // Basic Web Downloader created by Ice_Dragon // Thanks to Pal the help :D // // - Email - Ice_Dragon@Eof-Project.net // - MSN - Ice_Dragon@ssgroup.org //////////////////////////////////////////////// //////////////////////////////////////////////// #include #include #pragma comment(lib, "urlmon.lib") #include bool FileExists (const char *fname) { if(std::ifstream(fname)!=NULL) { return true; } else { return false; } } int main () { char arg1[100]; char arg2[50]; char ans[5]; cout<< "Basic Web Downloader created by Ice_Dragon.\n Thanks to Pal for the help.\n http://SSgroup.org\n\n\n\n\n"; cout<<"Please Enter URL to Download From E.g [http://site.com/file.txt]"; cout<> arg1; cout<> arg2; URLDownloadToFile(NULL,arg1,arg2,NULL,NULL); if(FileExists(arg2)) { cout<<"File Downloaded.\n\n"; cout<<"Do You Wish To Execute The File?\n"; cin >> ans; if (ans == "yes") { cout<<"Executing Downloaded File\n\n"; ShellExecute(0,"open",arg2,0,0,SW_NORMAL); } } else { cout<<"Failed To Download File\n"; return 0; } }