daily pastebin goal
51%
SHARE
TWEET

Untitled

a guest Jun 8th, 2016 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. PHP:
  2. <html>
  3. <body>
  4. <p>Enter something here:<br>
  5. <form name="Example" action="index.php" method="post">
  6. <input type="text" name="data" style="width: 300px;">
  7. <input type="submit" value="submit">
  8. </form></center>
  9. <?php
  10. if(isset($_POST["data"])) {
  11. $mydata = $_POST["data"];
  12. $query = shell_exec("powershell -command C:\\inetpub\\ps.ps1 $mydata");
  13. echo "It worked: $query";
  14. }
  15.  
  16. ?>
  17.  
  18. Powershell:
  19.  
  20. Param (
  21.     [Parameter(Mandatory=$True)]
  22.     [string]$data
  23.     )
  24.  
  25. echo $data >> C:\inetpub\log.txt
  26. return $data
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top