Rappelz Private Server Registration Script

07/13/2011 02:54 RoflcopterGoesSoiSoiSoi#31
Security-flawed script. You should provide two alternative scripts for the most recent sqlsrv_() anyways.
07/13/2011 06:59 schmuselord1#32
password length should be at least 8 characters minimum when using md5
07/13/2011 11:15 andysky#33
Strean hör auf zu labern.. kenne mich etwas länger mit dem Thema sql-injections aus wie du.. komme mit den script innerhalb von ein paar sekunden an die daten von anderen spielern.. fallsu es net gepeilt hast du hast da sehr wohl eine abfrage erstellt.. uns war die, wo du den Username vergleichst.. dies etwas abgeändert, kann ich mit nem in knapp 3 min erstellten tool sämtliche passwörter mit den zugehörigen usernamen herausbekommen.. dauer dann logischerweise je nach db-volumen...
07/13/2011 13:37 medmedmed#34
code corrupted
[Only registered and activated users can see links. Click Here To Register...]
07/19/2011 15:48 [LW]Saik#35
So Strean, habe übrigens davon gesprochen, dass man über deinen code sehr einfach an den Username eines anderen Acc's rankommt (da ist eine abfrage, ob es den Username scho gibt..) und dessen PW dann einfach ändern kann

(Where $username = XX
Set 4pass = neues pw) blabla.. hasse sql inject eigtl, liebe aber die tools zum testen^^
07/19/2011 17:16 s0ul37#36
Nope, alternatively you can add two lines to the script which protects the script from SQL injections.
07/19/2011 19:34 RoflcopterGoesSoiSoiSoi#37
You can also add it in one line, and you can also add it in a dozen lines. You don't have a "magic feature that nobody else knows about."
07/19/2011 20:08 s0ul37#38
What I meant, was that it's easy to protect the script.
07/22/2011 21:53 said200#39
How fill in the script please I did not understand
07/23/2011 05:03 Anime Creature#40
in mysql i usually use this to prevent sql injections

Code:
...

$userinput = $_POST['UserInput'];
$username = mysql_escape($userinput);

$passinput = md5($_POST['PassInput']);
$password = mysql_escape($passinput);

...

$sql = "SELECT fields FROM table WHERE user='{$username}' AND pass='{$password}' ";
$result = mysql_query($sql);

...
07/23/2011 05:03 Anime Creature#41
in mysql i usually use this to prevent sql injections

Code:
...

$userinput = $_POST['UserInput'];
$username = mysql_escape($userinput);

$passinput = md5($_POST['PassInput']);
$password = mysql_escape($passinput);

...

$sql = "SELECT fields FROM table WHERE user='{$username}' AND pass='{$password}' ";
$result = mysql_query($sql);

...
07/23/2011 16:16 rattexxl#42
Hallo ich habe es geschaft es läuft und auch getestet account wird mit pw eingetragen.

Habe Port freigeschaltet und einen dienst gestartet dann hat es geklappt.

TCP 10620
UDP 10620
UDP 1434

Start - Systemsteuerung - Verwaltung - Dienste
Läuft der Dienst: SQL Server

Dort die Dienste bearbeitet das Sie automatisch und dann den Dienst gestartet.

Hoffe ich könnte helfen.
07/26/2011 00:56 Tattatsaver#43
Ok so we recently set up a zeta boards fourm and we are trying to link it to msql. If anyone has any ideas on how to do so please write back it would help out alot. Thanks
07/29/2011 08:57 TRmuratTR#44
the video narration
07/30/2011 19:23 Makenci#45
whats is wrong here

Code:
<?php 

    $host = "(local)\\SQLExpress"; // your sql instance 
    $user = "sa"; // username 
    $pw = ""; // password 
    $db = "Auth"; // db 
    $md5_key = "2011"; // your md5 key 
     
    $connect = mssql_connect($host,$user,$pw) 
    or die("Can't connect to the datebase."); 
     
    mssql_select_db($db,$connect) 
    or die("Can't select the datebase"); 

?> 

<html> 
  <head> 
    <title>Register</title> 
    <center> 
    <h3 style="color:red">Rappelz : Register Page ( Pls insert more then 4 chars ! )</h3>  
    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST"> 
      Username : <input type="text" size="20" name="username" /><br /> 
      Password : <input type="password" size="20" name="password" /><br /><br /> 
      <input type="submit" value="Register now !" name="senden" /> 
    </form> 
    <?php 
     
      $usr = $_POST['username']; 
      $pass = $_POST['password']; 
      $endPw = $md5_key . $pass; 
      $md5 = md5($endPw); 
       
      $results = mssql_query("SELECT * FROM dbo.Accounts WHERE '$usr' LIKE login_name"); 
      $res = mssql_num_rows($results); 
       
      if(strlen($usr) > 4 && strlen($pass) > 4) 
      { 
          if($res > 0) 
          { 
              echo "Account Exists !"; 
          } 
          else 
          { 
              mssql_query("INSERT INTO dbo.Accounts(login_name,password,block,withdraw_remain_time,age,auth_ok,pcbang,last_login_server_idx,event_code,result) VALUES('$usr','$md5',0,0,18,1,1,1,0,1)"); 
              echo "Registration Success !"; 
          } 
      } 
      else 
      { 
          echo "Username or Password to small..."; 
      } 
     
    ?> 
    </center> 
  </head> 
</html>


Fatal error: Call to undefined function mssql_connect() in /homepages/40/d375566371/htdocs/regi.php on line 9