Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Hello,
- My name is Josh. I am looking to build a very elaborate website/system. I was considering doing my own rather complex site first then working on my main goal, but I am now thinking it may be better off to dive right in.
- So the basic Idea is that users come to my main site and can register. They get their own personal page With minimal theming options. With full sitewide community options, including friends linking, chat, User avatars, that sort of thing. They can then choose to make a community webpage with subdomain, templating, css, and all of the interconnected community options as described. With another couple clicks I would like these users to be able to almost create a "virtual private server" with ftp access, ssh and the other functions necessary to be able to run a small gaming server.
- That is the gist of the project anyway. OK, so I am not a web developer or a coder, and am a total linux noob. Where do I start? Where can I ask for help when it get really difficult , what components should I be using in joomla.
- Resource wise , I have 0 money to get this done by paying for it so where might I find help on such a massive project? I honestly believe I could have over 1000 registered users the first month with exponential growth after that. So scalability would be key right off the bat.
- So now I guess I will go on to the site I am trying to do to get my feet wet as it were.
- My first issue it that my current game server that I am attempting to integrate into my site has 4000+ registered visitors, each with a password. The password was stored as salt:sha256. I have seen some php examples on logins for it below, but I am not even sure where to begin to or how to use them. Can I just change the joomla password encryption to match the encryption used by default?
- I have a lot more to ask and a ton to do, but I think I will leave it at that for now and see what responses I get.
- <?php
- require ('config.php');
- // @return true if password and nickname match
- function check_password_db($nickname,$password) {
- // Here u have to include your DB connection and select!
- $handle = mysql_connect($mysql_host, $mysql_user, $mysql_pass) or die($connect_error);
- mysql_select_db($mysql_db, $handle) or die($connect_error);
- $a=mysql_query("SELECT password FROM '.$mysql_table.' where username = '$nickname'");
- if(mysql_num_rows($a) == 1 ) {
- $password_info=mysql_fetch_array($a);
- $sha_info = explode("$",$password_info[0]);
- } else return false;
- if( $sha_info[1] === "SHA" ) {
- $salt = $sha_info[2];
- $sha256_password = hash('sha256', $password);
- $sha256_password .= $sha_info[2];;
- if( strcasecmp(trim($sha_info[3]),hash('sha256', $sha256_password) ) == 0 ) return true;
- else return false;
- }
- }
- ?>
- and like
- author's plugin says that you need to check the password with 'SHA256' hash, but that is not so.
- You need to do that -> encryptedPassword = "$SHA$" + salt + "$" + sha256(sha256(password) + salt);
- function checkPassword($trypass,$realpass){
- $parts = explode('$',$realpass);
- $salt = $parts[2];
- $hashed = hash('sha256',hash('sha256', $trypass).$salt);
- $hashed = '$SHA$'.$salt.'$'.$hashed;
- return $hashed == $realpass ? true : false;
- }
Advertisement
Add Comment
Please, Sign In to add comment