Devopeleres Posted May 30, 2013 Share Posted May 30, 2013 BİR KAYIT OL SİSTEMİ VAR BÜGÜN BOTLAR TARAFINDAN 1600 KİŞİ ÜYE OLMUŞ VERİTABANI ŞİŞMİŞ BUNU ENGELLEMEM İÇİN CAPTCHA GÜVENLİK LAZIM EKLEMEYE ÇALIŞTIM EKLEYEMEDİM YARDIMCI OLUCAK ARKADAŞLAR EKLEYEYİP VEREBİLİRMİ <?php session_start(); error_reporting(0); include "config.php"; $ad=mysql_real_escape_string(htmlspecialchars($_POST['ad'])); $soyad=mysql_real_escape_string(htmlspecialchars($_POST['soyad'])); $sifre=mysql_real_escape_string(htmlspecialchars($_POST['sifre'])); $mail=mysql_real_escape_string(htmlspecialchars($_POST['mail'])); $tel=mysql_real_escape_string(htmlspecialchars($_POST['tel'])); if($ad && $soyad && $tel && $mail && $sifre){ $dogrula = mysql_result(mysql_query("SELECT count(id) AS toplam FROM uyeler WHERE mail='$mail'"), 0, 'toplam'); if ($dogrula == 0) { mysql_query("INSERT INTO uyeler (ad, soyad, sifre, mail, tel) VALUES ('$ad', '$soyad', '$sifre', '$mail', '$tel')"); echo'<script>alert("Kayit isleminiz tamamlanmistir. Giris yapabilirsiniz..."); location.href="login.php";</script>'; }else{ echo '<script>alert("Daha Once bu mail ismiyle yada maille kayit olunmus...");</script>'; } } ?> <!doctype html> <html> <link REL="SHORTCUT ICON" HREF="img/favicon.ico"> <head> <title><?php echo $title; ?></title> <meta charset="utf8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- Bootstrap --> <link rel="stylesheet" href="css/bootstrap.min.css"> <!-- Bootstrap responsive --> <link rel="stylesheet" href="css/bootstrap-responsive.min.css"> <!-- Theme CSS --> <!--[if !IE]> --> <link rel="stylesheet" href="css/style.css"> <!-- <![endif]--> <!--[if IE]> <link rel="stylesheet" href="css/style_ie.css"> <![endif]--> <!-- jQuery --> <script src="js/jquery.min.js"></script> <!-- Bootstrap --> <script src="js/bootstrap.min.js"></script> <!-- Just for demonstration --> <script src="js/demonstration.min.js"></script> <!-- Theme scripts --> <script src="js/application.min.js"></script> </head> <body class='login-body'> <div class="login-wrap"> <h2>Facebegen.com</h2> <h2>KAYIT OL</h2> <div class="login"> <form action="" method="POST"> <input type="text" name="mail" placeholder="Email" class='input-block-level'> <input type="password" name="sifre" placeholder="Password" class='input-block-level'> <input type="text" name="tel" placeholder="Telefon" class='input-block-level'> <input type="text" name="ad" placeholder="Ad" class='input-block-level'> <input type="text" name="soyad" placeholder="Soyad" class='input-block-level'> <button type="submit" value="Sign In" class='button button-basic-darkblue btn-block'>Kayıt Ol</button> </form> </div> <a href="login.php?sayfa=lostPassword" class='pw-link'>Şifrenizi mi <span>Unuttunuz</span>? <i class="icon-arrow-right"></i></a> </div> </body> </html> Quote Link to comment Share on other sites More sharing options...
KintaRo Posted May 30, 2013 Share Posted May 30, 2013 küçük bir sistem yazabiliriz zamanınız varsa fakat mesajınızı düzenleyin, tamamı büyük harflerden oluşan mesajlar yasak. Quote Link to comment Share on other sites More sharing options...
weyso Posted May 30, 2013 Share Posted May 30, 2013 http://www.prototurk.com/article/php-guvenlik-kodu-uygulamasi/54 burda detaylı anlatımı var Quote Link to comment Share on other sites More sharing options...
KintaRo Posted May 30, 2013 Share Posted May 30, 2013 Bir çalışma yaptım, umarım işinize yarar: Not: stil dosyaları olmadığı için biçimsiz olabilir, siz düzenlersiniz. Kodlar: [spoiler] <?php session_start(); error_reporting(0); include "config.php"; $ad=mysql_real_escape_string(htmlspecialchars($_POST['ad'])); $soyad=mysql_real_escape_string(htmlspecialchars($_POST['soyad'])); $sifre=mysql_real_escape_string(htmlspecialchars($_POST['sifre'])); $mail=mysql_real_escape_string(htmlspecialchars($_POST['mail'])); $tel=mysql_real_escape_string(htmlspecialchars($_POST['tel'])); $dogrulama = mysql_real_escape_string(htmlspecialchars($_POST['dogrulama'])); $kontrol = mysql_real_escape_string(htmlspecialchars($_POST['kontrol'])); if($ad && $soyad && $tel && $mail && $sifre && $kontrol) { if ($kontrol == $dogrulama) { $dogrula = mysql_result(mysql_query("SELECT count(id) AS toplam FROM uyeler WHERE mail='$mail'"), 0, 'toplam'); if ($dogrula == 0) { mysql_query("INSERT INTO uyeler (ad, soyad, sifre, mail, tel) VALUES ('$ad', '$soyad', '$sifre', '$mail', '$tel')"); echo'<script>alert("Kayit isleminiz tamamlanmistir. Giris yapabilirsiniz..."); location.href="login.php";</script>'; } else { echo '<script>alert("Daha Once bu mail ismiyle yada maille kayit olunmus...");</script>'; } } else { echo'<script>alert("Doğrulama kodunu yanlış girdiniz!");</script>'; } } ?> <!doctype html> <html> <link REL="SHORTCUT ICON" HREF="img/favicon.ico"> <head> <title><?php echo $title; ?></title> <meta charset="utf8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- Bootstrap --> <link rel="stylesheet" href="css/bootstrap.min.css"> <!-- Bootstrap responsive --> <link rel="stylesheet" href="css/bootstrap-responsive.min.css"> <!-- Theme CSS --> <!--[if !IE]> --> <link rel="stylesheet" href="css/style.css"> <!-- <![endif]--> <!--[if IE]> <link rel="stylesheet" href="css/style_ie.css"> <![endif]--> <!-- jQuery --> <script src="js/jquery.min.js"></script> <!-- Bootstrap --> <script src="js/bootstrap.min.js"></script> <!-- Just for demonstration --> <script src="js/demonstration.min.js"></script> <!-- Theme scripts --> <script src="js/application.min.js"></script> </head> <body class='login-body'> <div class="login-wrap"> <h2>Facebegen.com</h2> <h2>KAYIT OL</h2> <div class="login"> <?php $rand1 = rand(0, 9); $rand2 = rand(0, 9); $rand3 = rand(0, 9); $rand4 = rand(0, 9); $rand5 = rand(0, 9); $rand6 = rand(0, 9); $kontrol = $rand1 . $rand2 . $rand3 . $rand4 . $rand5 . $rand6; ?> <form action="" method="POST"> <input type="text" name="mail" placeholder="Email" class='input-block-level'> <input type="password" name="sifre" placeholder="Password" class='input-block-level'> <input type="text" name="tel" placeholder="Telefon" class='input-block-level'> <input type="text" name="ad" placeholder="Ad" class='input-block-level'> <input type="text" name="soyad" placeholder="Soyad" class='input-block-level'> <label for="male">Doğrulama: </label> <?php echo "<img src=\"captcha/$rand1.png\" /><img src=\"captcha/$rand2.png\" /><img src=\"captcha/$rand3.png\" /><img src=\"captcha/$rand4.png\" /><img src=\"captcha/$rand5.png\" /><img src=\"captcha/$rand6.png\" />"; ?> <input type="hidden" name="dogrulama" value="<?php echo $kontrol; ?>"> <input type="text" name="kontrol" placeholder="Dogrulama kodunu girin" class='input-block-level'> <button type="submit" value="Sign In" class='button button-basic-darkblue btn-block'>Kayıt Ol</button> </form> </div> <a href="login.php?sayfa=lostPassword" class='pw-link'>Şifrenizi mi <span>Unuttunuz</span>? <i class="icon-arrow-right"></i></a> </div> </body> </html> [/spoiler] Dosyalar: https://www.sugarsync.com/pf/D1846013_160_667511063 Quote Link to comment Share on other sites More sharing options...
KintaRo Posted May 30, 2013 Share Posted May 30, 2013 http://www.prototurk.com/article/php-guvenlik-kodu-uygulamasi/54 burda detaylı anlatımı var Buradaki örneği inceledim, çok profosyonel bir çalışma olmuş, bence benimkini değil bu örnektekini kullanmalısın, çünkü sağlam yazılmış bir bot benim kodları aşabilir, basit bir sistem çünkü. ama normal botları savuşturacaktır :) Quote Link to comment Share on other sites More sharing options...
Devopeleres Posted May 30, 2013 Author Share Posted May 30, 2013 (edited) Ellerinize sağlık çok teşekkür ederim weyso, KintaRo Edited May 30, 2013 by Devopeleres Quote Link to comment Share on other sites More sharing options...
KintaRo Posted May 30, 2013 Share Posted May 30, 2013 sen üşengeç olabilirsin ama ben hiç üşenmem uyarıyı veririm. hayırlı olsun. Ayrıca ben üşenmeden sana kod yazıyorum ama sen ufak bir düzenlemeden kaçıyorsun çoh güzel. Quote Link to comment Share on other sites More sharing options...
blackman12 Posted May 30, 2013 Share Posted May 30, 2013 Ben daha önce bir örnek olsun diye yazmıştım fonksiyon şeklinde yarın buraya upload ederim. Quote Link to comment Share on other sites More sharing options...
Devopeleres Posted May 31, 2013 Author Share Posted May 31, 2013 blackman12 KintaRo arkadaşımız yardımcı oldu genede teşekkürler Quote Link to comment Share on other sites More sharing options...
blackman12 Posted May 31, 2013 Share Posted May 31, 2013 Unutmuşum ben bu konuyu. Sen işini halletmiş olsan da belki başka birinin işine yarar. Kendim deneme amaçlı yazmıştım, doğrulama kodunun büyüklüğünü ve zorluk seviyesini ayarlayabiliyorsunuz: http://www.mediafire.com/?dn88aybkb8jwnn3 Quote Link to comment Share on other sites More sharing options...
Devopeleres Posted May 31, 2013 Author Share Posted May 31, 2013 Hocam eline sağlık denedim fakat zorluk seviyesini 99999 yaptım ftp ye attım açtım chrome den öğeyi denetle dedim zorluk seviyesini 99999 iken seviye 1 yaptım kodlar goruktu 5 seviye yapsakta chromeden öğeyi denetleden 1 yapabilirler Quote Link to comment Share on other sites More sharing options...
blackman12 Posted May 31, 2013 Share Posted May 31, 2013 99999 diye bişey yok maximum seviyeden büyükse maximum seviyeyi baz alır. ayrıca öğeyi denetle diyerek değiştirmeleri pek bir mana içermiyor sadece çizgi sayısı azalıyor captcha yine oluşturuluyor ki bu bile bi botun yapabilecei bişey değil. ve dahası... seviye parametresi zorunlu bi parametre değil eğer resmi default çağırırsan seviye parametresinden haberdar olamaz kullanıcı ;) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.