Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Webmail Login Script

Discussion in 'E-mail Discussion' started by GrumWSmith.net, Apr 15, 2003.

  1. GrumWSmith.net

    GrumWSmith.net Registered

    Joined:
    Sep 7, 2002
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    151
    While making a webmail login script, I've noticed that the .htaccess is virtually impossible to bypass by using a form (unless you fill in the values by hand on the popup, but that defeats the purpose) and was wondering if anyone had successfully made a script which all you need to do is enter the appropriate username and pass on the php page.

    Does anyone have any ideas?

    Thanks, Graham
     
  2. GrumWSmith.net

    GrumWSmith.net Registered

    Joined:
    Sep 7, 2002
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    151
    Here's what I've came up with. It doesn't work properly yet, but it should. Doesn't work in IE, but works in Opera7.1

    PHP:
    <?php 
    $text 
    "<SCRIPT LANGUAGE=\"JavaScript\">
    <!--
    function openPage() {
    var passWord = document.forms[\"LoginForm\"].passwordfield.value;
    var userName = document.forms[\"LoginForm\"].usernamefield.value;
    var system = document.forms[\"LoginForm\"].mail_system.value;
    var newURL = \"http://\"+userName+\"+scottishexplorers.com:\"+passWord+\"@scottishexplorers.com:2095\"+system+\"\";
    this.window.location=newURL;
    }
    //-->
    </SCRIPT>
    <div style=\"text-align:center\"> 
    <form name=\"LoginForm\" enctype=\"application/x-www-form-urlencoded\" method=\"post\" action=\"\">
    <table border=\"0\">
      <tr> 
        <td><input name=\"usernamefield\"; type=\"text\" class=\"tbox\" value=\"Username\" size=\"15\">
          </tr>
      <tr> 
        <td><input name=\"passwordfield\" type=\"password\" class=\"tbox\" value=\"Password\" size=\"15\"></td>
      </tr>
      <tr> 
        <td>Webmail: 
          <select class= \"tbox\" name=\"mail_system\">
            <option value=\"/horde/index.php\" selected>Horde</option>
            <option value=\"/neomail/neomail.pl\">Neomail</option>
          </select> </td>
      </tr>
      <tr> 
        <td><input onclick=openPage(); type=\"submit\" class=\"button\" name=\"Submit\" value=\"Submit\"></td>
      </tr>
    </table>
    </form>
    </div>"
    ;
    $ns -> tablerender("Webmail Login",$text); ?>
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice