posts foxes to free cum site https://freecumextremist.com/foxbot
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.4 KiB

require 'httparty'
require 'http'
require 'http/request'
$instance_url = "https://freecumextremist.com"
$bearer_token = "token goes here lole"
$fox_folder = "set to absolute path for where you want to save your foxes"
def get_random_fox
url = HTTParty.get('https://foxrudor.de', {
headers: {"User-Agent" => "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.83 Safari/537.36"},
})
img_name_unparsed = url.headers
$img_name = img_name_unparsed["cat"]
File.open("#{$fox_folder}/fox_#{$img_name}", "wb") do |f|
f.write(url)
end
end
def upload_media
headers = {"Authorization": "Bearer #{$bearer_token}"}
file = File.open("#{$fox_folder}/fox_#{$img_name}")
file = HTTP::FormData::File.new(file)
body = {file: file}
response = HTTP.headers(headers).public_send(:post,
"#{$instance_url}/api/v1/media", form: body)
JSON.parse(response.body.to_s)["type"]
$id = JSON.parse(response.body)["id"]
$media = [$id]
end
def create_status
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer #{$bearer_token}"
}
body = {}
body["media_ids"] = $media
puts $id
HTTParty.post("#{$instance_url}/api/v1/statuses",
body: JSON.dump(body), headers: headers)
end
get_random_fox
upload_media
create_status