UndercodeTesting

UTC

Oct 14th, 2020
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. <?php
  2. if (!isset($_POST["send"]))
  3. {
  4. ?>
  5. <form method="POST" action="<?php echo $_SERVER['PHP_SELF '];?>">
  6. From: <input type="text" name="sender">
  7. Subject: <input type="text" name="subject">
  8. Message:
  9. <textarea name="message" rows="10 "cols="60" lines="20"></textarea>
  10. <input type="submit" name="send" value="Send">
  11. </form>
  12. <?php
  13. }
  14. else
  15. {
  16. // the form has been submitted
  17. $from=$_POST['sender'];
  18. // send mail:
  19. if (mail($to,$_POST['subject'],$_POST['message'] ,"From: $fromn"))
  20. {
  21. echo "Your mail has been sent successfully";
  22. }
  23. else
  24. {
  25. echo "An error has been occured !";
  26. }
  27. }
  28. ?> The
  29. preceding code will be used for demonstration purposes and to explain our attack principles. We divide the previous code into three parts:
  30.  
  31.  
Advertisement
Add Comment
Please, Sign In to add comment