Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create the following folder structure in your htdocs folder on your computer: insecure js img css includes Download the users.txt file and place it into

  1. Create the following folder structure in your htdocs folder on your computer:
    • insecure
      • js
      • img
      • css
      • includes
  2. Download the users.txt file and place it into the includes folder.
  3. Create the following file(s) on your computer in the insecure folder:
    • index.php
  4. In the index.php file:
    1. Create a standard web page with all the basics (doctype, html tag, head tag, body, etc.)
    2. In the body of the page, create a web form that asks for the user username and password.
      • be sure to use a "password" input rather than a "text" input for the password field
      • be sure to include a reset button
      • be sure to include a submit button
      • once submitted one of two things will happen:
        • If they enter the correct user/password (one of the ones from the text file) the page will say "access granted" and will have no other content.
        • If they enter the wrong credentials the form will display with a message above it that says "access denied"
        • See sample screen shots below
  5. Give the site some personality using CSS.
    1. Think about design and layout
    2. Be sure to do all of your styling in a CSS file that is linked to your index.php file
  6. Test the site:
    • Make sure that your test is with all of the correct credentials from the text file
    • Test it with correct users, but wrong passwords
    • Test it with wrong users, but correct passwords
    • Test is with wrong users and wrong passwords
    • Make sure that you CSS works correctly
  7. Upload the site:
    • Once the site has been tested, upload the insecure directory to your server in the htdocs folder on your server.
    • Test the site again once it's uploaded and live
  8. Notes:
    • All of the php and html code will be in the index.php file.
    • When the form is processed, it will reload the index.php displaying different content depending on the results of the form input.

Helpful Hints

Below are a few hints that may help you along your journey

  • You'll likely need to use the explode() function twice. Once to grab the user/password pair. Then again to separate the user and password individually
  • Consider creating an associative array that uses the username for the index/key and the password for the value. Then loop through that array when processing the form.
  • The string ||>><<|| separates each user/password pair
  • Each user/password pair has a comma between the username and password

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design For Mere Mortals

Authors: Michael J Hernandez

4th Edition

978-0136788041

More Books

Students also viewed these Databases questions