h8rt3rmin8r

wp-exploit.php

Oct 19th, 2018
178
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. // get twitter.com/2600, and store it in $output
  3. $ch = curl_init();
  4. curl_setopt($ch, CURLOPT_URL, 'http://twitter.com/2600');
  5. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  6. curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)');
  7. $output = curl_exec($ch);
  8. curl_close($ch);
  9. // search through $output for the latest tweet
  10. $start_string = '<span class="entry-content">';
  11. $start = strpos($output, $start_string, 0) + strlen($start_string);
  12. $end = strpos($output, '</span>', $start);
  13. $tweet = substr($output, $start, $end-$start);
  14. // display this tweet to the screen
  15. echo(trim($tweet)."\n");
  16. ?>
RAW Paste Data