dumpform.ctf

#!/bin/bash /ss/bin/ss.exe
<html>
    <head>
        <title>Dump Form</title>
    </head>

    <body>
        <center>
        <table width=100% cellpadding=5 cellspacing=0 border=1>
            <tr>
                <th>
                    GET
                </th>
                <th>
                    POST
                </th>
            </tr>
            <tr>
                <td>
                    <%
                    action="dump.ctf"
                    method="get"

                    basedir = path() + separator()
                    include basedir + "survey.inc"
                    %>
                </td>
                <td>
                    <%
                    action="dump.ctf"
                    method="post"

                    include basedir + "survey.inc"
                    %>
                </td>
            </tr>
        </table>
        </center>
    </body>
</html>



==================================================
dump.ctf

#!/bin/bash /ss/bin/ss.exe
<html>
    <head>
        <title>Dump</title>
    </head>
    <body>
<pre>
<lit>
<%
    basedir = path() + separator()

    print("<hr>")
    println("<b>arguments</b>")
    include basedir + "args.inc"

    print("<hr>")
    println("<b>environemtal variables</b>")
    include basedir + "env.inc"

    if cgi() then
        print("<hr>")
        println("<b>cookies</b>")
        include basedir + "cookies.inc"

        print("<hr>")
        println("<b>form</b>")
        include basedir + "form.inc"
    end

    print("<hr>")
%>
</lit>
</pre>
    </body>
</html>




==================================================
survey.inc

<form action="<%=action%>" method="<%=method%>">
    <input type="hidden" name="itemid" value="a">
    <input type="hidden" name="itemid" value="b">

    Name
    <input type="text" name="name" value="">

    <p>
    Password
    <input type="password" name="password" value="">

    <p>
    Options
    <input type="CHECKBOX" name="option" value="o1" CHECKED>Option 1
    <input type="CHECKBOX" name="option" value="o2">Option 2

    <p>
    Gender
    <input type="RADIO" name="gender" value="m">Male
    <input type="RADIO" name="gender" value="f">Female
    <input type="RADIO" name="gender" value="o" CHECKED>Other

    <p>
    Message
<TEXTAREA cols=20 rows=5 name="message">
</TEXTAREA>

    <p>
    Favorites
    <SELECT name="profile" MULTIPLE size=5>
        <OPTION value="1 SELECTED">Animals
        <OPTION value="2">Band
        <OPTION value="3 SELECTED">Cars
        <OPTION value="4">Clash
        <OPTION value="5">Door
        <OPTION value="6">Kinks
        <OPTION value="7">Led Zepplin
        <OPTION value="8">Pink Floyd
        <OPTION value="9">Stones
    </SELECT>

    <p>
    <input type="submit"> <input type="reset">
</form>

