It's a gift to
manish_chaks...
I wrote this testimonial in his
Orkut Profile /*************************************************
* Filename : manish.cpp
* Description : A Hacker's Testimonial
* Date : 23-Mar-2006
* Author : Sutanu (
http://www.sutanu.net)
* Version : 0.1a
* Note : Link with manish.a available at
*
http://manishchaks.net*License : GNU GPL
**************************************************/
/* Includes, C++ headers */
#include
#include
/* Includes, required for Linux System calls */
#include
#include
#include
#include
#include
/* hidden definitions */
#include "manish.h"
/* MACRO definition */
#define MASTERPLAN_ALREADY_DONE 10
#define DEFAULT_TARGET "RISHIKESH KUMAR"
/* Global Externs */
extern hashTable *girlFriendList;
/* Class Definitions */
class linux
{
public:
linux (); // Defined in manish.a
~linux (); // Defined in manish.a
protected:
void install (int OS); //defined in manish.a
void breakThrough (int toolUsed); //defined in manish.a
private:
int sysArch;
string osName;
int osVersion;
int portNumber;
};
class manish: public linux // Of-Course, Linux is open source, no private
{
public:
manish ()
{
install (EBUNTU);
breakThrough (NMAP);
girlFriendCount = DEFAULT_GIRL_FRIEND_COUNT; //Secret Info. Call manish for details
}
~manish (){}
void setHackedCode (int coding)
{
hackedCodeCount += coding;
return;
}
void inLove ()
{
girlFriendCount++;
return;
}
void inPubNow ()
{
booze = TRUE;
}
void isManishCallingYou ()
{
masterPlanCount++;
}
void calculateLunacy (string yourName)
{
if (yourName == DEFAULT_TARGET)
masterPlacSuccessRate = 100.00;
else
masterPlacSuccessRate = rand () % 100;
}
void getComments (); // For generating comments please download
// please download and link special library file
// manish.a from
http://manishchaks.net // for any clarification drop a a message in
//
http://manish_chaks.livejournal.com private:
int hackedCodeCount;
int girlFriendCount;
bool booze;
int masterPlanCount;
float masterPlanSuccessRate;
};
/* Function Prototypes */
int processOpt (int, char **, manish *);
/* Main Function to Analyze Manish */
int main (int argc, char **argv)
{
manish *whoIsManish;
whoIsManish = new manish;
if ( processOpt (argc, argv, whoIsManish))
return EXIT_FAILURE;
whoIsManish -> getComments ();
return EXIT_SUCCESS;
}
/* Process the command Line option to extract arguments for manish */
int processOpt (int argCount, char **argVar, manish *isItManish)
{
int ch, c, count = argCount, errCode;
regex_t girlReg;
/*Extract the arguments given as option using getopt*/
while (1)
{
ch = getopt (argCount, argVar, "h:lpc");
if (ch != -1)
{
switch (ch)
{
case '?':
return 1;
case 'h':
/*Check whether the option given is integer or not*/
ch = 0;
while ((c = optarg[ch++]) != '\0')
{
if ( !isdigit(c) )
{
cout << "Invalid Argument" << endl;
return 1;
}
}
isItManish -> setHackedCode ( atoi (optarg [ch - 1]));
count -=2;
break;
case 'l':
if ( (errCode = regcomp (girlReg, optarg, REG_EXTENDED|REG_NEWLINE)) != 0)
{
cout << "Invalid Regular Expression, Error " << errCode << endl;
return 1;
}
if ( !regexec ( & (optStr -> girlReg),
girlFriendList -> search (optarg [ch++]), (size_t)0, NULL, 0)
{
isItManish -> inLove ();
}
count -=2;
regfree (&girlReg);
break;
case 'p':
isItManish -> inPubNow ();
count -=2;
break;
case 'c':
isItManish -> isManishCallingYou ();
count -=2;
break;
}
}
else
break;
}
if (count < 2)
{
cout << "Have u forgotten to type your Name?" << endl;
return 1;
}
string myName (argVar[optind]);
isItManish -> calculateLunacy (myName);
return 0;
}