Advertisement
Guest User

Untitled

a guest
May 25th, 2017
541
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.41 KB | None | 0 0
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  5. <title><?=$servername?> Register Page : </title>
  6. <link rel="icon" href="favicon.ico">
  7. <style type="text/css">
  8. </style>
  9. <style type="text/css">
  10. img { behavior: url("pngfix.htc"); }
  11. </style>
  12. </head>
  13. <?php
  14. /*
  15. This Register Page Was Written By WizKid
  16. This Anti Sql Injection Was Written By gWX0
  17. This Anti Right Click Was Written By Kyuma
  18. All Rights Reserved. Any Support Can Be Requested Via RageZone.
  19.  
  20. You'Re Allowed To Edit This Script And Modify The Template.
  21. HowEver, You Are NOT Allowed To Remove And/Or Edit Our [ Wizkid , Kyuma And gWX0 ] CopyRight.
  22.  
  23. Removing This CopyRight Will Be Your Death.
  24. */
  25.  
  26. //Edit To Fit YOUR Requirements.
  27. $servername = "Your Gunz Name Here";
  28. $accounttable = "Account";
  29. $logintable = "Login";
  30.  
  31. //Edit These Variables. If Not, No Register Page For You. (Or You'Re Fux Pro With The Same Login As Me.)
  32. $host = "Your Host Here Example --> Kyuma09\SQLEXPRESS";
  33. $user = "sa";
  34. $pass = "Your sa Account Password";
  35. $dbname = "GunzDB";
  36.  
  37. $connect = odbc_connect("Driver={SQL Server};Server={$host}; Database={$dbname}", $user, $pass) or die("Can't connect the MSSQL server.");
  38.  
  39. function antisql ( $sql ) {
  40. return ( str_replace( "'", "''", $sql ) );
  41. }
  42.  
  43. //My Favorite Function. Get The Fuck Off. (Nothing Personally :].)
  44. function gtfo($wut) {
  45. echo "<center><table width='500' cellpadding='5' cellspacing='0' border='0' style='border: 1px ;'>
  46. <tr>
  47. <td align=center width='100%' style='border-bottom: 1px solid black;'><b><?=$servername?> Register Page : </b></td>
  48. </tr>
  49. <tr>
  50. <td width='100%'><center>$wut</center></td>
  51. </tr>
  52. </table>";
  53. die();
  54. }
  55.  
  56. //Check E-Mail Function. This To Prevent Fake E-Mails. (Remember The Time YOU Doing That?)
  57. function checkemail($address) {
  58. list($local, $host) = explode("@", $address);
  59. $pattern_local = "^([0-9a-z]*([-|_]?[0-9a-z]+)*)(([-|_]?)\.([-|_]?)[0-9a-z]*([-|_]?[0-9a-z]+)+)*([-|_]?)$";
  60. $pattern_host = "^([0-9a-z]+([-]?[0-9a-z]+)*)(([-]?)\.([-]?)[0-9a-z]*([-]?[0-9a-z]+)+)*\.[a-z]{2,4}$";
  61. $match_local = eregi($pattern_local, $local);
  62. $match_host = eregi($pattern_host, $host);
  63. if($match_local && $match_host) {
  64. return 1;
  65. }
  66. else {
  67. return 0;
  68. }
  69. }
  70.  
  71. //The Num_rows() Function For ODBC Since The Default One Always Returns -1.
  72. Function num_rows(&$rid) {
  73.  
  74. //We Can Try It At Least, Right?
  75. $num= odbc_num_rows($rid);
  76. if ($num >= 0) {
  77. return $num;
  78. }
  79.  
  80. if (!odbc_fetch_row($rid, 1)) {
  81. odbc_fetch_row($rid, 0);
  82. return 0;
  83. }
  84.  
  85. if (!odbc_fetch_row($rid, 2)) {
  86. odbc_fetch_row($rid, 0);
  87. return 1;
  88. }
  89.  
  90. $lo= 2;
  91. $hi= 8192000;
  92.  
  93. while ($lo < ($hi - 1)) {
  94. $mid= (int)(($hi + $lo) / 2);
  95. if (odbc_fetch_row($rid, $mid)) {
  96. $lo= $mid;
  97. } else {
  98. $hi= $mid;
  99. }
  100. }
  101. $num= $lo;
  102. odbc_fetch_row($rid, 0);
  103. return $num;
  104. }
  105. ?>
  106. <html>
  107. <head>
  108. <title><?=$servername?> Register Page : </title>
  109. </head>
  110. <body>
  111. <center>
  112. <?php
  113. //Oh Well. Let's Create The Variable $ip To Start With.
  114. $ip = antisql($_SERVER['REMOTE_ADDR']);
  115.  
  116. /*
  117. An Extra Feature. This Is NOT Enabled Before You Remove This + The Comment Thingy's.
  118.  
  119. To Ban 1 IP It Will Be:
  120. if ($ip == "xxxxxx")
  121. {
  122. gtfo("Your IP Is BANNED!.");
  123. }
  124.  
  125. For Multiple IP's, Use This Way:
  126. if ($ip == "xxxxxx" OR $ip == "xxxxxx")
  127. {
  128. gtfo("Your IP Is BANNED!.");
  129. }
  130. */
  131.  
  132. //Get The AID Out Of The Login Table (Defined At The Top Of This File) Where LastIP Is The Visitors IP.
  133. $query1 = odbc_exec($connect,"SELECT AID FROM $logintable WHERE LastIP = '$ip'");
  134.  
  135. //UnderStable For The Real People. Editing This Without Knowledge Will Be The Death Of Your Register Page.
  136. $i=1;
  137. while (odbc_fetch_row($query1, $i)){
  138. $aid = odbc_result($query1, 'AID');
  139.  
  140. $query2 = odbc_exec($connect,"SELECT UGradeID FROM $accounttable WHERE AID = '$aid'");
  141. odbc_fetch_row($query2);
  142. $ugradeid = odbc_result($query2, 1);
  143.  
  144. if ($ugradeid == "253")
  145. {
  146. //Get The Fuck Off.
  147. gtfo("You Have One Or More Accounts Banned Here. You'Re Not Welcome Anymore.");
  148. }
  149.  
  150. $i++;
  151. }
  152.  
  153. //The Doreg Part.
  154. if (isset($_GET['act']) AND $_GET['act'] == "doreg")
  155. {
  156.  
  157. //Check For Any Shit.
  158. if (!is_numeric($_POST['age']) OR !checkemail($_POST['email']) OR empty($_POST['username']) OR empty($_POST['password']) OR empty($_POST['email']) OR empty($_POST['name']) OR empty($_POST['age']))
  159. {
  160. gtfo("You'Re Not Funny.");
  161. }
  162.  
  163. //Check If The User ID Exists Already.
  164. $query1 = odbc_exec($connect, "SELECT AID FROM $accounttable WHERE UserID = '" . antisql($_POST['username']) . "'");
  165. $count1 = num_rows($query1);
  166.  
  167. if ($count1 >= 1)
  168. {
  169. gtfo("User ID In Use.");
  170. }
  171.  
  172. //Check If The E-Mail Is In Use.
  173. $query2 = odbc_exec($connect, "SELECT AID FROM $accounttable WHERE Email = '" . antisql($_POST['email']) . "'");
  174. $count2 = num_rows($query2);
  175.  
  176. if ($count2 >= 1)
  177. {
  178. gtfo("E-Mail Address In Use.");
  179. }
  180.  
  181. //Regdate
  182. $regdate = date("Y-m-d H:i:s");
  183.  
  184. //Time For The Real Work. Editing This Will Be The End Of Your Register Page.
  185. $query3 = odbc_exec($connect, "INSERT INTO $accounttable (UserID, UGradeID, PGradeID, RegDate, Email, Age, Name) VALUES ('".antisql($_POST['username'])."', '0', '0', '$regdate', '".antisql($_POST['email'])."', '".antisql($_POST['age'])."', '".antisql($_POST['name'])."')");
  186.  
  187. $query4 = odbc_exec($connect, "SELECT AID FROM $accounttable WHERE UserID = '" . antisql($_POST['username']) . "'");
  188. odbc_fetch_row($query4);
  189. $aid = odbc_result($query4, 1);
  190.  
  191. //If No Results Comes Back. (Registration Failed.)
  192. if (!$aid)
  193. {
  194. gtfo("Something Happened. Please Report This Bug At <?=$servername?> Forums!");
  195. }
  196.  
  197. odbc_exec($connect, "INSERT INTO $logintable (UserID, AID, Password) VALUES ('".antisql($_POST['username'])."', '$aid', '".antisql($_POST['password'])."')");
  198.  
  199. //When Everything Is Done, show The User ID And The Password To The Visitor.
  200. //IF YOU WANT U CAN EDIT THE $_POST[password] AND PUT **************** FOR HIDE THE PASSWORD!.
  201. gtfo("Your <?=$servername?> Account Has Been Created. ! <br><br>
  202. Your User ID : $_POST[username]<br>
  203. Your Password : $_POST[password]<br><br>
  204. Have Fun At $servername ! ");
  205. }
  206.  
  207. //Here The Party Begins. Feel Free To Edit This.
  208. echo "<table width='350'>
  209. <form action='" . $_SERVER['PHP_SELF'] . "?act=doreg' method='POST'>
  210. <b><?=$servername?> Register Page : </b><br><br>
  211. <tr>
  212. <td width='50%'><b>Your User ID : </b></td>
  213. <td width='50%'><input type='text' name='username'></td>
  214. </tr>
  215. <tr>
  216. <td width='50%'><b>Your Password : </b></td>
  217. <td width='50%'><input type='password' name='password'></td>
  218. </tr>
  219. <tr>
  220. <td width='50%'><b>Your E-Mail : </b></td>
  221. <td width='50%'><input type='text' name='email'></td>
  222. </tr>
  223. <tr>
  224. <td width='50%'><b>Your Name : </b></td>
  225. <td width='50%'><input type='text' name='name'></td>
  226. </tr>
  227. <tr>
  228. <td width='50%'><b>Your Age : </b></td>
  229. <td width='50%'><input type='text' name='age'></td>
  230. </tr>
  231. <tr>
  232. <td width='50%'><b></b></td>
  233. <td width='50%'><input type='submit' value='Register An <?=$servername?> Account'></td>
  234. </tr>
  235. </table>";
  236. ?>
  237. <br>
  238. <!-- No You Cant Remove It. -->
  239. <font size="3">Copyright 2009~2010 WizKid , Kyuma And gWX0 - <?=$servername?> </font>
  240. <!-- See? -->
  241. </center>
  242. </body>
  243. </html></div>
  244. </select>
  245. </form>
  246. </table>
  247. </div>
  248. </body>
  249. </html>
  250. <head>
  251.  
  252. <script language="JavaScript"> <!--
  253. // No RightClick Script v.0.5
  254. // (C) 2009~2010 Kyuma
  255. // Kyuma09@hotmail.com Or kyuma@legendarygamerz.com
  256. // Don't Delete This Header!
  257.  
  258. var message="Get The Fuck Off"; // Message For The Alert Box
  259.  
  260. // Don't Edit Below!
  261.  
  262. function click(e) {
  263. if (document.all) {
  264. if (event.button == 2) {
  265. alert(message);
  266. return false;
  267. }
  268. }
  269. if (document.layers) {
  270. if (e.which == 3) {
  271. alert(message);
  272. return false;
  273. }
  274. }
  275. }
  276. if (document.layers) {
  277. document.captureEvents(Event.MOUSEDOWN);
  278. }
  279. document.onmousedown=click;
  280. // --> </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement