[Release]Regpage & Top characters, Coded by TrollTeam

11/19/2011 17:49 Dropdead*#31
[Only registered and activated users can see links. Click Here To Register...]
11/19/2011 20:32 ThElitEyeS#32
PHP Code:
<?php

    
//Decoded by ThElitEyeS

    
require_once('_inc/security.class.php');

    require_once(
'_inc/config.php');

    require_once(
'recaptchalib.php');

    
$publickey "6LeUN8oSAAAAACfGnaXzfMoleyu1xXycUdw14A3P";

    
$privatekey "6LeUN8oSAAAAAM5l6r-7pInTj-a1zGhnp3HIl_14";

    

    if(isset(
$_POST['submit'])) {

        
$resp recaptcha_check_answer (

            
$privatekey$_SERVER['REMOTE_ADDR'],

            
$_POST["recaptcha_challenge_field"],

            
$_POST["recaptcha_response_field"]

        );

        

        if(!
$resp->is_valid$msg[] = "Incorrect captcha";

        

        if(
strlen($_POST['username']) < || $_POST['username'] == "Username"$msg[] = "Username is too short";

        

        if(
strlen($_POST['username']) > 16)$msg[] = "Username is too long";

        

        if(
strlen($_POST['pw1']) < || strlen($_POST['pw2']) < || $_POST['pw1'] == "Password" || $_POST['pw2'] == "Password"$msg[] = "Password is too short";

        

        if(
strlen($_POST['pw1']) > 32 || strlen($_POST['pw2']) > 32)$msg[] = "Password is too long";

        

        if(
strlen($_POST['email']) < || $_POST['email'] == "Email"$msg[] = "Email is too short";

        

        if (!
filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) $msg[] = 'Incorrect email.';

        

        if(
strlen($_POST['question']) < || $_POST['question'] == 'Security Question'$msg[] = "Security Question is too short";

        

        if(
strlen($_POST['answer']) < || $_POST['answer'] == 'Security Answer'$msg[] = "Security Answer is too short";

        

        if(
$_POST['pw1'] != $_POST['pw2']) $msg[] = "Passwords are not the same";

        

        
$sec = new security();

        

        if(
$sec->is_secure($_POST['username']) == false$msg[] = "Username contains forbidden symbols";

        

        if(
$sec->is_secure($_POST['pw1']) == false || $sec->is_secure($_POST['pw2']) == false$msg[] = "Password contains forbidden symbols";

        

        if(
count($msg) > 0) {

            
$error "";

            for(
$i 0$i count($msg); $i++) {

            
$error .= "$msg[$i]\n";

            }

            
$error preg_replace("/\r?\n/""\\n"addslashes($error));

            echo 
"<script type=\"text/javascript\">";

            echo 
" alert('$error');";

            echo 
"</script>";

        }

        else {

            
$accountExists mssql_num_rows(mssql_query("select StrUserID from TB_User where StrUserID='$_POST[username]'"));

            if(
$accountExists 0) {

                echo 
"<script type='text/javascript'>alert('Account with such username already exists'); </script>";

            } else {

                
$email $_POST['email'];

                
$emailExists mssql_num_rows(mssql_query("select * from dbo.TB_User where Email='$email'"));

                if (
$emailExists 0) {

                    echo 
"<script type='text/javascript'>alert('Account with such Email already exists'); </script>";

                }

                else {

                
$pwd md5($_POST['pw1']);

                
mssql_query("insert into TB_User(StrUserID,password,sec_primary,sec_content,Email,sec_question,sec_answer) values('$_POST[username]','$pwd','3','3','$email','$_POST[question]','$_POST[answer]')");

                echo 
"<script type='text/javascript'>alert('Account successfully created');</script> ";

                if (
$Start_Silk 0) {

                    
$sql mssql_query("SELECT * FROM TB_User WHERE StrUserId='$_POST[username]'");

                    
$row mssql_fetch_array($sql);

                    
$silk mssql_query("INSERT INTO SK_Silk(JID,silk_own,silk_gift,silk_point) VALUES ('$row[JID]','500','0','0')");

                }

                }

            }

        }

    }

?>

<html>

    <head>

        <script type='text/javascript'>

            function make_blank(id,diff)

            {

                if (document.getElementById(id).value==diff) document.getElementById(id).value='';

            }

            function make_blur(id,diff)

            {

                if (document.getElementById(id).value=="") document.getElementById(id).value=diff;

            }

        </script>

        <script type="text/javascript">

        replace("Copyright","123")

        </script>

        <title>Reg page</title>

        <link rel="stylesheet" type="text/css" href="style.css" />

    </head>

<body>

        <form method='post' name='myform' action='' class='reg-form'>

        <input type='text' name='username' value='Username' maxlength='16' class='input' id="username1" onfocus="make_blank('username1','Username')" onblur="make_blur('username1','Username')"><br><br>

        <input type='password' name='pw1' maxlength='32' class='input' id='pw1' value='Password' onfocus="make_blank('pw1','Password')" onblur="make_blur('pw1','Password')"><br><br>

        <input type='password' name='pw2' maxlength='32' class='input' value='Password' id='pw2' onfocus="make_blank('pw2','Password')" onblur="make_blur('pw2','Password')"><br><br>

        <input type='text' name='email' class='input' value='Email' id='email' onfocus="make_blank('email','Email')" onblur="make_blur('email','Email')"><br><br>

        <input type='text' name='question' class='input' value='Security Question' id='question' onfocus="make_blank('question','Security Question')" onblur="make_blur('question','Security Question')"><br><br>

        <input type='text' name='answer' class='input' value='Security Answer' id='answer' onfocus="make_blank('answer','Security Answer')" onblur="make_blur('answer','Security Answer')"><br><br>

        <center><?php echo recaptcha_get_html($publickey);?></center><br>

        <input type='submit' name='submit' value='Register' class='reg-button'> <input type='reset' class='reg-button'><br>

        </form>

        <center><h1 class="bottom">Copyright &copy; Troll Team Decoded by ThElitEyeS</h1></center>

</body>

        

</html>
11/19/2011 21:03 LastThief#33
Quote:
Originally Posted by ThElitEyeS View Post
PHP Code:
<?php

    
//Decoded by ThElitEyeS

    
require_once('_inc/security.class.php');

    require_once(
'_inc/config.php');

    require_once(
'recaptchalib.php');

    
$publickey "6LeUN8oSAAAAACfGnaXzfMoleyu1xXycUdw14A3P";

    
$privatekey "6LeUN8oSAAAAAM5l6r-7pInTj-a1zGhnp3HIl_14";

    

    if(isset(
$_POST['submit'])) {

        
$resp recaptcha_check_answer (

            
$privatekey$_SERVER['REMOTE_ADDR'],

            
$_POST["recaptcha_challenge_field"],

            
$_POST["recaptcha_response_field"]

        );

        

        if(!
$resp->is_valid$msg[] = "Incorrect captcha";

        

        if(
strlen($_POST['username']) < || $_POST['username'] == "Username"$msg[] = "Username is too short";

        

        if(
strlen($_POST['username']) > 16)$msg[] = "Username is too long";

        

        if(
strlen($_POST['pw1']) < || strlen($_POST['pw2']) < || $_POST['pw1'] == "Password" || $_POST['pw2'] == "Password"$msg[] = "Password is too short";

        

        if(
strlen($_POST['pw1']) > 32 || strlen($_POST['pw2']) > 32)$msg[] = "Password is too long";

        

        if(
strlen($_POST['email']) < || $_POST['email'] == "Email"$msg[] = "Email is too short";

        

        if (!
filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) $msg[] = 'Incorrect email.';

        

        if(
strlen($_POST['question']) < || $_POST['question'] == 'Security Question'$msg[] = "Security Question is too short";

        

        if(
strlen($_POST['answer']) < || $_POST['answer'] == 'Security Answer'$msg[] = "Security Answer is too short";

        

        if(
$_POST['pw1'] != $_POST['pw2']) $msg[] = "Passwords are not the same";

        

        
$sec = new security();

        

        if(
$sec->is_secure($_POST['username']) == false$msg[] = "Username contains forbidden symbols";

        

        if(
$sec->is_secure($_POST['pw1']) == false || $sec->is_secure($_POST['pw2']) == false$msg[] = "Password contains forbidden symbols";

        

        if(
count($msg) > 0) {

            
$error "";

            for(
$i 0$i count($msg); $i++) {

            
$error .= "$msg[$i]\n";

            }

            
$error preg_replace("/\r?\n/""\\n"addslashes($error));

            echo 
"<script type=\"text/javascript\">";

            echo 
" alert('$error');";

            echo 
"</script>";

        }

        else {

            
$accountExists mssql_num_rows(mssql_query("select StrUserID from TB_User where StrUserID='$_POST[username]'"));

            if(
$accountExists 0) {

                echo 
"<script type='text/javascript'>alert('Account with such username already exists'); </script>";

            } else {

                
$email $_POST['email'];

                
$emailExists mssql_num_rows(mssql_query("select * from dbo.TB_User where Email='$email'"));

                if (
$emailExists 0) {

                    echo 
"<script type='text/javascript'>alert('Account with such Email already exists'); </script>";

                }

                else {

                
$pwd md5($_POST['pw1']);

                
mssql_query("insert into TB_User(StrUserID,password,sec_primary,sec_content,Email,sec_question,sec_answer) values('$_POST[username]','$pwd','3','3','$email','$_POST[question]','$_POST[answer]')");

                echo 
"<script type='text/javascript'>alert('Account successfully created');</script> ";

                if (
$Start_Silk 0) {

                    
$sql mssql_query("SELECT * FROM TB_User WHERE StrUserId='$_POST[username]'");

                    
$row mssql_fetch_array($sql);

                    
$silk mssql_query("INSERT INTO SK_Silk(JID,silk_own,silk_gift,silk_point) VALUES ('$row[JID]','500','0','0')");

                }

                }

            }

        }

    }

?>

<html>

    <head>

        <script type='text/javascript'>

            function make_blank(id,diff)

            {

                if (document.getElementById(id).value==diff) document.getElementById(id).value='';

            }

            function make_blur(id,diff)

            {

                if (document.getElementById(id).value=="") document.getElementById(id).value=diff;

            }

        </script>

        <script type="text/javascript">

        replace("Copyright","123")

        </script>

        <title>Reg page</title>

        <link rel="stylesheet" type="text/css" href="style.css" />

    </head>

<body>

        <form method='post' name='myform' action='' class='reg-form'>

        <input type='text' name='username' value='Username' maxlength='16' class='input' id="username1" onfocus="make_blank('username1','Username')" onblur="make_blur('username1','Username')"><br><br>

        <input type='password' name='pw1' maxlength='32' class='input' id='pw1' value='Password' onfocus="make_blank('pw1','Password')" onblur="make_blur('pw1','Password')"><br><br>

        <input type='password' name='pw2' maxlength='32' class='input' value='Password' id='pw2' onfocus="make_blank('pw2','Password')" onblur="make_blur('pw2','Password')"><br><br>

        <input type='text' name='email' class='input' value='Email' id='email' onfocus="make_blank('email','Email')" onblur="make_blur('email','Email')"><br><br>

        <input type='text' name='question' class='input' value='Security Question' id='question' onfocus="make_blank('question','Security Question')" onblur="make_blur('question','Security Question')"><br><br>

        <input type='text' name='answer' class='input' value='Security Answer' id='answer' onfocus="make_blank('answer','Security Answer')" onblur="make_blur('answer','Security Answer')"><br><br>

        <center><?php echo recaptcha_get_html($publickey);?></center><br>

        <input type='submit' name='submit' value='Register' class='reg-button'> <input type='reset' class='reg-button'><br>

        </form>

        <center><h1 class="bottom">Copyright &copy; Troll Team Decoded by ThElitEyeS</h1></center>

</body>

        

</html>

yea and ? this community really doesn't deserve shit

wow theeliteyes you advanced since last time i taught you php :)

Quote:
Originally Posted by bahaa12 View Post
:o you mad ? ThElitEyeS is the best.
and he can decode your scripts in 1 sec
and your script is 80% like his
yea i stole it from him

11/19/2011 21:17 Nezekan#34
Quote:
Originally Posted by LastThief View Post
yea and ? this community really doesn't deserve shit

wow theeliteyes you advanced since last time i taught you php :)



yea i stole it from him

well, if you really want to protect your "script" then try using a real form of encryption -.- *hint* ioncube *hint*
11/19/2011 21:29 kevin_owner#35
@LastThief correct me if i'm wrong but don't you forgot to escape some variables before you use it in any kind of query for example the email I don't you escaping it.

Also I would like to advice you to use PDO which does all the charactere escaping for you and it looks a lot nicer then using all those functions since it's OO and not to forget easier to switch from database source. But I guess you already know what it is since you're working with it for 5 years.
11/19/2011 21:38 LastThief#36
Quote:
Originally Posted by kevin_owner View Post
@LastThief correct me if i'm wrong but don't you forgot to escape some variables before you use it in any kind of query for example the email I don't you escaping it.

Also I would like to advice you to use PDO which does all the charactere escaping for you and it looks a lot nicer then using all those functions since it's OO and not to forget easier to switch from database source. But I guess you already know what it is since you're working with it for 5 years.
maybe i forgot the email but others are will just return false if it's not aA-zZ-0-9

well i don't use PHP data objects often but it's good suggestion gonna use it later on my developing :)
11/19/2011 22:12 ThElitEyeS#37
Quote:
Originally Posted by LastThief View Post
yea and ? this community really doesn't deserve shit

wow theeliteyes you advanced since last time i taught you php :)



yea i stole it from him

you taught me 4-7 words . i remember its . that was my first php days.
well and those thing you taught me you can find it any where like i said its was my first days i was so fresh new with php .
this don't mean you taught 80%.
people changes dude . no body still the same.
Sorry for my bad English.

Quote:
Originally Posted by kevin_owner View Post
@LastThief correct me if i'm wrong but don't you forgot to escape some variables before you use it in any kind of query for example the email I don't you escaping it.

Also I would like to advice you to use PDO which does all the charactere escaping for you and it looks a lot nicer then using all those functions since it's OO and not to forget easier to switch from database source. But I guess you already know what it is since you're working with it for 5 years.
Quote:
Originally Posted by LastThief View Post
maybe i forgot the email but others are will just return false if it's not aA-zZ-0-9

well i don't use PHP data objects often but it's good suggestion gonna use it later on my developing :)
Well both of you are wrong.
he used
PHP Code:
if (!filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) $msg[] = 'Incorrect email.'
so if there no (@ , .) the mail don't work
so if he used shutdown its will not work because its will give error back because it got not @ , .
also check your script twice before release it .
if the user of this script hacked by it . he will lose all the trust.
Sorry for my bad English