Skip to content
Snippets Groups Projects
Commit 7aea4b27 authored by Florent Gluck's avatar Florent Gluck
Browse files

updated lab04

added labs/lab04-resources/
parent 88356cc8
Branches
No related tags found
No related merge requests found
Showing
with 1066 additions and 0 deletions
No preview for this file type
#!/bin/sh
echo "Content-type: text/html"
echo
echo "<html>"
echo "<body>"
echo "<h1>CPU information</h1>"
echo "The embedded system is based on the following CPU:<pre>"
cat /proc/cpuinfo
echo "</pre>"
echo "<p><a href=\"/\"><img src=\"/gohome.png\" border=\"0\"></a></p>"
echo "</body></html>"
#!/bin/sh
echo "Content-type: text/html"
echo
echo "<html>"
echo "<body>"
echo "<h1>Kernel information</h1>"
echo "The embedded system runs the following kernel:<font color=Red>"
uname -srm
echo "</font>"
echo "<p><a href=\"/\"><img src=\"/gohome.png\" border=\"0\"></a></p>"
echo "</body></html>"
#!/bin/sh
UPLOAD_DIR="/www/upload/files"
URL_PATH="/upload/files"
echo "Content-type: text/html"
echo
echo "<html>"
echo "<body>"
echo "<h1>Uploaded files</h1></p>"
cd $UPLOAD_DIR
for f in *; do
echo "<p><a href=\"$URL_PATH/$f\">$f</a></p>"
done
echo "</p><p><a href=\"/\"><img src=\"/gohome.png\" border=\"0\"></a></p>"
echo "</body></html>"
This diff is collapsed.
Config = Default
Root = /www/upload/files
FileMask = *
IgnoreSubdirs = YES
Overwrite = YES
LogFile = /www/upload/logs/upload.log
OkPage = /www/upload/OkPage.html
BadPage = /www/upload/BadPage.html
Debug = 0
#!/bin/sh
echo "Content-type: text/html"
echo
echo "<html>"
echo "<meta http-equiv=\"refresh\" content=\"5\">"
echo "<body>"
echo "<h1>System uptime</h1>"
echo "System time and uptime since last boot: <font color=Red>"
echo `uptime | awk -F"," '{print $1}'`
echo "</font>"
echo "<p><a href=\"/\"><img src=\"/gohome.png\" border=\"0\"></a></p>"
echo "</body></html>"
labs/lab04-resources/www/gohome.png

888 B

<html>
<head>
<title>Tiny Web Server</title>
</head>
<body>
<h1>Tiny Web Server</h1>
<h3>Available pages</h1>
<ul>
<li><a href="/cgi-bin/uptime.sh">Uptime</a></li>
<li><a href="/cgi-bin/kernel.sh">Kernel info</a></li>
<li><a href="/cgi-bin/cpu.sh">CPU info</a></li>
<li><a href="/cgi-bin/list_files.sh">Uploaded files</a></li>
</ul>
<h3>Upload a file</h3>
<form action="/cgi-bin/upload" enctype="multipart/form-data" method=post>
<input type=file name="File">
<input type=submit value="Upload">
</form>
</body>
</html>
<html>
<body>
<h1>Upload failed!</h1>
<hr>
<p><insert MESSAGE></p>
<p><a href="/"><img src="/gohome.png" border="0"></a></p>
</body>
</html>
<html>
<body>
<h1>Upload successful!</h1>
<p>Uploaded file: <insert lastfilename><br>
Number of uploaded bytes: <insert bytecount>
</p>
<p><a href="/"><img src="/gohome.png" border="0"></a></p>
</body>
</html>
labs/lab04-resources/www/upload/files/Embedded_Linux_Primer.jpg

89.7 KiB

labs/lab04-resources/www/upload/files/linux_distribs.jpg

80.2 KiB

labs/lab04-resources/www/upload/files/preinternet_chat_rooms.jpg

62.5 KiB

labs/lab04-resources/www/upload/files/sudo.png

11.6 KiB

labs/lab04-resources/www/upload/files/upgrading.png

69.4 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment