全部博文(168)
分类: LINUX
2014-11-14 23:11:05
Haserl is a small program that uses shell or Lua script to create cgi web scripts. It is intended for environments where PHP or ruby are too big.
It was written for Linux, but is known to run on FreeBSD. A typical use is to run cgi scripts in an embedded environment, using a small web server, such as mini-httpd, lighty, or the server built into busybox.
Freely available under the terms of the GNU Public License (GPL2).
Small: The haserl binary typically compiles to less than 20KB (stripped). The lua language adds less than 150K if linked in statically.
Parses like other scripting languages: Anything that is not enclosed in <% ... %> tags is sent verbatim to the client.
Automatic FORM parsing: Form elements sent from the client are automatically parsed and placed into environment variables. The script can then reference the variables without any extra work. For lua scripts, the elements are placed in a global FORM[] table.
multipart/form-data decoding: Mime data sent via the enctype="multipart/form-data" method is transparently decoded. This method is used when uploading files from the client.
Privilege Escalation: On Linux, if haserl is installed suid root, then it will attempt to drop its privilege to the uid/gid of the owner of the cgi script. This is similar to suexec in Apache.