Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F19269
hello.cgi
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
dereckson
Feb 10 2016, 03:05
2016-02-10 03:05:43 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
hello.cgi
View Options
#!/bin/sh
# -------------------------------------------------------------
# HTTP request headers
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
echo "Content-type: text/html; charset=UTF-8"
echo ""
# -------------------------------------------------------------
# Header
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
echo '<!doctype html><html>'
echo '<head>'
echo ' <meta charset="utf-8" />'
echo ' <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/foundation/5.3.0/css/foundation.min.css" type="text/css" />'
echo '</head>'
echo '<body>'
echo ' <div class="row">'
echo ' <h1>Fortune and status</h1>'
echo ' </div>'
# -------------------------------------------------------------
# Content
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
echo ' <div class="row">'
echo ' <div class="large-8 columns">'
echo ' <h2>Fortune</h2><pre>'
/usr/games/fortune
echo ' </pre></div>'
echo ' <div class="large-4 columns">'
echo ' <h2>Status</h2>'
echo ' <h3>Server</h3>'
hostname
echo ' <h3>Uptime</h3>'
uptime
echo ' <h3>Kernel information</h3>'
uname -a
echo ' </div>'
echo ' </div>'
# -------------------------------------------------------------
# Footer
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
echo '<hr>'
echo 'Hello world from sh!'
echo '</body>'
echo '</html>'
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17133
Default Alt Text
hello.cgi (1 KB)
Attached To
Mode
P157 hello.cgi
Attached
Detach File
Event Timeline
Log In to Comment