Spammer

Posts 114 of 14 · Page 1 of 1
Spammer
Code:
#include <windows.h>
#include <iostream>
#include <fstream>

using namespace std;

     char *Message[] = 
     {
          "-- VIST TODAY -- ",
          "- http://mpgh.net -"
     };

#include "main_functions.h"

int main() {

    ACCESS.readConfig("Game.ini");
    GameCheck();

    int LOOPS = 0;
    int DELAY = 0;
    string TEMP;
    string TEMP2;

    TEMP = FileAccess[0].TEMP;
    LOOPS = atoi(TEMP.c_str());

    TEMP2 = FileAccess[0].TEMP2;
    DELAY = atoi(TEMP2.c_str());

    HWND hwnd = FindWindow(0, FileAccess[0].File);

    #include "Copyright.h"

    cout << "GAME: \"" << FileAccess[0].File << "\"" << endl;
    cout << "LOOPS: \"" << LOOPS << "\"" << endl;
    cout << "DELAY: \"" << DELAY << "\"" << endl << endl;

    while (true) {

          Sleep(500);

          if (GetAsyncKeyState(4)) { ReLOAD("Game.ini", LOOPS, DELAY); }
          if (GetAsyncKeyState(VK_HOME)) { HotKey(hwnd, LOOPS, DELAY); }
          if (GetAsyncKeyState(VK_END)) { return 0; }

          }

    return 0;
}

#ifndef MAIN_FUNCTIONS_H
#define MAIN_FUNCTIONS_H

/****************************/
/***** main_functions.h *****/
/****************************/

const int MAX = 0;
string FileContents;

class FileInfo {
      public:
             char File[50];
             char TEMP[50];
             char TEMP2[50];

             FileInfo();
             inline FileInfo::~FileInfo(void) { ; }

             int readConfig(char ConfigFile[]);
      }; FileInfo ACCESS;
      FileInfo FileAccess[MAX];

      FileInfo::FileInfo() { ; }
      int FileInfo::readConfig(char ConfigFile[]) {

          ifstream readFile;

          int X = 0;
          int ch = 0;
          int assign = 1;
          char line[500] = {'\0'};

          readFile.open(ConfigFile, ios::in);
          if (readFile.fail()) {
          cout << "Unable to open Configuration file \"" << ConfigFile << "\"" << endl;
          system("PAUSE");
          exit(0);
          }

          while ((ch = readFile.peek()) != EOF) {
                readFile.getline(line,1000);

                switch (assign) {
                       case 1: for (int x = 0; line[x] != '\0'; x++) { if (line[x] == '\t') { break; }
                       FileAccess[X].File[x] = line[x]; } break;
                       /* Read game name */

                       case 2: for (int x = 0; line[x] != '\0'; x++) { if (line[x] == '\t') { break; }
                       FileAccess[X].TEMP[x] = line[x]; } break;
                       /* Loop count */

                       case 3: for (int x = 0; line[x] != '\0'; x++) { if (line[x] == '\t') { break; }
                       FileAccess[X].TEMP2[x] = line[x]; } break;
                       /* Send delay (miliseconds) */

                       }

                       assign++;
                       if (assign == 4) { assign = 0; X++; }
                }

                readFile.close();

      return 0;
      }

/*******************************************************
/***** Listed Functions in order ***********************
/*******************************************************
/*     ReLOAD(char Filename[], int& LOOPS, int& DELAY) * Reloads the configuration file
/*     readConfig(char Filename[])                     * Sets *Filename to <file> listed in Config.ini
/*     GameCheck()                                     * Initially checks if the game is open
/*     PressButton(HWND hwnd, BYTE vk)                 * Send's out the messages
/*     TypeText(HWND hwnd, char String[])              * Filter's out text
/*******************************************************/

////////////////////////////////////////////////////////////////////////////////
int ReLOAD(char Filename[], int& LOOPS, int& DELAY) {
////////////////////////////////////////////////////////////////////////////////

    HANDLE  hConsole;
    hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
    CONSOLE_SCREEN_BUFFER_INFO csbi;
    GetConsoleScreenBufferInfo(hConsole, &csbi);
    DWORD count;

    fstream readFile;

    string TEMP;
    string TEMP2;

    LOOPS = 0;
    DELAY = 0;

    int X = 0;
    int ch = 0;
    int assign = 1;
    char line[500] = {'\0'};

    readFile.open(Filename, ios::in);
    if (readFile.fail()) {
    cout << "Unable to open Configuration file \"" << Filename << "\"" << endl;
    system("PAUSE");
    exit(0);
    }

    while ((ch = readFile.peek()) != EOF) {
          readFile.getline(line,1000);

          switch (assign) {
                 case 1: for (int x = 0; line[x] != '\0'; x++) { if (line[x] == '\t') { break; }
                       FileAccess[0].File[x] = line[x]; } break;

                 case 2: for (int x = 0; line[x] != '\0'; x++) { if (line[x] == '\t') { break; }
                       FileAccess[0].TEMP[x] = line[x]; } break;

                 case 3: for (int x = 0; line[x] != '\0'; x++) { if (line[x] == '\t') { break; }
                       FileAccess[0].TEMP2[x] = line[x]; } break;

                       }

                       assign++;
                       if (assign == 4) { assign = 0; X++; }
                }

                readFile.close();

    TEMP = FileAccess[0].TEMP;
    LOOPS = atoi(TEMP.c_str());

    TEMP2 = FileAccess[0].TEMP2;
    DELAY = atoi(TEMP2.c_str());

    /* Clear the line */
    COORD clear = {0, 5};
    FillConsoleOutputCharacter(hConsole, ' ', csbi.dwSize.X * csbi.dwSize.Y, clear, &count);
    SetConsoleCursorPosition(hConsole, clear);

    cout << "GAME: \"" << FileAccess[0].File << "\"" << endl;
    cout << "LOOPS: \"" << LOOPS << "\"" << endl;
    cout << "DELAY: \"" << DELAY << "\"" << endl << endl;

      return 0;
      }

////////////////////////////////////////////////////////////////////////////////
void GameCheck() {
////////////////////////////////////////////////////////////////////////////////

     int null = 0;
     int temp = 0;

     ACCESS.readConfig("Game.ini");

     for (int ctr = 0; ctr <= 227; ctr++) { if (FileAccess[0].File[null] != '\0') { null++; } else { break; } }
     while (FileAccess[0].File[temp] != '\0') { FileAccess[0].File[temp] = FileAccess[0].File[temp]; temp++; }

     if (!FindWindow(0, FileAccess[0].File)) {
                        system("Title Game Window not found");
                        cout << FileAccess[0].File << "'s Window not found";
                        MessageBox(0, "Game Window not found", " ", 0);
                        exit(0);
                        }

     return;
}

////////////////////////////////////////////////////////////////////////////////
void PressButton(HWND hwnd, BYTE vk) {
////////////////////////////////////////////////////////////////////////////////

     SendMessage(hwnd, WM_KEYDOWN, vk, 0);
     SendMessage(hwnd, WM_CHAR, vk, 0);
     SendMessage(hwnd, WM_KEYUP, vk, 0);
}

////////////////////////////////////////////////////////////////////////////////
void TypeText(HWND hwnd, char String[]) {
////////////////////////////////////////////////////////////////////////////////

     for(int i = 0; String[i] != 0; i++) {
//             if (String[i] == 'y') { PressButton(hwnd, 'Y'); continue; }
             PressButton(hwnd, String[i]);
             }
}

////////////////////////////////////////////////////////////////////////////////
void HotKey(HWND hwnd, int& LOOPS, int& DELAY) {
////////////////////////////////////////////////////////////////////////////////

     if (!FindWindow(0, FileAccess[0].File)) {
                        system("Title Game Window not found");
                        cout << FileAccess[0].File << "'s Window not found";
                        MessageBox(0, "Game Window not found", " ", 0);
                        exit(0);
                        }

     int maxMessages = (sizeof Message) / (sizeof Message[0]);

     for (int LOOP = 0; LOOP <= LOOPS; LOOP++) {
         cout << "\rITERATION: " << LOOP << " out of: " << LOOPS;
         if ( ( (GetAsyncKeyState(VK_INSERT)) ? 1 : 0) ) { cout << "\rPAUSED\t\t\t\t\t\r"; break; }
         for (int NUMBER = 0; NUMBER < maxMessages; NUMBER++) {
             if ( ( (GetAsyncKeyState(VK_END)) ? 1 : 0) ) { return; }
             PressButton(hwnd, 0x0D); // Enter key
             TypeText(hwnd, Message[NUMBER]);
             Sleep(DELAY);
             PressButton(hwnd, 0x0D); // Enter key
         }
     }
         return;
}

#endif


#ifndef COPYRIGHT_H
#define COPYRIGHT_H

HANDLE  hConsole;
hConsole = GetStdHandle(STD_OUTPUT_HANDLE);

SetConsoleTextAttribute(hConsole, 5); // PURPLE
cout << "********************" << endl;
SetConsoleTextAttribute(hConsole, 3); // GREY (default)
cout << "Game Spammer! v1.0  (C) 2008 Confused Software" << endl
<< "Written by Danielle" << endl;
SetConsoleTextAttribute(hConsole, 5); // PURPLE
cout << "********************" << endl << endl;
SetConsoleTextAttribute(hConsole, 7); // GREY (default)

#endif
Code:
game.ini
Combat arms  GAME NAME
100000      Iterations (how many times to send the message)
0      Delay (miliseconds)

CREDITS: MUTED
nicely done! i can see this ending up fun
Quote Originally Posted by supercarz1991 View Post
nicely done! i can see this ending up fun
yeah it really works
Its going to have errors isnt it?
Quote Originally Posted by namename41 View Post
Its going to have errors isnt it?
when i tryed it i didnt have any errors
Nice im try it.
try it its really cool
Quote Originally Posted by yoyoman4567 View Post
Code:
#include <windows.h>
#include <iostream>
#include <fstream>

using namespace std;

     char *Message[] = 
     {
          "-- VIST TODAY -- ",
          "- http://mpgh.net -"
     };

#include "main_functions.h"

int main() {

    ACCESS.readConfig("Game.ini");
    GameCheck();

    int LOOPS = 0;
    int DELAY = 0;
    string TEMP;
    string TEMP2;

    TEMP = FileAccess[0].TEMP;
    LOOPS = atoi(TEMP.c_str());

    TEMP2 = FileAccess[0].TEMP2;
    DELAY = atoi(TEMP2.c_str());

    HWND hwnd = FindWindow(0, FileAccess[0].File);

    #include "Copyright.h"

    cout << "GAME: \"" << FileAccess[0].File << "\"" << endl;
    cout << "LOOPS: \"" << LOOPS << "\"" << endl;
    cout << "DELAY: \"" << DELAY << "\"" << endl << endl;

    while (true) {

          Sleep(500);

          if (GetAsyncKeyState(4)) { ReLOAD("Game.ini", LOOPS, DELAY); }
          if (GetAsyncKeyState(VK_HOME)) { HotKey(hwnd, LOOPS, DELAY); }
          if (GetAsyncKeyState(VK_END)) { return 0; }

          }

    return 0;
}

#ifndef MAIN_FUNCTIONS_H
#define MAIN_FUNCTIONS_H

/****************************/
/***** main_functions.h *****/
/****************************/

const int MAX = 0;
string FileContents;

class FileInfo {
      public:
             char File[50];
             char TEMP[50];
             char TEMP2[50];

             FileInfo();
             inline FileInfo::~FileInfo(void) { ; }

             int readConfig(char ConfigFile[]);
      }; FileInfo ACCESS;
      FileInfo FileAccess[MAX];

      FileInfo::FileInfo() { ; }
      int FileInfo::readConfig(char ConfigFile[]) {

          ifstream readFile;

          int X = 0;
          int ch = 0;
          int assign = 1;
          char line[500] = {'\0'};

          readFile.open(ConfigFile, ios::in);
          if (readFile.fail()) {
          cout << "Unable to open Configuration file \"" << ConfigFile << "\"" << endl;
          system("PAUSE");
          exit(0);
          }

          while ((ch = readFile.peek()) != EOF) {
                readFile.getline(line,1000);

                switch (assign) {
                       case 1: for (int x = 0; line[x] != '\0'; x++) { if (line[x] == '\t') { break; }
                       FileAccess[X].File[x] = line[x]; } break;
                       /* Read game name */

                       case 2: for (int x = 0; line[x] != '\0'; x++) { if (line[x] == '\t') { break; }
                       FileAccess[X].TEMP[x] = line[x]; } break;
                       /* Loop count */

                       case 3: for (int x = 0; line[x] != '\0'; x++) { if (line[x] == '\t') { break; }
                       FileAccess[X].TEMP2[x] = line[x]; } break;
                       /* Send delay (miliseconds) */

                       }

                       assign++;
                       if (assign == 4) { assign = 0; X++; }
                }

                readFile.close();

      return 0;
      }

/*******************************************************
/***** Listed Functions in order ***********************
/*******************************************************
/*     ReLOAD(char Filename[], int& LOOPS, int& DELAY) * Reloads the configuration file
/*     readConfig(char Filename[])                     * Sets *Filename to <file> listed in Config.ini
/*     GameCheck()                                     * Initially checks if the game is open
/*     PressButton(HWND hwnd, BYTE vk)                 * Send's out the messages
/*     TypeText(HWND hwnd, char String[])              * Filter's out text
/*******************************************************/

////////////////////////////////////////////////////////////////////////////////
int ReLOAD(char Filename[], int& LOOPS, int& DELAY) {
////////////////////////////////////////////////////////////////////////////////

    HANDLE  hConsole;
    hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
    CONSOLE_SCREEN_BUFFER_INFO csbi;
    GetConsoleScreenBufferInfo(hConsole, &csbi);
    DWORD count;

    fstream readFile;

    string TEMP;
    string TEMP2;

    LOOPS = 0;
    DELAY = 0;

    int X = 0;
    int ch = 0;
    int assign = 1;
    char line[500] = {'\0'};

    readFile.open(Filename, ios::in);
    if (readFile.fail()) {
    cout << "Unable to open Configuration file \"" << Filename << "\"" << endl;
    system("PAUSE");
    exit(0);
    }

    while ((ch = readFile.peek()) != EOF) {
          readFile.getline(line,1000);

          switch (assign) {
                 case 1: for (int x = 0; line[x] != '\0'; x++) { if (line[x] == '\t') { break; }
                       FileAccess[0].File[x] = line[x]; } break;

                 case 2: for (int x = 0; line[x] != '\0'; x++) { if (line[x] == '\t') { break; }
                       FileAccess[0].TEMP[x] = line[x]; } break;

                 case 3: for (int x = 0; line[x] != '\0'; x++) { if (line[x] == '\t') { break; }
                       FileAccess[0].TEMP2[x] = line[x]; } break;

                       }

                       assign++;
                       if (assign == 4) { assign = 0; X++; }
                }

                readFile.close();

    TEMP = FileAccess[0].TEMP;
    LOOPS = atoi(TEMP.c_str());

    TEMP2 = FileAccess[0].TEMP2;
    DELAY = atoi(TEMP2.c_str());

    /* Clear the line */
    COORD clear = {0, 5};
    FillConsoleOutputCharacter(hConsole, ' ', csbi.dwSize.X * csbi.dwSize.Y, clear, &count);
    SetConsoleCursorPosition(hConsole, clear);

    cout << "GAME: \"" << FileAccess[0].File << "\"" << endl;
    cout << "LOOPS: \"" << LOOPS << "\"" << endl;
    cout << "DELAY: \"" << DELAY << "\"" << endl << endl;

      return 0;
      }

////////////////////////////////////////////////////////////////////////////////
void GameCheck() {
////////////////////////////////////////////////////////////////////////////////

     int null = 0;
     int temp = 0;

     ACCESS.readConfig("Game.ini");

     for (int ctr = 0; ctr <= 227; ctr++) { if (FileAccess[0].File[null] != '\0') { null++; } else { break; } }
     while (FileAccess[0].File[temp] != '\0') { FileAccess[0].File[temp] = FileAccess[0].File[temp]; temp++; }

     if (!FindWindow(0, FileAccess[0].File)) {
                        system("Title Game Window not found");
                        cout << FileAccess[0].File << "'s Window not found";
                        MessageBox(0, "Game Window not found", " ", 0);
                        exit(0);
                        }

     return;
}

////////////////////////////////////////////////////////////////////////////////
void PressButton(HWND hwnd, BYTE vk) {
////////////////////////////////////////////////////////////////////////////////

     SendMessage(hwnd, WM_KEYDOWN, vk, 0);
     SendMessage(hwnd, WM_CHAR, vk, 0);
     SendMessage(hwnd, WM_KEYUP, vk, 0);
}

////////////////////////////////////////////////////////////////////////////////
void TypeText(HWND hwnd, char String[]) {
////////////////////////////////////////////////////////////////////////////////

     for(int i = 0; String[i] != 0; i++) {
//             if (String[i] == 'y') { PressButton(hwnd, 'Y'); continue; }
             PressButton(hwnd, String[i]);
             }
}

////////////////////////////////////////////////////////////////////////////////
void HotKey(HWND hwnd, int& LOOPS, int& DELAY) {
////////////////////////////////////////////////////////////////////////////////

     if (!FindWindow(0, FileAccess[0].File)) {
                        system("Title Game Window not found");
                        cout << FileAccess[0].File << "'s Window not found";
                        MessageBox(0, "Game Window not found", " ", 0);
                        exit(0);
                        }

     int maxMessages = (sizeof Message) / (sizeof Message[0]);

     for (int LOOP = 0; LOOP <= LOOPS; LOOP++) {
         cout << "\rITERATION: " << LOOP << " out of: " << LOOPS;
         if ( ( (GetAsyncKeyState(VK_INSERT)) ? 1 : 0) ) { cout << "\rPAUSED\t\t\t\t\t\r"; break; }
         for (int NUMBER = 0; NUMBER < maxMessages; NUMBER++) {
             if ( ( (GetAsyncKeyState(VK_END)) ? 1 : 0) ) { return; }
             PressButton(hwnd, 0x0D); // Enter key
             TypeText(hwnd, Message[NUMBER]);
             Sleep(DELAY);
             PressButton(hwnd, 0x0D); // Enter key
         }
     }
         return;
}

#endif


#ifndef COPYRIGHT_H
#define COPYRIGHT_H

HANDLE  hConsole;
hConsole = GetStdHandle(STD_OUTPUT_HANDLE);

SetConsoleTextAttribute(hConsole, 5); // PURPLE
cout << "********************" << endl;
SetConsoleTextAttribute(hConsole, 3); // GREY (default)
cout << "Game Spammer! v1.0  (C) 2008 Confused Software" << endl
<< "Written by Danielle" << endl;
SetConsoleTextAttribute(hConsole, 5); // PURPLE
cout << "********************" << endl << endl;
SetConsoleTextAttribute(hConsole, 7); // GREY (default)

#endif
Code:
game.ini
Combat arms  GAME NAME
100000      Iterations (how many times to send the message)
0      Delay (miliseconds)
Where is credits? I know for a fact that you didn't write this.
Quote Originally Posted by Saltine View Post

Where is credits? I know for a fact that you didn't write this.
img
Found this as well by copying a random section of the leeched code. Seriously this is getting annoying.
oh people leech a lot give credits dude plz
Threadstarted please provide credits to original creator or thread will be deleted. You have 24 hours.
LOL this code is 4 years old

Here... I'll just edit the OP
Quote Originally Posted by Margherita View Post
"Written By Danielle"
Lol saw tht 2 in the bottom of the code xD
Posts 114 of 14 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?