как сделать SQL INJ ? PHP: include "config.php"; include "functions.php"; $connect = mysql_connect($sms_hostname, $sms_username, $sms_password) or die(mysql_error()); $select = mysql_select_db($sms_database, $connect) or die(mysql_error()); $ip = $_SERVER['REMOTE_ADDR']; $c = ($_GET['c']); $p = ($_GET['p']); $ingame = ($_GET['ingame']); if($ingame != 1){ $ingame = 0; } $page = $_SERVER['QUERY_STRING']; if($p == "atgauti"){ echo "<title>Paslaugu Grazinimas</title> <html> <head> <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\"> <meta name=\"author\" content=\"Skype = boxter7248\"> <link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\"> <style type=\"text/css\"> table.sarasas { font-size:12px; } </style> <h3 class=\"catbg\"><span class=\"left\"></span> Paslaugu Grazinimas </h3> <div class=\"windowbg\" style=\"padding: 3px;\"> <div class=\"smalltext\"> "; echo "Paslaugos susigrazinimo forma pagal savo sena <b>IP</b> (Internet Protocol),<br><b>numeri</b> (is kurio paskutini karta uzsisakete paslauga),<br><b>data</b> (kada paskutini karta pirkote paslauga).<br>"; echo "<br><table border=\"0\" class='sarasas'> <form action=\"atgauti.php\" method=\"post\"> <tr> <td> Senas IP: </td><td align=\"left\"><input type=\"text\" name=\"ip\" value=\"00.00.00.00\" maxlength=\"15\" class=\"input\"></td> </tr> <tr> <td> Numeris: </td><td align=\"left\"><input type=\"text\" name=\"nr\" value=\"37000000000\" maxlength=\"16\" class=\"input\"></td> </tr> <tr> <td> Naujas IP: <td align=\"left\"><input type=\"text\" name=\"newip\" value=\"$ip\" maxlength=\"15\" class=\"input\"></td> </tr> <tr> <td> Kada uzsisakete VIP, ADMIN..: <td align=\"left\"><input type=\"text\" name=\"date\" value=\"0000-00-00\" maxlength=\"10\" class=\"input\"></td> </tr> <table border=\"0\" align=\"\"> <tr> <td align=\"center\"> <input type=\"submit\" class=\"button\" align=\"center\" value=\"As viska teisingai uzpildziau, noriu susigrazinti paslauga\"> </td> </tr> </table> </form> </table><br><font color=red>* Viska butina teisingai uzpildyti - Kitaip neatgausi paslaugos!</font> "; }else if($p == "unban"){ echo "<title>Unban</title> <html> <head> <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\"> <meta name=\"author\" content=\"Skype = boxter7248\"> <link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\"> <h3 class=\"catbg\"><span class=\"left\"></span> Unban </h3> <div class=\"windowbg\" style=\"padding: 3px;\"> <div class=\"smalltext\"> "; $connect = mysql_connect($amxbans_hostname, $amxbans_username, $amxbans_password) or die(mysql_error()); $select = mysql_select_db($amxbans_database, $connect) or die(mysql_error()); $result = mysql_query("SELECT bid FROM amx_bans") or die(mysql_error()); $rows = mysql_num_rows($result); echo "Bans in database: <b><a href=".$amxbans_web." target = _blank>".$rows."</a></b><br> IP address - <b>".$ip."</b><br>"; $r = mysql_query("SELECT * FROM amx_bans WHERE player_ip = '$ip' LIMIT 1"); $row = mysql_fetch_array($r, MYSQL_ASSOC); if(!$row) { echo "Status: <b><span style=\"color:green\">Not banned.</span></b><br>"; } else { echo "Status: <b><span style=\"color:red\">You have been banned!</span></b><br>Reason: <b>$row[ban_reason]</b><br><br>"; $connect = mysql_connect($sms_hostname, $sms_username, $sms_password) or die(mysql_error()); $select = mysql_select_db($sms_database, $connect) or die(mysql_error()); $r = mysql_query("SELECT * FROM ebank WHERE `mod` = 'unban' LIMIT 1"); $row = mysql_fetch_array($r, MYSQL_ASSOC); $price[unban]= $row['price']/1000; echo "Unban Price: $price[unban]LTL<br><br> <form target=_blank action=\"gateway/makro/paymakro.php\" method=\"get\"> <input type=\"hidden\" name=\"orderid\" value=\"$ip\"> <input type=\"hidden\" name=\"act\" value=\"unban\"> <input type=\"hidden\" name=\"amount\" value=\"$row[price]\" /> <input type=\"submit\" value=\"Pay now!\"></form>"; } }else if($p == "specadmin"){ echo "<title>SPECADMIN order on IP</title> <html> <head> <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\"> <meta name=\"author\" content=\"Skype = boxter7248\"> <link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\"> <h3 class=\"catbg\"><span class=\"left\"></span> SPECADMIN order on IP </h3> <div class=\"windowbg\" style=\"padding: 3px;\"> <div class=\"smalltext\"> <font size=\"1\" color=\"black\">"; echo "<center> "; $r = mysql_query("SELECT * FROM sms1 WHERE `mod` = 'specadmin' ORDER BY id"); while ( $row = mysql_fetch_assoc($r) ) { echo "<a href='order.php?p=specadmin&c=".$row['country']."&ingame=$ingame'><img src='img/flags/". str_replace(" ","_", strtolower($row['country'])).".gif'/></a> "; } $r2 = mysql_query("SELECT * FROM sms1 WHERE `mod` = 'specadmin' AND `country` = '$c'"); $row2 = mysql_fetch_array($r2, MYSQL_ASSOC); $r3 = mysql_query("SELECT * FROM amx_amxadmins WHERE `username` = '$ip'"); $row3 = mysql_fetch_array($r3, MYSQL_ASSOC); if(!$row2){ if($row3){ if($row3[access] == "$vip_access"){ echo "<br><br>Your <b>VIP</b> end at <b>$row3[timeleft]</b>"; }else if($row3[access] == "$admin_access"){ echo "<br><br>Your <b>ADMIN</b> end at <b>$row3[timeleft]</b>"; }else if($row3[access] == "$specadmin_access"){ echo "<br><br>Your <b>SPECVIP</b> end at <b>$row3[timeleft]</b>"; } } echo "<br><br>Choose your country to order <b>SPECADMIN</b> on <b>IP</b>."; die; } echo "<br><b>$c</b></center>"; $price = $row2[price]/100; if($c == "Lietuva"){ echo "Apmokejimas padidinto tarifo <b>SMS</b> zinutemis</b>:<br> Siuskite zinute su tekstu: <b>$row2[keyword] $ip</b> numeriu: <b>$row2[number]</b> Kaina $price$row2[currency]/$row2[days]Dienu.<br> Kai nusiusite <b>SMS</b> zinute iskart po atsakymo <b>SPECADMIN</b> bus automatiskai aktivuotas!<br><br>"; $specadmin_900[price] = $specadmin_900[price]/100; if($ingame != "1"){ echo "<br><img src=\"img/specadmin.png\"> <b>Ka gauni budamas SPECADMIN?</b><br>"; }else{ echo "<br>"; echo "<br><img src=\"img/specadmin.png\"> <b>Ka gauni budamas SPECADMIN?</b><br>"; } }elseif($c == "Russia"){ echo "Оплата с помощью <b>СМС</b>:<br> Отправте SMS сообщение: <b>$row2[keyword] $ip</b> на номер: <b>$row2[number]</b> цена $price$row2[currency]/$row2[days]дней.<br> После получения ответного <b>СМС</b> сообщения <b>SPECADMIN</b> будет активирован!"; if($ingame != "1"){ $r = mysql_query("SELECT * FROM ebank WHERE `mod` = 'specadmin' ORDER BY price"); echo "<br><br>Оплата через индивидуалные платежные системы:<br> Выберети <b>SPECADMIN</b> продолжительность: <form action=\"gateway/makro/paymakro.php\" method=\"get\">"; echo "<select name=\"amount\"> "; while($row=mysql_fetch_assoc($r)) { $price = $row['price']/100; echo ' <option value="'.$row['price'].'">'.$row['days'].' дней. - '.$price.' LTL</option>'; } echo "</select>"; echo "<input type=\"hidden\" name=\"orderid\" value=\"$ip\"> <input type=\"hidden\" name=\"act\" value=\"specadmin\"> <input type=\"submit\" value=\"Начать оплату\"></form>"; }else{ echo "<br>"; } echo "<br><img src=\"img/specadmin.png\"> <b>Что я получу став SPECADMIN'ом?</b><br>"; }else{ echo "Payment using <b>SMS</b>:<br> Send messages with text: <b>$row2[keyword] $ip</b> to number: <b>$row2[number]</b> Price $price$row2[currency]/$row2[days]Days.<br> When uploading <b>SMS</b> messages immediately after the response <b>SPECADMIN</b> will be automatically activated!<br>"; if($ingame != "1"){ $r = mysql_query("SELECT * FROM ebank WHERE `mod` = 'specadmin' ORDER BY price"); echo "<br><img src=\"img/specadmin.png\"> <b>What you get as a SPECADMIN?</b><br>"; }else{ echo "<br>"; echo "<br><img src=\"img/specadmin.png\"> <b>What you get as a SPECADMIN?</b><br>"; } } if($c == "Lietuva"){ echo $specadmin_web_access_lt; }elseif($c == "Russia"){ echo $specadmin_web_access_ru; }else{ echo $specadmin_web_access; }
script.php?p=specadmin&c=1'+union+select+1,2,over doxya,4--+ Про овер дохуя колонок - это сколько их там в таблице sms1, я хз. В какой колонке будет вывод хз, но ищи гдето в исходнике, в ссылке. Ну и почитай про иньекции в MySQL, ибо чуствую не поймешь нифига.