![]() |
|
Custom Login Page?! - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Design (https://sinister.li/Forum-Design) +--- Forum: Web Design (https://sinister.li/Forum-Web-Design) +--- Thread: Custom Login Page?! (/Thread-Custom-Login-Page) Pages:
1
2
|
Custom Login Page?! - Dawnc0re - 10-09-2012 Hello. Im workig on a Social Engineering Project, and i need to make a custom Login page, a simple "Username, Password, Welcome message" thing. I need this in a .php format or something, im going to be using my own hosting for the upload. Im not familiar with any programming languages as HTML, php or anything so i need something automated The project is not phishing related!Thank You. RE: Custom Login Page?! - muhammad fakir - 10-10-2012 hi, you need encoding for login page is it for website or personal web? (internal company website) RE: Custom Login Page?! - Dawnc0re - 10-10-2012 Um i dont get what you just said. I need to design it. The look and stuff... RE: Custom Login Page?! - bluedog.tar.gz - 10-10-2012 I can offer you a design for a small fee :] RE: Custom Login Page?! - Dawnc0re - 10-11-2012 Hmmm, seems legit. But i can't "money transfer" right now, few reasons for that... i have 5$ on my adfoc.us acc if you want :3 RE: Custom Login Page?! - H4R0015K - 10-11-2012 I can help you with that...for free. RE: Custom Login Page?! - Dawnc0re - 10-12-2012 Check PM. Thanks
RE: Custom Login Page?! - Jacob - 10-13-2012 You'll need some php, database (unless you're stealing password, but unless you want realy login you'll need database), HTML, and CSS. Here is a great example. http://php-login-script.com/ RE: Custom Login Page?! - W0rM - 10-13-2012 Can you describe the type of social engineering project? may be there is a ready-made script for that! Cuz even if you get the design, how do you plan to incorporate that design in your project if you don't know any programming language! RE: Custom Login Page?! - The Alchemist - 10-13-2012 I've made one here : Here's what we need : 1) A mySQL database containing a table with two columns. 2) A log in form. 3) A validation code. 4) A secret page. 5) A code for logging out. 1) mySQL database : You need to create a mySQL database named 'mydb' containing a table named 'accounts'. The table contains two columns named 'username' and 'password'. 2) Log In form : Copy the code into a notepad file and save it as index.html Code: <html>
<head>
<meta http-equiv="author" content="The Alchemist"/>
</head>
<title>Log In</title>
<body>
<form action="login.php" method="POST">
<table>
<tr>
<td>Enter Username :</td>
<td><input type="text" name="uname" id="uname" value=""></td>
</tr>
<tr>
<td>Enter Password :</td>
<td><input type="password" name="pass" id="pass" value=""></td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="submit" id="submit" value="Log In"></td>
</tr>
</table></form>
</body>
</html>I've created a basic Log In form as above. 3) Log in validation code : Copy the code into a notepad file and save it as login.php PHP Code: <?php
//Log In code made by The Alchemist
session_start();
$hostname='localhost';//assuming the host of database to be 'localhost'
$user='admin';//assuming the username to be 'admin'
$password='password';//assuming password of the user to be 'password'
$dbname='mydb';//assuming name of database to be 'mydb'
$con=mysql_connect($hostname, $user, $password) or DIE('Connection to host is failed, perhaps the service is down!');
mysql_select_db($dbname,$con) or DIE('Database name is not available!');
$uname=$_POST['uname'];//username obtained from the form
$pass=$_POST['pass'];//password obtained from the form
$uname=mysql_real_escape_string($uname);//to avoid SQLi attacks
$pass=mysql_real_escape_string($pass);//to avoid SQLi attacks
$res=mysql_query("SELECT * FROM accounts WHERE username='$uname' AND password='$pass'",$con);//Validates values from the two columns
$row=mysql_row_num($res);//To check the number of results
if($row==1) //if username and password are correct
{
$_SESSION['name']=$uname;//Sets a value in the session array
header('Location : securedpage.php');//Redirects user to secured page
}
else //if username and password are invalid
{
header('Location : index.html');//Redirects user to log in page
}//end of code
?>4) The secret page Copy the code into a notepad file and save it as securedpage.php PHP Code: <?php
//Secret page code made by The Alchemist
session_start();
if(isset($_SESSION['name'])) //if someone logs in successfully
{
$name=$_SESSION['name'];
echo "Welcome $name. You are in secret page.</br>";
echo '<form method="POST" action="logout.php"><input type="submit" name="submit" value="Click To Log Out">';//the log out button
}
else //if someone tries to access secret page illegally
{
echo "You have no right to see this secured page</br>";
echo "Click <a href="index.html">here</a> to log in.</br>';
}//end of code
?>5) The log out code Copy the code into a notepad file and save it as logout.php PHP Code: <?php
//Log out code made by The Alchemist
session_start();
if(isset($_SESSION['name']))
{
unset($_SESSION['name']);//unset the value of $_SESSION['name']
//You may also use $_SESSION=array(); instead of the previous line
session_destroy();//destroy the session
header('Location: index.html');//redirect to log in page
}
else //if someont tries to access this php file illegally
{
header('Location: index.html');//redirect to log in page
}//end of code
?>Upload all these files in the same directory in your web hosting account. Make sure your web hosting site supports mySQL and PHP. I hope this helps. Any questions? Feel free to ask.
|