Add unobfuscated code from @SirWumpus
The entries 2004/hibachi and 2005/mynx have unobfuscated code now. 2004/hibachi has a configure script that is used along the lines of the original entry (with some adjustments and fixes) and the hibachi.alt.c had to have ctype.h included too. The directory src/localhost was copied to src-alt/localhost but the rest of src/ was from Anthony. The Makefile had to be updated to build this version. 2005/mynx does have a configure script but it is, just like the original entry, unused and so the unobfuscated (in source-alt/) is also unused. The mynx.alt.c was changed to mynx.alt2.c and the unobfuscated code was made mynx.alt.c. Updated manifest, rebuilt .entry.json and index.html files. After a question is answered and taken care of (in one of 199[1-3]/ant - not sure which one) issue #2513 can possibly be closed as complete (though the manifest updates will have to be looked at more when 2004 and 2005 are reviewed).
This commit is contained in:
1 parent
60ce3d9155
commit
0d65af1b2b
65 files changed
+15579
-218
No files matched your search
+31
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cat <<'EOT'
|
||||
<table border="1" cellspacing="0" cellpadding="0">
|
||||
<caption><h3>Environment Variables</h3></caption>
|
||||
EOT
|
||||
|
||||
env | sed -e 's/^\(.[^\=]*\)=\(.*\)$/<tr><td class="normal">\1<\/td><td class="normal">\2\ <\/td><\/tr>/'
|
||||
|
||||
echo "</table>"
|
||||
|
||||
if [[ -z $REQUEST_METHOD ]]; then REQUEST_METHOD=''; fi
|
||||
if [[ $REQUEST_METHOD == "POST" && -n $CONTENT_LENGTH ]]; then
|
||||
STUFF=$(dd bs=1 count="$CONTENT_LENGTH" 2>/dev/null)
|
||||
COUNT=$(printf "%s" "$STUFF" | wc -c)
|
||||
|
||||
cat <<EOT
|
||||
<table border="1" cellspacing="0" cellpadding="0">
|
||||
<caption><h3>Standard Input</h3></caption>
|
||||
<tr><td class="normal"><pre>Length: $COUNT</pre></td></tr>
|
||||
<tr><td class="normal"><pre>$STUFF</pre></td></tr>
|
||||
</table>
|
||||
EOT
|
||||
|
||||
if [[ $CONTENT_LENGTH -eq $COUNT ]]; then
|
||||
echo "[ OK ] CONTENT_LENGTH = bytes read"
|
||||
else
|
||||
echo "[ BAD ] CONTENT_LENGTH != bytes read"
|
||||
fi
|
||||
|
||||
fi
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cat <<'-EOT-'
|
||||
HTTP/1.0 200 OK
|
||||
Content-Type: text/html
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
Hibachi/1.0 Shell Test 0 - Display Enviroment
|
||||
</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../style.css">
|
||||
</head>
|
||||
<body background="../../Img/hot-coal-edge-110-indent.png" style="margins: 0 0 0 0; padding: 0 0 0 0;">
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td width="130">
|
||||
<img alt="" src="../../Img/mrpixel.gif" width="130" height="1">
|
||||
</td>
|
||||
<td class="normal">
|
||||
|
||||
<div align="center">
|
||||
<h3>Results from Simple GET request</h3>
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<caption><h3>Assertions</h3></caption>
|
||||
-EOT-
|
||||
|
||||
if [[ "$PATH" == '/usr/local/bin:/usr/bin:/bin' ]]; then
|
||||
|
||||
echo "<tr><td>[ OK ] PATH</td></tr>"
|
||||
else
|
||||
echo "<tr><td>[ BAD ] PATH</td></tr>"
|
||||
fi
|
||||
|
||||
if [[ -z $ENV ]]; then
|
||||
echo "<tr><td>[ OK ] ENV</td></tr>"
|
||||
else
|
||||
echo "<tr><td>[ BAD ] ENV</td></tr>"
|
||||
fi
|
||||
|
||||
if [[ -z $CDPATH ]]; then
|
||||
echo "<tr><td>[ OK ] CDPATH</td></tr>"
|
||||
else
|
||||
echo "<tr><td>[ BAD ] CDPATH</td></tr>"
|
||||
fi
|
||||
|
||||
if [[ -z $REQUEST_METHOD ]]; then REQUEST_METHOD=''; fi
|
||||
if [[ $REQUEST_METHOD == 'GET' ]]; then
|
||||
echo "<tr><td>[ OK ] REQUEST_METHOD</td></tr>"
|
||||
else
|
||||
echo "<tr><td>[ BAD ] REQUEST_METHOD</td></tr>"
|
||||
fi
|
||||
|
||||
if [[ -z $DOCUMENT_ROOT ]]; then
|
||||
echo "<tr><td>[ OK ] DOCUMENT_ROOT</td></tr>"
|
||||
else
|
||||
echo "<tr><td>[ BAD ] DOCUMENT_ROOT</td></tr>"
|
||||
fi
|
||||
|
||||
# Test for existence only, since the location changes.
|
||||
if [[ -z $SCRIPT_FILENAME ]]; then
|
||||
echo "<tr><td>[ BAD ] SCRIPT_FILENAME</td></tr>"
|
||||
else
|
||||
echo "<tr><td>[ OK ] SCRIPT_FILENAME</td></tr>"
|
||||
fi
|
||||
|
||||
# Test for existence only, since the default value might change.
|
||||
if [[ -z $SERVER_PORT ]]; then
|
||||
echo "<tr><td>[ BAD ] SERVER_PORT</td></tr>"
|
||||
else
|
||||
echo "<tr><td>[ OK ] SERVER_PORT</td></tr>"
|
||||
fi
|
||||
|
||||
if [[ -z $SERVER_SOFTWARE ]]; then SERVER_SOFTWARE=''; fi
|
||||
if [[ $SERVER_SOFTWARE == 'hibachi/1.0' ]]; then
|
||||
echo "<tr><td>[ OK ] SERVER_SOFTWARE</td></tr>"
|
||||
else
|
||||
echo "<tr><td>[ BAD ] SERVER_SOFTWARE</td></tr>"
|
||||
fi
|
||||
|
||||
if [[ -z $GATEWAY_INTERFACE ]]; then GATEWAY_INTERFACE=''; fi
|
||||
if [[ $GATEWAY_INTERFACE == 'CGI/0.0' ]]; then
|
||||
echo "<tr><td>[ OK ] GATEWAY_INTERFACE</td></tr>"
|
||||
else
|
||||
echo "<tr><td>[ BAD ] GATEWAY_INTERFACE</td></tr>"
|
||||
fi
|
||||
|
||||
echo "</table>"
|
||||
|
||||
if [[ -z $DOCUMENT_ROOT ]]; then DOCUMENT_ROOT='.'; fi
|
||||
# We want to source the file, but for SC1091 the file is not available at the time of this edit.
|
||||
#
|
||||
# SC1091 (info): Not following: ./test/shell/dump.sh was not specified as input (see shellcheck -x).
|
||||
# https://www.shellcheck.net/wiki/SC1091
|
||||
# shellcheck disable=SC1091
|
||||
source "$DOCUMENT_ROOT/test/shell/dump.sh"
|
||||
|
||||
cat <<'-EOT-'
|
||||
<br>
|
||||
<form method="GET" action="test1.sh">
|
||||
<b>Next Test: <input type="submit" name="example" value="GET REQUEST WITH QUERY-STRING">
|
||||
<input type="hidden" name="garibaldi" value="peek-a-boo"></b>
|
||||
</form>
|
||||
</div>
|
||||
<hr>
|
||||
<a href="../../#Test">Return to HIBACHI</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
-EOT-
|
||||
|
||||
exit 0
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cat <<'-EOT-'
|
||||
HTTP/1.0 200 OK
|
||||
Content-Type: text/html
|
||||
Set-Cookie: cookie1=test1.sh; path=/
|
||||
Set-Cookie: cookie2=test1.sh; path=/
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
Hibachi/1.0 Shell Test 1
|
||||
</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../style.css">
|
||||
</head>
|
||||
<body background="../../Img/hot-coal-edge-110-indent.png" style="margins: 0 0 0 0; padding: 0 0 0 0;">
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td width="130">
|
||||
<img alt="" src="../../Img/mrpixel.gif" width="130" height="1">
|
||||
</td>
|
||||
<td class="normal">
|
||||
|
||||
<div align="center">
|
||||
<h2>Results of Form GET request</h2>
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<caption><h3>Assertions</h3></caption>
|
||||
-EOT-
|
||||
|
||||
if [[ $PATH == '/usr/local/bin:/usr/bin:/bin' ]]; then
|
||||
echo "<tr><td>[ OK ] PATH</td></tr>"
|
||||
else
|
||||
echo "<tr><td>[ BAD ] PATH</td></tr>"
|
||||
fi
|
||||
|
||||
if [[ -z $ENV ]]; then
|
||||
echo "<tr><td>[ OK ] ENV</td></tr>"
|
||||
else
|
||||
echo "<tr><td>[ BAD ] ENV</td></tr>"
|
||||
fi
|
||||
|
||||
if [[ -z $CDPATH ]]; then
|
||||
echo "<tr><td>[ OK ] CDPATH</td></tr>"
|
||||
else
|
||||
echo "<tr><td>[ BAD ] CDPATH</td></tr>"
|
||||
fi
|
||||
|
||||
if [[ -z $REQUEST_METHOD ]]; then REQUEST_METHOD=''; fi
|
||||
if [[ $REQUEST_METHOD == 'GET' ]]; then
|
||||
echo "<tr><td>[ OK ] REQUEST_METHOD</td></tr>"
|
||||
else
|
||||
echo "<tr><td>[ BAD ] REQUEST_METHOD</td></tr>"
|
||||
fi
|
||||
|
||||
if [[ -z $QUERY_STRING ]]; then QUERY_STRING=''; fi
|
||||
if [[ $QUERY_STRING == 'example=GET+REQUEST+WITH+QUERY-STRING&garibaldi=peek-a-boo' ]]; then
|
||||
echo "<tr><td>[ OK ] QUERY_STRING</td></tr>"
|
||||
else
|
||||
echo "<tr><td>[ BAD ] QUERY_STRING</td></tr>"
|
||||
fi
|
||||
|
||||
echo "</table>"
|
||||
|
||||
if [[ -z $DOCUMENT_ROOT ]]; then DOCUMENT_ROOT='.'; fi
|
||||
# We want to source the file, but for SC1091 the file is not available at the time of this edit.
|
||||
#
|
||||
# SC1091 (info): Not following: ./test/shell/dump.sh was not specified as input (see shellcheck -x).
|
||||
# https://www.shellcheck.net/wiki/SC1091
|
||||
# shellcheck disable=SC1091
|
||||
source "$DOCUMENT_ROOT/test/shell/dump.sh"
|
||||
|
||||
cat <<'-EOT-'
|
||||
<br>
|
||||
<form method="POST" action="test2.sh">
|
||||
<b>Next Test:</b> <input type="submit" name="example" value="POST REQUEST WITH COOKIES">
|
||||
<input type="hidden" name="hibachi" value="is not Apache">
|
||||
<input type="hidden" name="garibaldi" value="peek-a-boo">
|
||||
</form>
|
||||
</div>
|
||||
<hr>
|
||||
<a href="../../#Test">Return to HIBACHI</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
-EOT-
|
||||
|
||||
exit 0
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cat <<'-EOT-'
|
||||
HTTP/1.0 200 OK
|
||||
Content-Type: text/html
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
Hibachi/1.0 Shell Test 2
|
||||
</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../style.css">
|
||||
</head>
|
||||
<body background="../../Img/hot-coal-edge-110-indent.png" style="margins: 0 0 0 0; padding: 0 0 0 0;">
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td width="130">
|
||||
<img alt="" src="../../Img/mrpixel.gif" width="130" height="1">
|
||||
</td>
|
||||
<td class="normal">
|
||||
|
||||
<div align="center">
|
||||
<h2>Results of Form POST request</h2>
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<caption><h3>Assertions</h3></caption>
|
||||
-EOT-
|
||||
|
||||
if [[ "$PATH" = '/usr/local/bin:/usr/bin:/bin' ]]; then
|
||||
|
||||
echo "<tr><td>[ OK ] PATH</td></tr>"
|
||||
else
|
||||
echo "<tr><td>[ BAD ] PATH</td></tr>"
|
||||
fi
|
||||
|
||||
if [[ -z "$ENV" ]]; then
|
||||
echo "<tr><td>[ OK ] ENV</td></tr>"
|
||||
else
|
||||
echo "<tr><td>[ BAD ] ENV</td></tr>"
|
||||
fi
|
||||
|
||||
if [[ -z "$CDPATH" ]]; then
|
||||
echo "<tr><td>[ OK ] CDPATH</td></tr>"
|
||||
else
|
||||
echo "<tr><td>[ BAD ] CDPATH</td></tr>"
|
||||
fi
|
||||
|
||||
if [[ -z $REQUEST_METHOD ]]; then REQUEST_METHOD=''; fi
|
||||
if [[ "$REQUEST_METHOD" = 'POST' ]]; then
|
||||
echo "<tr><td>[ OK ] REQUEST_METHOD</td></tr>"
|
||||
else
|
||||
echo "<tr><td>[ BAD ] REQUEST_METHOD</td></tr>"
|
||||
fi
|
||||
|
||||
if [[ -z "$QUERY_STRING" ]]; then
|
||||
echo "<tr><td>[ OK ] QUERY_STRING</td></tr>"
|
||||
else
|
||||
echo "<tr><td>[ BAD ] QUERY_STRING</td></tr>"
|
||||
fi
|
||||
|
||||
if [[ -z $HTTP_COOKIE ]]; then HTTP_COOKIE=''; fi
|
||||
if [[ "$HTTP_COOKIE" == 'cookie1=test1.sh; cookie2=test1.sh' || "$HTTP_COOKIE" == 'cookie2=test1.sh; cookie1=test1.sh' ]]; then
|
||||
echo "<tr><td>[ OK ] HTTP_COOKIE</td></tr>"
|
||||
else
|
||||
echo "<tr><td>[ BAD ] HTTP_COOKIE</td></tr>"
|
||||
fi
|
||||
|
||||
echo "</table>"
|
||||
|
||||
if [[ -z $DOCUMENT_ROOT ]]; then DOCUMENT_ROOT='.'; fi
|
||||
# We want to source the file, but for SC1091 the file is not available at the time of this edit.
|
||||
#
|
||||
# SC1091 (info): Not following: ./test/shell/dump.sh was not specified as input (see shellcheck -x).
|
||||
# https://www.shellcheck.net/wiki/SC1091
|
||||
# shellcheck disable=SC1091
|
||||
source "$DOCUMENT_ROOT/test/shell/dump.sh"
|
||||
|
||||
cat <<'-EOT-'
|
||||
</div>
|
||||
<hr>
|
||||
<a href="../../#Test">Return to HIBACHI</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
-EOT-
|
||||
|
||||
exit 0
|
||||
Reference in new issue
Block a user