Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Sep 2002
    Posts
    2

    Default Webmail Login Script

    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. #2
    Registered User
    Join Date
    Sep 2002
    Posts
    2

    Default

    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 Code:
    <?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); ?>

Similar Threads & Tags
Similar threads

  1. secure cpanel/roundcube webmail login script
    By salvatore333 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 10-20-2009, 05:59 AM
  2. Webmail login script redirect on failure
    By boy143878 in forum cPanel Developers
    Replies: 3
    Last Post: 04-04-2008, 08:09 AM
  3. Cpanel webmail login script
    By ahmadtrco in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 12-05-2006, 08:30 AM
  4. Webmail login Script
    By valtea in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 07-20-2004, 04:54 AM
  5. Login Script for Cpanel Webmail
    By SatuPortal.com in forum cPanel and WHM Discussions
    Replies: 14
    Last Post: 02-07-2004, 09:34 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube