Advertisement
Guest User

Untitled

a guest
May 25th, 2017
538
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.95 KB | None | 0 0
  1. <!doctype html>
  2. <html lang="tr">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  6. <meta name="description" content="İnternete çıkabilmeniz için kimliğinizi doğrulamanız gerek web sayfasını görüyorsunuz.">
  7. <meta name="author" content="ACTSPOT">
  8. <title>ACTSPOT PORTAL</title>
  9. <!-- Bootstrap Core CSS -->
  10. <link href="captiveportal-bootstrap.css" rel="stylesheet">
  11. </head>
  12. <body>
  13. <nav class="navbar navbar-default navbar-fixed-top">
  14. <div class="container">
  15. <div class="navbar-header">
  16. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
  17. <span class="sr-only">Toggle navigation</span>
  18. <span class="icon-bar"></span>
  19. <span class="icon-bar"></span>
  20. <span class="icon-bar"></span>
  21. </button>
  22. <a class="navbar-brand" href="#">ACTSPOT</a>
  23. </div>
  24. <div id="navbar" class="navbar-collapse collapse">
  25.  
  26.  
  27. </div><!--/.nav-collapse -->
  28. </div>
  29. </nav>
  30. <div class="container">
  31. <div id="loginbox" style="margin-top:150px; " class="mainbox col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2">
  32.  
  33. <div class="panel panel-default" >
  34. <div class="panel-heading">
  35. <div class="panel-title">Kaydol</div>
  36. <div style="float:right; font-size: 80%; position: relative; top:-10px"></div>
  37. </div>
  38.  
  39. <div style="padding-top:30px" class="panel-body" >
  40.  
  41. <div style="display:none" id="login-alert" class="alert alert-danger col-sm-12"></div>
  42.  
  43.  
  44.  
  45. <form class="form-horizontal" >
  46.  
  47. <div style="margin-bottom: 25px" class="input-group">
  48.  
  49.  
  50.  
  51. <?php
  52. // Vira bismillah
  53. // Bu satırların silinmemesi rica olunur.
  54. // Bu satırlar kendi gereksinimimden dolayı yazılmıştır..
  55. // Ali Tellioğlu <alicantellioglu@gmail.com>
  56. // Makinemuh.com
  57. // radiusun kullandıgı veritabaniyle aynı veri tabanını kullanmalısınız standart tablolar kullanılıyor
  58. // radacct radusergroup radgroupcheck gibi gibi
  59. // radius da read group aktif olmalı radusergroup tablosunu okuycak sekilde ayarlanmalı
  60. // Alitelli <alicantellioglu@gmail.com>
  61. // !! bu satırları kullanırken tüm sorumlulugun size ait oldugunu unutmayın lütfen !!
  62.  
  63. include ('captiveportal-db.php');
  64. $cekiyorum= $db->query("SELECT * FROM settings order by id DESC LIMIT 1")->fetch(PDO::FETCH_ASSOC);
  65. $gurup=$cekiyorum['dgroup'];
  66. if (empty($gurup)){
  67. echo "Şuan için kayıt olmak mümkün değil çünkü yönetici henüz bu işlemi aktifleştirmedi.";
  68. echo "Eğer bu portalın yöneticisi iseniz tc kimlik kullanıcıları için bir grup oluşturun ve ayarlar sekmesinde bu grubu tc kimlik grubu olarak seçin.";
  69.  
  70. die;}// Ali Tellioğlu <alicantellioglu@gmail.com>
  71.  
  72. $tc_no = $_POST["tc"];
  73. $ad = $_POST["ad"];
  74. $soyad = $_POST["soyad"];
  75. $dogum_yili = $_POST["dogum"];
  76. $pass = $_POST["sifre"];
  77. $tel = $_POST["tel"];
  78.  
  79. function boyleduzelt($s) {
  80. $tr = array('ş','Ş','ı','I','İ','ğ','Ğ','ü','Ü','ö','Ö','Ç','ç','(',')','/',':',',');
  81. $eng = array('s','s','i','i','i','g','g','u','u','o','o','c','c','','','-','-','');
  82. $s = str_replace($tr,$eng,$s);
  83. $s = strtolower($s);
  84. $s = preg_replace('/&amp;amp;amp;amp;amp;amp;amp;amp;amp;.+?;/', '', $s);
  85. $s = preg_replace('/\s+/', '-', $s);
  86. $s = preg_replace('|-+|', '-', $s);
  87. $s = preg_replace('/#/', '', $s);
  88. $s = str_replace('.', '', $s);
  89. $s = trim($s, '-');
  90. return $s;
  91. }// Ali Tellioğlu <alicantellioglu@gmail.com>
  92.  
  93. function karistir( $length ) {
  94.  
  95. $chars = "0123456789";
  96. return substr(str_shuffle($chars),0,$length);
  97.  
  98. }// Ali Tellioğlu <alicantellioglu@gmail.com>
  99.  
  100. function tcno_dogrula($bilgiler){
  101.  
  102. $gonder = '<?xml version="1.0" encoding="utf-8"?>
  103. <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  104. <soap:Body>
  105. <TCKimlikNoDogrula xmlns="http://tckimlik.nvi.gov.tr/WS">
  106. <TCKimlikNo>'.$bilgiler["tcno"].'</TCKimlikNo>
  107. <Ad>'.$bilgiler["isim"].'</Ad>
  108. <Soyad>'.$bilgiler["soyisim"].'</Soyad>
  109. <DogumYili>'.$bilgiler["dogumyili"].'</DogumYili>
  110. </TCKimlikNoDogrula>
  111. </soap:Body>
  112. </soap:Envelope>';
  113.  
  114. $ch = curl_init();
  115. curl_setopt($ch, CURLOPT_URL, "https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx" );
  116. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true );
  117. curl_setopt($ch, CURLOPT_POST, true );
  118. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  119. curl_setopt($ch, CURLOPT_HEADER, FALSE);
  120. curl_setopt($ch, CURLOPT_POSTFIELDS, $gonder);
  121. curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  122. 'POST /Service/KPSPublic.asmx HTTP/1.1',
  123. 'Host: tckimlik.nvi.gov.tr',
  124. 'Content-Type: text/xml; charset=utf-8',
  125. 'SOAPAction: "http://tckimlik.nvi.gov.tr/WS/TCKimlikNoDogrula"',
  126. 'Content-Length: '.strlen($gonder)
  127. ));
  128. $gelen = curl_exec($ch);
  129. curl_close($ch);
  130.  
  131. return strip_tags($gelen);// Ali Tellioğlu <alicantellioglu@gmail.com>
  132. }
  133.  
  134. $bilgiler = array(
  135. "tcno" => $tc_no,
  136. "isim" => $ad,
  137. "soyisim" => $soyad,
  138. "dogumyili" => $dogum_yili
  139. );
  140.  
  141. $sonuc = tcno_dogrula($bilgiler);// Ali Tellioğlu <alicantellioglu@gmail.com>
  142. $gel1= $db->prepare("SELECT * FROM radcheck WHERE attribute = 'Cleartext-Password'");
  143. $gel1->execute();
  144. while ($listele1 = $gel1->fetch(PDO::FETCH_ASSOC)) {
  145. $ktc = $listele1['tcno']; }
  146. // Ali Tellioğlu <alicantellioglu@gmail.com>
  147.  
  148.  
  149. if($ktc!=$tc_no){
  150.  
  151. if($sonuc=="true"){
  152. $user = substr(boyleduzelt($ad),0,1).boyleduzelt($soyad).karistir(2);
  153. // Alitelli <alicantellioglu@gmail.com>
  154.  
  155. if($onayistensinmi=="hayir"){
  156.  
  157. $add = $db->exec("INSERT INTO radcheck (username,attribute,op,value,adsoyad,tcno,groupname,dogum,tel,onay) VALUES ('$user','Cleartext-Password', ':=', '$pass', '$ad', '$tc_no', '$gurup', '$dogum_yili', '$tel', 'evet')");
  158. $add2 = $db->exec("INSERT INTO radusergroup (username,groupname) VALUES ('$user','$gurup')");
  159.  
  160. echo "
  161.  
  162.  
  163.  
  164. <input type='text' class='form-control' value='Kullanıcı Adı: $user' >
  165. </div>
  166. <div style='margin-bottom: 25px' class='input-group'>
  167.  
  168. <input type='text' class='form-control' value='Şifre: $pass' > </div>";
  169.  
  170. }
  171. elseif($onayistensinmi=="evet"){
  172.  
  173. $add3 = $db->exec("INSERT INTO radcheck (username,attribute,op,value,adsoyad,tcno,groupname,dogum,tel,onay) VALUES ('$user','onaysiz', ':=', '$pass', '$ad', '$tc_no', '$gurup', '$dogum_yili', '$tel', 'hayir')");
  174. $add4 = $db->exec("INSERT INTO radusergroup (username,groupname) VALUES ('$user','$gurup')");
  175. echo "
  176. <div class='alert alert-warning' role='alert'>
  177. <strong>Uyarı!</strong> Başarıyla üye oldunuz fakat üyeliğiniz henüz yönetici tarafından onaylanmadı.
  178. </div>
  179.  
  180. <input type='text' class='form-control' value='Kullanıcı Adı: $user' >
  181. </div>
  182. <div style='margin-bottom: 25px' class='input-group'>
  183.  
  184. <input type='text' class='form-control' value='Şifre: $pass' > </div>";
  185. }else{}
  186.  
  187.  
  188. }
  189. else{
  190. echo "Doğrulama başarısız";
  191. echo '<meta http-equiv="refresh" content="5;URL=captiveportal-kayit.html">';}// Ali Tellioğlu <alicantellioglu@gmail.com>
  192. }else{echo " Bu tc kimlik numarası kullanımda ";die;} // Ali Tellioğlu <alicantellioglu@gmail.com>
  193. ?>
  194.  
  195.  
  196.  
  197.  
  198. <div class="col-sm-12 controls">
  199. </div>
  200. <div style="margin-top:10px" class="form-group">
  201.  
  202.  
  203. </div></form>
  204.  
  205. <div class="col-md-12 control">
  206. <div style="border-top: 1px solid#888; padding-top:15px; font-size:85%" >
  207. Kullanıcı adınızı ve şifrenizi not edin
  208. <a href="http://makinemuh.com" >
  209. Burdan giriş yapın
  210. </a>
  211. </div>
  212. </div>
  213. </div>
  214.  
  215.  
  216. </div>
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225. </div>
  226. </div>
  227.  
  228. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement