Advertisement
Burkino

Discord webhook bypass

Mar 7th, 2018
316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. <?php
  2. $inputJSON = file_get_contents('php://input');
  3. $input = json_decode($inputJSON, TRUE);
  4.  
  5. $data = array("content" => $input["content"]);
  6. $data_string = json_encode($data);
  7.  
  8. $ch = curl_init($input["webhook"]);
  9. curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
  10. curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
  11. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  12. curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  13. 'Content-Type: application/json',
  14. 'Content-Length: ' . strlen($data_string))
  15. );
  16.  
  17. $result = curl_exec($ch);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement