Advertisement
Guest User

Untitled

a guest
Jun 8th, 2016
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. PHP:
  2. <html>
  3. <body>
  4. <p>Enter something here:<br>
  5. <form name="Example" action="index_base64.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 = base64_encode ($_POST["data"]);
  12. $query = shell_exec("powershell -command C:\\inetpub\\ps_base64.ps1 $mydata");
  13. echo "It worked: $query";
  14. }
  15.  
  16. ?>
  17.  
  18. Powershell:
  19. Param (
  20. [Parameter(Mandatory=$True)]
  21. [string]$data
  22. )
  23. $value = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($data))
  24. echo $value >> C:\inetpub\log.txt
  25. return $value
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement