Advertisement
arxcorp

ipconfirm.php

Apr 16th, 2012
54
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None
  1. <?php
  2.  
  3.  
  4. $uname = "root";
  5. $paswd = $_POST['pass1'];
  6.  
  7. if ($_POST['pass1'] !== $_POST['pass2'])
  8. {
  9. echo 'Passwords do not match click back to change <br/> <form><input type="button" value=" BACK " onclick="history.go(-1);return false;" /></form>';
  10.  
  11. }
  12.  
  13. else
  14. {
  15.  
  16. if ( pam_auth( $uname, $paswd, &$error ) ) {
  17.  
  18. echo "You are authenticated!";
  19.  
  20.  
  21.  
  22.  
  23. echo '<h2>Please confirm IP Address change</h2>';
  24. echo '<form method="post" action="ipwrite.php">';
  25.  
  26. $PASS = $_POST['pass1'];
  27. echo '<input type="hidden" name="PASS" value="' . $PASS . '" />';
  28.  
  29. $IP = $_POST['ip1'];
  30. $IP .= ".";
  31. $IP .= $_POST['ip2'];
  32. $IP .= ".";
  33. $IP .= $_POST['ip3'];
  34. $IP .= ".";
  35. $IP .= $_POST['ip4'];
  36.  
  37. echo "IP Address: $IP <br />";
  38. echo '<input type="hidden" name="IP" value="' . $IP . '" />';
  39.  
  40. $NM = $_POST['nm1'];
  41. $NM .= ".";
  42. $NM .= $_POST['nm2'];
  43. $NM .= ".";
  44. $NM .= $_POST['nm3'];
  45. $NM .= ".";
  46. $NM .= $_POST['nm4'];
  47.  
  48. echo "Netmask: $NM <br />";
  49. echo '<input type="hidden" name="NM" value="' . $NM . '" />';
  50.  
  51. $BC = $_POST['bc1'];
  52. $BC .= ".";
  53. $BC .= $_POST['bc2'];
  54. $BC .= ".";
  55. $BC .= $_POST['bc3'];
  56. $BC .= ".";
  57. $BC .= $_POST['bc4'];
  58.  
  59. echo "Broadcast: $BC <br />";
  60. echo '<input type="hidden" name="BC" value="' . $BC . '" />';
  61.  
  62. $GW = $_POST['gw1'];
  63. $GW .= ".";
  64. $GW .= $_POST['gw2'];
  65. $GW .= ".";
  66. $GW .= $_POST['gw3'];
  67. $GW .= ".";
  68. $GW .= $_POST['gw4'];
  69.  
  70. echo "Gateway: $GW <br /><br />";
  71. echo '<input type="hidden" name="GW" value="' . $GW . '" />';
  72.  
  73. echo '<input id="submit" type="submit" value="Submit" /></input>';
  74. echo '<INPUT TYPE="button" VALUE="Cancel" onClick="window.close()"></input>';
  75. echo '<input type="button" value=" BACK " onclick="history.go(-1);return false;" /></input><br />';
  76. echo '</form>';
  77.  
  78. }
  79.  
  80. }
  81.  
  82. else {
  83.  
  84. echo 'Username or password is wrong <br/> <form><input type="button" value=" BACK " onclick="history.go(-1);return false;" /></form>';
  85.  
  86.  
  87. }
  88.  
  89. ?>
Advertisement
RAW Paste Data Copied
Advertisement