rendered paste body#!/usr/bin/rubyrequire 'rubygems'require 'net/http'require 'hpricot'class PasteBin attr_reader :file, :code def initialize(file) @file = file @code = nil end def getCode @code = File.read(@file) end def sendCode data = { :parent_pid => nil, :format => "text", :code2 => @code, :poster => nil, :paste => "Send", :expiry => "m" } @response = Net::HTTP.post_form(URI.parse('http://pastebin.com/pastebin.php'), data) end def getLink puts @response endendpaste = PasteBin.new(ARGV[0])paste.getCodepaste.sendCodepaste.getLink