#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.
কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন