Guest User

Untitled

a guest
Oct 29th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. <form action=""method="post">
  2. Username:<br><input type="text" name="user" size="20" tabindex="1">
  3. Password:<br><input type="password" name="password" size="20" tabindex="2">
  4. <!-- -->
  5. <select name="ValueName" size="32" tabindex="3">
  6. <option value="MyValue1">ValueExample1</option>
  7. <option value="MyValue2">ValueExample2</option>
  8. <!-- -->
  9. <button type="submit" style="text-align: left; width:170px; height:25px;
  10. float:left; " name="test">Test1</button>
  11. <button type="submit" style="text-align: left; width:170px; height:25px;
  12. float:left; " name="test2">Test2</button>
  13. <!-- Php Section -->
  14. <?php
  15. $user = $_POST['user'];
  16. $password = $_POST['password'];
  17. $ValueName = $_POST['ValueName'];
  18. $test = $_POST['Test'];
  19. $test2 = $_POST['Test2'];
  20.  
  21. if (isset($_POST['test']))
  22. $cmd = "/usr/bin/curl -k --user $user:$password https://IPADDRESS/DIR1/$ValueName";
  23. if (isset($_POST['test2']))
  24. $cmd = "/usr/bin/curl -k --user $user:$password https://IPADDRESS/DIR2/$ValueName";
  25.  
  26. while (@ ob_end_flush()); // end all output buffers if any
  27.  
  28. $proc = popen($cmd, 'r');
  29. echo '<pre>';
  30. while (!feof($proc))
  31. {
  32. echo fread($proc, 4096);
  33. @ flush();
  34. }
  35. echo '</pre>';
  36. ?>
  37.  
  38. <select name="ValueName2" size="32" tabindex="3">
  39. <option value="MyValue1">ValueExample1</option>
  40. <option value="MyValue2">ValueExample2</option>
  41.  
  42. $ValueName2 = $_POST['ValueName2'];
  43.  
  44. if (isset($_POST['test2']))
  45. $cmd = "/usr/bin/curl -k --user $user:$password https://IPADDRESS/DIR2/$ValueName2";
Add Comment
Please, Sign In to add comment