Monday, 16 September 2013

Day three

Today was spent Working on C++ coding. I have made a program what is able to convert imputed letters to '*' characters from the computer AS they are entered. I used this to make a password type program and I have edited it so that it can be used for A program (text based) for security encryption and decryption or just password protecting your program. The code will be following;


/***************************/
/** SECURE PASSWORD ENTRY **/
/**   BY DANNY BATTISON   **/
/**  gabehabe@hotmail.com **/
/***************************/

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

using namespace std;

class Password /* Password class... will store all necessary data */
{
    protected: /* A password should be protected, right? */
        string password; /* The string to store the password */
        string input; /* The string to store the input */

    public:
        /* Constructor, pass a string to it (the actual password) */
        Password (string pass) {this->password = pass;}
        void Input () /* Get the password from the user */
        {
            while (true) /* Infinite loop, exited when RETURN is pressed */
            {
                char temp;
                temp= getch (); /* Get the current character of the password */
                if (GetAsyncKeyState (VK_RETURN)) /* If the user has pressed return */
                    return; /* Exit the function */
                input += temp;
                cout << '*'; /* Print a star */
            }
        }
        bool Compare () /* Check if the input is the same as the password */
        {
            if (password.length() != input.length()) /* If they aren't the same length */
                return false; /* Then they obviously aren't the same! */
            for (unsigned int i = 0; i <= input.length(); i++)
            { /* Loop through the strings */
                if (password[i] != input[i])
                    return false; /* If anything is not a match, then they are not the same */
            }
            return true; /* If all checks were passed, then they are the same */
        }
};

int main ()
{
    /*
     * NOTE: We could get a password from anywhere here, for example,
     *       we could import it from an encrypted file
     */
    cout<<"Please enter the password: \n"; //Added by Liam dickson

    Password pass ("torchwood"); /* Assign password a value with our constructor */
    pass.Input (); /* Get the input from the user */

    if (pass.Compare()) /* If they match, user could gain access to something */
    {
        cout << "\n[PASSWORD ACCEPTED]\n";
        cout << "This is the Torchwood system access with remote access\n";

    }
    else /* Otherwise, give them some abuse! */
        {
            cout << "\n[PASSWORD WRONG!]\n";
            cout << "The system is shutting down!\n";
            int x=0;
            string message = "System shutting down!";
            while ( message[x] != '\0')
            {
                cout << message[x];
                Sleep(50);
                x++;
            };
            cout<<"\n[Shutdown complete]";
            return 0;
        }
    cin.get (); /* Pause for input */
    return EXIT_SUCCESS; /* Program was executed successfully */
}

Monday, 9 September 2013

Day two

Today was more of trying to figure out servers and how to configure them. The tower would not work with the CD so I have been trying to figure out why it is not working. I think the bios is locking out CD booting so I will need to find out how to bypass the bios boot protection all together.

Friday, 6 September 2013

Day one

Today I plugged in the laptops to charge, fixed the wifi issues with them. I also cleared the office that we are now using for Nerd Herd. I also started to re-build the computer that we will be using to make our web server for the website. I downloaded Linux Ubuntu server as well.