Password Security Version 2.0
Submitted by oursharingclub on Friday, September 26, 2014 - 17:26.
Language
Password.cpp
Author : oursharingciub
Date : September 26, 2014 Firday
Email : [email protected]
Tool : Dev C++
Language : C++
Notice: Reference Mr. Jake Rodriguez Pomperada programming
- #include <iostream>
- #include <conio.h>
- #include <string>
- #include <windows.h> //system(), Sleep( )
- #include <time.h>
- using namespace std;
- const int PASSLEN= 7 ; //The length of password
- string PassGet( void ); // Get the password
- void Menu( void ); //The start menu
- //******** main function **********
- int main( void )
- {
- Menu();
- return 0;
- }
- //****** PassGet and menu function*****
- string PassGet( void )
- {
- char password[ PASSLEN ]= { '\0' };
- char letter;
- int loop;
- int len;
- string password2;
- len= 0;
- loop= 0;
- letter= '\0';
- while( letter!= '\r' ) //Caarrige return character
- {
- if( letter== '\b' && password[ 0 ]== '\0' )
- {
- loop= 0;
- len= 0;
- }
- else
- {
- if( letter== '\b' && password[ 0 ]!= '\0' ) // \b :backspace
- {
- cout<< "\b";
- cout<< " ";
- cout<< "\b";
- loop--;
- password[ loop ]= '\0';
- len-- ;
- }
- else
- {
- {
- cout<< "*";
- }
- loop++;
- if( loop<= PASSLEN )
- {
- len++;
- }
- }
- }
- }
- //Convert Password from character
- loop= 0;
- password2= "";
- while( loop< len )
- {
- password2= password2+ password[ loop ];
- loop++;
- }
- return password2;
- } //End of Passget function
- void Menu( void )
- {
- string password;
- //Get local time<code><code></code></code>
- time_t date;
- cout<< "\n\n";
- char str[]= "********* PASSWORD SECURITY VERSION 2.0 **********";
- {
- cout<< str[ i ];
- Sleep( 100 ); //wait 0.1 second
- }
- cout<< "\n\n";
- cout<< "\n\t\t Notice: Protect your Password.";
- cout<< "\n\n\t\t Enter Your Password: ";
- password= PassGet();
- if( password== "sharing" )
- {
- cout<< "\n\n\n\n";
- cout<< "\t\t Password Accepted.";
- cout<< "\n";
- cout<< "\n\n\t\t Thank You For Using this Software.";
- }
- else
- {
- cout<< "\n\n";
- cout<< "\n\t\tSorry...";
- cout<< "\n\t\tPassword Denied!!!\n\n";
- Sleep( 1000 );
- cout<< "\n\n\t\tTry Again( Y ): ";
- char ch;
- cin>> ch;
- {
- Menu();
- }
- else
- {
- }
- }
- return ;
- } //End of Menu Function
Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.
Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.
FOR YOUR OWN SAFETY, PLEASE:
1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
Add new comment
- 58 views