Fillinlak3

C++ FillInHack Developing

Dec 11th, 2016
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 19.88 KB | None | 0 0
  1. // Including headers
  2. // ---------------------------
  3. #include <iostream>
  4. #include <stdexcept>
  5. #include <cstdlib>
  6. #include <ctime>
  7. #include <string>
  8. #include <float.h>
  9. // ----------------------------
  10. #if     _WIN32_WINNT < 0x0500
  11. #undef  _WIN32_WINNT
  12. #define _WIN32_WINNT   0x0500
  13. #endif
  14. #include <windows.h>
  15. // ----------------------------
  16. using namespace std;
  17.  
  18. class STC {
  19.     public:
  20.  
  21.     void SetColor(int index)
  22.     {
  23.         /** This sets only one line to be colored **/
  24.         SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), index);
  25.     }
  26.  
  27.     void ResetColor()
  28.     {
  29.         /** This sets the line to normal ( reseting it ) **/
  30.         SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 7);
  31.     }
  32. };
  33.  
  34. void waitingTime()
  35. {
  36.     Sleep(300);
  37.     cout << "\n Verifying";
  38.     Sleep(1000);
  39.     cout << ".";
  40.     Sleep(1000);
  41.     cout << ".";
  42.     Sleep(1000);
  43.     cout << ".\n";
  44. }
  45.  
  46. void waitingTime_Confirming()
  47. {
  48.     Sleep(800);
  49.     cout << " Confirming";
  50.     Sleep(500);
  51.     cout << ".";
  52.     Sleep(500);
  53.     cout << ".";
  54.     Sleep(500);
  55.     cout << ".\n";
  56. }
  57.  
  58. string getpassword( const string& prompt = "Password: " )
  59.   {
  60.   string result;
  61.  
  62.   // Set the console mode to no-echo, not-line-buffered input
  63.   DWORD mode, count;
  64.   HANDLE ih = GetStdHandle( STD_INPUT_HANDLE  );
  65.   HANDLE oh = GetStdHandle( STD_OUTPUT_HANDLE );
  66.   if (!GetConsoleMode( ih, &mode ))
  67.     throw runtime_error(
  68.       "getpassword: You must be connected to a console to use this program.\n"
  69.       );
  70.   SetConsoleMode( ih, mode & ~(ENABLE_ECHO_INPUT | ENABLE_LINE_INPUT) );
  71.  
  72.   // Get the password string
  73.   WriteConsoleA( oh, prompt.c_str(), prompt.length(), &count, NULL );
  74.   char c;
  75.   while (ReadConsoleA( ih, &c, 1, &count, NULL) && (c != '\r') && (c != '\n'))
  76.     {
  77.     if (c == '\b')
  78.       {
  79.       if (result.length())
  80.         {
  81.         WriteConsoleA( oh, "\b \b", 3, &count, NULL );
  82.         result.erase( result.end() -1 );
  83.         }
  84.       }
  85.     else
  86.       {
  87.       WriteConsoleA( oh, "*", 1, &count, NULL );
  88.       result.push_back( c );
  89.       }
  90.     }
  91.  
  92.   // Restore the console mode
  93.   SetConsoleMode( ih, mode );
  94.  
  95.   return result;
  96.   }
  97.  
  98. string Options[8]{
  99.     "exit", // 0
  100.     "help", // 1
  101.     "writeMessage", // 2
  102.     "clear", // 3
  103.     "./sudoAPT-upRank", // 4
  104.     "AC-start", // 5
  105.     "AC-help", // 6
  106.     "logout" // 7
  107. };
  108. string selectOpt, selectOptADM;
  109. string writeMessage_str;
  110. string IGusernameChosen, IGusernameChosenLOG;
  111. string IGpassword = "qwERtY{[u7I0px(645@#)]}";
  112. string IGusernameDefault = "USWER";
  113. int age, ageminlimit = 14, agemaxlimit= 150;
  114. int passLevel = 0, permission = 1;
  115. int n = 1;
  116. int option = 0;
  117. int x;
  118. int y;
  119. int times = 900000000;
  120. float done = 0;
  121. int sleepy = 10;
  122.  
  123. int main(int argc, char * argv[])
  124. {
  125.     // Settings for the program
  126.     ShowWindow( GetConsoleWindow(), SW_RESTORE );
  127.     system("CLS");
  128.     system("MODE 132, 50");
  129.     system("TITLE FillInHack - Logging..");
  130.     system("COLOR 07");
  131.     STC textColor;
  132.     time_t now = time(0);
  133.     char* dt = ctime(&now);
  134.  
  135.     cout << "\n Enter your age: ";
  136.     cin >> age;
  137.     waitingTime();
  138.     // Verifying the age to be in the max & min limit
  139.     if(age >= ageminlimit && age <= agemaxlimit)
  140.     {
  141.         passLevel += 1; // changing the passLevel to 1
  142.     } else
  143.         {
  144.             waitingTime_Confirming();
  145.             cout << "\nSorry, your age is not in the limit..\nTry again later..";
  146.             Sleep(200);
  147.             system("PAUSE >nul");
  148.             return 0;
  149.         }
  150.  
  151.     switch(passLevel)
  152.     {
  153.         case 1:
  154.             system("CLS");
  155.             enterUsernameAgain:
  156.             Sleep(300);
  157.             cout << "\n Choose an username (8 characters minimum) : ";
  158.             cin >> IGusernameChosen;
  159.             if(IGusernameChosen.length() >= 8) passLevel = 2;
  160.             else if(IGusernameChosen.length() < 8)
  161.             {
  162.                 cout << "\n\n *Your username is under the 8 characters limit..*\nYours was: " << IGusernameChosen.length() << "\n\n";
  163.                 Sleep(200);
  164.                 goto enterUsernameAgain;
  165.             }
  166.             if(IGusernameChosen == "./default")
  167.             {
  168.                 IGusernameChosen = IGusernameDefault;
  169.                 passLevel += 1;
  170.             }
  171.  
  172.         case 2:
  173.             Sleep(500);
  174.             cout << "\n Enter the account below to login..\n\n";
  175.             Sleep(500);
  176.             cout << "  Chosen Username: ";
  177.             textColor.SetColor(5);
  178.             cin >> IGusernameChosenLOG;
  179.             textColor.ResetColor();
  180.             Sleep(800);
  181.             try {
  182.                 string password = getpassword( " Password: " );
  183.                 textColor.ResetColor();
  184.                 Sleep(700);
  185.             if(IGusernameChosenLOG == IGusernameChosen && password == IGpassword)
  186.             {
  187.                 waitingTime();
  188.                 Sleep(200);
  189.                 waitingTime_Confirming();
  190.                 Sleep(50);
  191.                 passLevel += 1;
  192.             } else {
  193.                 waitingTime();
  194.                 Sleep(200);
  195.                 waitingTime_Confirming();
  196.                 Sleep(50);
  197.                 textColor.SetColor(4);
  198.                 cout << "\n\n Wrong password or username! ";
  199.                 textColor.ResetColor();
  200.                 cout << "Exiting program..";
  201.                 Sleep(800);
  202.                 system("PAUSE >nul");
  203.                 break;
  204.             }
  205.             }
  206.             catch (exception& e)
  207.             {
  208.                 cerr << e.what();
  209.             }
  210.  
  211.         case 3:
  212.             system("CLS");
  213.             system("TITLE FillInHack");
  214.             Sleep(2000);
  215.             textColor.SetColor(2);
  216.             cout << "\n Welcome, ";
  217.             textColor.SetColor(5);
  218.             cout << IGusernameChosen;
  219.             textColor.SetColor(2);
  220.             cout << " to FillInHack!\n";
  221.             cout << " Login Time and Date: " << dt << "\n";
  222.             textColor.ResetColor();
  223.             Sleep(100);
  224.                 enterOption:
  225.             selectOpt = "";
  226.             // OPTION LINE
  227.             textColor.SetColor(3);
  228.             cout << "\n\nguest@user/";
  229.             textColor.SetColor(5);
  230.             cout << IGusernameChosen;
  231.             textColor.SetColor(3);
  232.             cout << "/home-$ ";
  233.             textColor.ResetColor();
  234.             cin >> selectOpt;
  235.  
  236.             // OPTIONS
  237.             if(selectOpt == Options[1])
  238.             {
  239.                     cout << "\n\n*-->  This is a list of all commands that you can use: ";
  240.                     Sleep(800);
  241.                     textColor.SetColor(4);
  242.                     cout << "\n     help                       ";
  243.                     Sleep(200);
  244.                     textColor.ResetColor();
  245.                     cout << "Shows you a list of all commands that you can use.";
  246.                     Sleep(500);
  247.                     textColor.SetColor(4);
  248.                     cout << "\n     writeMessage               ";
  249.                     Sleep(200);
  250.                     textColor.ResetColor();
  251.                     cout << "Write a message to display on your screen. ( NOT VALABILE YET )";
  252.                     Sleep(500);
  253.                     textColor.SetColor(4);
  254.                     cout << "\n     exit                       ";
  255.                     Sleep(200);
  256.                     textColor.ResetColor();
  257.                     cout << "Exit the program.";
  258.                     Sleep(500);
  259.                     textColor.SetColor(4);
  260.                     cout << "\n     clear                      ";
  261.                     Sleep(200);
  262.                     textColor.ResetColor();
  263.                     cout << "Clear the screen.";
  264.                     Sleep(100);
  265.                     goto enterOption;
  266.             }
  267.  
  268.             if(selectOpt == Options[0])
  269.             {
  270.                 textColor.SetColor(2);
  271.                 cout << "\n\nLogging off Date and Time: " << dt;
  272.                 textColor.ResetColor();
  273.                 system("PAUSE >nul| (echo Press any key to exit..)");
  274.                 Sleep(200);
  275.                 return 0;
  276.             }
  277.  
  278.             if(selectOpt == Options[2])
  279.             {
  280.                 cout << "\n I'n sorry but this option ";
  281.                 textColor.SetColor(4);
  282.                 cout << "is not available ";
  283.                 textColor.ResetColor();
  284.                 cout << "yet..";
  285.                 goto enterOption;
  286.             }
  287.  
  288.             if(selectOpt == Options[3])
  289.             {
  290.                 system("CLS");
  291.                 goto enterOption;
  292.             }
  293.  
  294.             if(selectOpt == Options[4] && permission == 1)
  295.             {
  296.                 try {
  297.                     string password = getpassword( " Password: " );
  298.  
  299.                         if(password == IGpassword)
  300.                         {
  301.                                 enterOptionADM:
  302.                             selectOptADM = "";
  303.                             // OPTION LINE
  304.                             textColor.SetColor(3);
  305.                             cout << "\n\nadmin@user/";
  306.                             textColor.SetColor(5);
  307.                             cout << IGusernameChosen;
  308.                             textColor.SetColor(3);
  309.                             cout << "/home-$ ";
  310.                             textColor.ResetColor();
  311.                             cin >> selectOptADM;
  312.  
  313.                         // OPTIONS
  314.                             if(selectOptADM == Options[0])
  315.                             {
  316.                                 textColor.SetColor(2);
  317.                                 cout << "\n\nLogging off Date and Time: " << dt;
  318.                                 textColor.ResetColor();
  319.                                 system("PAUSE >nul| (echo Press any key to exit..)");
  320.                                 Sleep(200);
  321.                                 return 0;
  322.                             }
  323.  
  324.                             if(selectOptADM == Options[1])
  325.                             {
  326.                                 cout << "\n\n*-->  This is a list of all commands that you can use: ";
  327.                                 Sleep(800);
  328.                                 textColor.SetColor(4);
  329.                                 cout << "\n     help                       ";
  330.                                 Sleep(200);
  331.                                 textColor.ResetColor();
  332.                                 cout << "Shows you a list of all commands that you can use.";
  333.                                 Sleep(500);
  334.                                 textColor.SetColor(4);
  335.                                 cout << "\n     writeMessage               ";
  336.                                 Sleep(200);
  337.                                 textColor.ResetColor();
  338.                                 cout << "Write a message to display on your screen. ( NOT VALABILE YET )";
  339.                                 Sleep(500);
  340.                                 textColor.SetColor(4);
  341.                                 cout << "\n     exit                       ";
  342.                                 Sleep(200);
  343.                                 textColor.ResetColor();
  344.                                 cout << "Exit the program.";
  345.                                 Sleep(500);
  346.                                 textColor.SetColor(4);
  347.                                 cout << "\n     clear                      ";
  348.                                 Sleep(200);
  349.                                 textColor.ResetColor();
  350.                                 cout << "Clear the screen.";
  351.                                 Sleep(500);
  352.                                 textColor.SetColor(4);
  353.                                 cout << "\n     AC-start                   ";
  354.                                 Sleep(200);
  355.                                 textColor.ResetColor();
  356.                                 cout << "Open the autoclicker hack.";
  357.                                 Sleep(500);
  358.                                 textColor.SetColor(4);
  359.                                 cout << "\n     AC-help                    ";
  360.                                 Sleep(200);
  361.                                 textColor.ResetColor();
  362.                                 cout << "Show all commands available for autoclicker.";
  363.                                 Sleep(100);
  364.                                 goto enterOptionADM;
  365.                             }
  366.  
  367.                             if(selectOptADM == Options[2])
  368.                             {
  369.                                 cout << "\n I'n sorry but this option ";
  370.                                 textColor.SetColor(4);
  371.                                 cout << "is not available ";
  372.                                 textColor.ResetColor();
  373.                                 cout << "yet..";
  374.                                 goto enterOptionADM;
  375.                             }
  376.  
  377.                             if(selectOptADM == Options[3])
  378.                             {
  379.                                 system("CLS");
  380.                                 goto enterOptionADM;
  381.                             }
  382.  
  383.                             if(selectOptADM == Options[4])
  384.                             {
  385.                                 Sleep(200);
  386.                                 cout << "\nYou're already admin..";
  387.                                 goto enterOptionADM;
  388.                             }
  389.  
  390.                             if(selectOptADM == Options[5])
  391.                             { /*
  392.                                     // DISPLAY AUTO CLICKER
  393.                                 cout << "\n\n\n     ##############################\n";
  394.                                 cout << "       #       ";
  395.                                 textColor.SetColor(5);
  396.                                 cout << "AUTO CLICKER";
  397.                                 textColor.ResetColor();
  398.                                 cout << "         #\n";
  399.                                 cout << "       #            by Fillinlak3   #\n";
  400.                                 cout << "       ##############################\n\n\n";
  401.  
  402.                                     // AUTO CLICKER PROGRAM BODY
  403.                                 cout << " Starting in 5..." << endl;
  404.                                 Sleep(1000);
  405.                                 cout << " Starting in 4..." << endl;
  406.                                 Sleep(1000);
  407.                                 cout << " Starting in 3..." << endl;
  408.                                 Sleep(1000);
  409.                                 cout << " Starting in 2..." << endl;
  410.                                 Sleep(1000);
  411.                                 cout << " Starting in 1..." << endl;
  412.                                 Sleep(40);
  413.                                 PlaySound(TEXT("AC-starting.wav"), NULL, SND_SYNC);
  414.                                 system("CLS");
  415.  
  416.                                    // DISPLAY WORKING AUTO CLICKER
  417.                                 cout << "\n\n\n     ##############################\n";
  418.                                 cout << "       #       ";
  419.                                 textColor.SetColor(5);
  420.                                 cout << "AUTO CLICKER";
  421.                                 textColor.ResetColor();
  422.                                 cout << "         #\n";
  423.                                 cout << "       #            by Fillinlak3   #\n";
  424.                                 cout << "       ##############################\n\n\n";
  425.                                 cout << "          Auto Click working!";
  426.                                 ShowWindow( GetConsoleWindow(), SW_HIDE );
  427.                                 Sleep(170);
  428.  
  429.                                    // LOOP FOR CLICKING
  430.                                 while (done <= times)
  431.                                 {
  432.                                     if(option == 1) // IF THE USER WANT TO EXIT
  433.                                     {
  434.                                     system("PAUSE >nul| (echo Press any key to close the autoclicker)");
  435.                                     done = 0;
  436.                                     Sleep(800);
  437.                                     goto enterOptionADM;
  438.                                     } // IF THE USER WANTS TO EXIT PRORGAM
  439.  
  440.                                         startagain:
  441.                                     Sleep(sleepy);
  442.                                     mouse_event(MOUSEEVENTF_LEFTDOWN, x, y, 0, 0);
  443.                                     mouse_event(MOUSEEVENTF_LEFTUP, x, y, 0, 0);
  444.                                         // THIS TWO MAKES CLICKING FOREVER
  445.                                     done++;
  446.                                     times++;
  447.  
  448.                                         // TO STOP CLICKING OR EXITING THE PROGRAM
  449.                                         if(GetAsyncKeyState(VK_ESCAPE)) // IF YOU PRESS ESC
  450.                                         {
  451.                                             ShowWindow( GetConsoleWindow(), SW_RESTORE );
  452.                                             system("CLS");
  453.                                                 // DISPLAY
  454.                                             cout << "\n\n\n     ##############################\n";
  455.                                             cout << "       #       ";
  456.                                             textColor.SetColor(5);
  457.                                             cout << "AUTO CLICKER";
  458.                                             textColor.ResetColor();
  459.                                             cout << "         #\n";
  460.                                             cout << "       #            by Fillinlak3   #\n";
  461.                                             cout << "       ##############################\n\n\n";
  462.                                             cout << "          Auto Click paused!";
  463.                                             Sleep(170);
  464.                                             cout << "\n\n The clicker have done: " << done << " clicks in total.\n";
  465.                                             cout << "\n *--> You have paused the auto clicker. To start the auto clicker again press SHIFT + MIDDLE MOUSE BUTTON and to exit press SHIFT + CONTROL";
  466.                                         while(true)
  467.                                         {
  468.                                             if(GetAsyncKeyState(VK_SHIFT) && GetAsyncKeyState(VK_MBUTTON))
  469.                                             { // STARTING AGAIN THE AUTO CLICKER
  470.                                                 system("CLS");
  471.                                                     // DISPLAY AUTO CLICKER
  472.                                                 cout << "\n\n\n     ##############################\n";
  473.                                                 cout << "       #       ";
  474.                                                 textColor.SetColor(5);
  475.                                                 cout << "AUTO CLICKER";
  476.                                                 textColor.ResetColor();
  477.                                                 cout << "         #\n";
  478.                                                 cout << "       #            by Fillinlak3   #\n";
  479.                                                 cout << "       ##############################\n\n\n";
  480.  
  481.                                                     // AUTO CLICKER PROGRAM BODY
  482.                                                 Sleep(40);
  483.                                                 cout << " Starting in 5..." << endl;
  484.                                                 Sleep(1000);
  485.                                                 cout << " Starting in 4..." << endl;
  486.                                                 Sleep(1000);
  487.                                                 cout << " Starting in 3..." << endl;
  488.                                                 Sleep(1000);
  489.                                                 cout << " Starting in 2..." << endl;
  490.                                                 Sleep(1000);
  491.                                                 cout << " Starting in 1..." << endl;
  492.                                                 ShowWindow( GetConsoleWindow(), SW_RESTORE );
  493.                                                 Sleep(40);
  494.                                                 PlaySound(TEXT("AC-starting.wav"), NULL, SND_SYNC);
  495.                                                 system("CLS");
  496.                                                     // DISPLAY WORKING AUTO CLICKER
  497.                                                 cout << "\n\n\n     ##############################\n";
  498.                                                 cout << "       #       ";
  499.                                                 textColor.SetColor(5);
  500.                                                 cout << "AUTO CLICKER";
  501.                                                 textColor.ResetColor();
  502.                                                 cout << "         #\n";
  503.                                                 cout << "       #            by Fillinlak3   #\n";
  504.                                                 cout << "       ##############################\n\n\n";
  505.                                                 cout << "          Auto Click working!";
  506.                                                 ShowWindow( GetConsoleWindow(), SW_HIDE );
  507.                                                 Sleep(170);
  508.                                                 break;
  509.                                             } // STARTING AGAIN THE AUTO CLICKER BODY
  510.  
  511.                                             if(GetAsyncKeyState(VK_SHIFT) && GetAsyncKeyState(VK_CONTROL))
  512.                                             { // EXITING THE AUTO CLICKER
  513.                                                 Sleep(400);
  514.                                                 ShowWindow( GetConsoleWindow(), SW_RESTORE );
  515.                                                     option = 1;
  516.                                                     system("CLS");
  517.                                                         // DISPLAY
  518.                                                     cout << "\n\n\n     ##############################\n";
  519.                                                     cout << "       #       ";
  520.                                                     textColor.SetColor(5);
  521.                                                     cout << "AUTO CLICKER";
  522.                                                     textColor.ResetColor();
  523.                                                     cout << "         #\n";
  524.                                                     cout << "       #            by Fillinlak3   #\n";
  525.                                                     cout << "       ##############################\n\n\n";
  526.                                                     cout << "          Auto Click exiting!";
  527.                                                     Sleep(170);
  528.                                                     cout << "\n\n The clicker have done: " << done << " clicks in total.\n";
  529.                                                     break;
  530.                                             } // EXITING THE AUTO CLICKER BODY
  531.  
  532.                                         } // ANTI BUGGING BODY
  533.  
  534.                                         } else goto startagain; // STOP CLICKING BODY
  535.  
  536.                                 } // WHILE LOOP BODY
  537.                                 system("PAUSE >nul"); */
  538.                                 cout << "\nThis option is not available yet..";
  539.                                 goto enterOptionADM;
  540.                             }
  541.  
  542.                             if(selectOptADM == Options[6])
  543.                             {
  544.                                 Sleep(100);
  545.                                 cout << "\n\n ==  AUTO CLICKER  ==";
  546.                                 Sleep(200);
  547.                                 cout << "\n Press ESCAPE button to pause the autoclicker.";
  548.                                 Sleep(200);
  549.                                 cout << "\n Press SHIFT + MIDDLE MOUSE BUTTON when paused to start again the autoclicker.";
  550.                                 Sleep(200);
  551.                                 cout << "\n Press SHIFT + CONTROL when paused to exit the autoclicker.";
  552.                                 goto enterOptionADM;
  553.                             }
  554.  
  555.                             if(selectOptADM != Options[0] || selectOptADM != Options[1] || selectOptADM != Options[2] || selectOptADM != Options[3] || selectOptADM != Options[4] || selectOptADM != Options[5] || selectOptADM != Options[6])
  556.                             {
  557.                                 textColor.SetColor(2);
  558.                                 cout << "\n This is not a valid option";
  559.                                 textColor.ResetColor();
  560.                                 goto enterOptionADM;
  561.                             }
  562.  
  563.                         } else {
  564.                             Sleep(500);
  565.                             textColor.SetColor(4);
  566.                             cout << "\nAccess denied ";
  567.                             textColor.ResetColor();
  568.                             cout << "to all control access of FillInHack for user " << IGusernameChosen;
  569.                             Sleep(200);
  570.                             permission = 0;
  571.                             goto enterOption;
  572.                         }
  573.                     }
  574.                     catch (exception& e)
  575.                     {
  576.                     cerr << e.what();
  577.                     }
  578.             } else { // FINISH ADMIN PERMISSIONS BODY
  579.                 cout << "\nYou have no more permission for this..";
  580.                 goto enterOption;
  581.             }
  582.  
  583.             if(selectOpt != Options[0] || selectOpt != Options[1] || selectOpt != Options[2] || selectOpt != Options[3] || selectOpt != Options[4])
  584.             {
  585.                 textColor.SetColor(2);
  586.                 cout << "\n This is not a valid option";
  587.                 textColor.ResetColor();
  588.                 goto enterOption;
  589.             }
  590.  
  591.     } // SWITCH(passLevel) CLOSING
  592.  
  593. } // INT MAIN CLOSING
Add Comment
Please, Sign In to add comment