require 'xmlrpc/client' require 'net/http' require 'tk' ### lj_wh0re.rb ver 0.2 by dirtyfilthy ### ### FOR INFORMATION & RESEARCH PURPOSES ONLY - ALL USE AT OWN RISK & RESPONSIBILITY ### d0NUT aTT1K m3 LJ aBU$3 - 4 eY3 yAM 0LD & w33K !!!! ### ### Warning: use of this softwarez may have unintended effects and ### consequences. I do not think it violates the livejournal TOS, but ### I could ( and have known to be ) completely wrong. Use of this softwarez ### WILL severely fuck up your friends list ### ### Usage: ### ### just run the bitch $lj_user="dirtyfilthy" # change this to your lj username $lj_pass="notmyrealpassword" # change this to your lj password $whitelist=["dirtyfilthy","sable_debutante"] # list of users to always add ## ## various functions for manipulating friends lists ## def self.get_friends_of request=Hash.new request["username"]=$lj_user request["password"]=$lj_pass server = XMLRPC::Client.new2("http://www.livejournal.com/interface/xmlrpc") result = server.call("LJ.XMLRPC.friendof",request) return result["friendofs"].map {|x| x["username"]} end def self.get_friends request=Hash.new request["username"]=$lj_user request["password"]=$lj_pass server = XMLRPC::Client.new2("http://www.livejournal.com/interface/xmlrpc") result = server.call("LJ.XMLRPC.getfriends",request) return result["friends"].map {|x| x["username"]} end def self.add_friends(friends) request=Hash.new request["username"]=$lj_user request["password"]=$lj_pass request["add"]=friends.map {|x| {"username"=>x} } server = XMLRPC::Client.new2("http://www.livejournal.com/interface/xmlrpc") result = server.call("LJ.XMLRPC.editfriends",request) end def self.delete_friends(friends) request=Hash.new friends=friends.map { |x| x.to_s } request["username"]=$lj_user request["password"]=$lj_pass request["delete"]=friends server = XMLRPC::Client.new2("http://www.livejournal.com/interface/xmlrpc") result = server.call("LJ.XMLRPC.editfriends",request) end # get a list of people to add from the latest post feed def self.get_new_friends html=Net::HTTP.get("www.livejournal.com","/stats/latest-rss.bml") new_friends=html.scan(/urn:livejournal.com:entry:(.*):\d+/) new_friends=new_friends.map{|f| f.to_s}.uniq return new_friends end ### ### GO! GO! GO! ### def the_world_is_yours while true print_tk "Beginning wh0re cycle..." ## synchronize friends list to only mutual friends print_tk "Deleting people who unfriended us..." friends=get_friends friends_of=get_friends_of to_delete=friends-friends_of delete_friends(to_delete-$whitelist) print_tk "Currently we have #{friends_of.size} friend of..." print_tk "Adding anyone who had added us..." begin add_friends(friends_of+$whitelist) rescue Exception # can't be assed handling exceptions properly, an unfortunate trend end # get a bunch of new friends num_to_add=740 while num_to_add>10 friends=get_friends num_to_add=740-friends.size num_to_add=0 if num_to_add<0 print_tk "Attempting to add #{num_to_add} of new friends..." begin new_friends=get_new_friends[0..num_to_add]-friends print_tk "Adding our new pals #{new_friends.join(" ")} ..." add_friends(new_friends) rescue Exception end print_tk "Sleeping for two minutes..." sleep 120 end print_tk "FINISHED WHORE-CYCLE! Waiting one hour\n\n\n" sleep 3600 # do nothing for an hour, changing this to a lower value may # severely piss off livejournal, not recommended end end def gogogo $lj_user=$user_v.value.strip $lj_pass=$pass_v.value.strip # attempt login $button.configure("state"=>"disabled") print_tk "Let's get pimpin!" print_tk "Attempting login with username #{$lj_user}" begin get_friends rescue Exception print_tk "Unable to login !!!" print_tk $! $button.configure("state"=>"normal") return true end the_world_is_yours end def print_tk(text="") $status.insert("end","#{Time.now} #{text}\n") $status.yview('moveto', 1.0) end start_whoring=Proc.new {Thread.new{gogogo}} $user_v=TkVariable.new $pass_v=TkVariable.new root = TkRoot.new() { title "lj_wh0re ver 0.2" } top = TkFrame.new(root) ph = { 'padx' => 10, 'pady' => 10 } TkLabel.new(top) {text 'Enter username:' ; pack(ph) } username_e = TkEntry.new(top, 'textvariable' => $user_v) username_e.pack(ph) TkLabel.new(top) {text 'Enter password:' ; pack(ph) } password_e = TkEntry.new(top, 'textvariable' => $pass_v, 'show'=>'*') password_e.pack(ph) top.pack('fill'=>'both', 'side' =>'top') $status=TkText.new(top) $scroll_bar = TkScrollbar.new(top) $scroll_bar.pack('side' => 'left', 'fill' => 'y') $status.yscrollbar($scroll_bar) $status.pack('side'=>'left') print_tk "lj_wh0re ver 0.2 by dirtyfilthy" print_tk print_tk "EULA:" print_tk "By using this software you hereby transfer all ownership of your immaterial soul to LUCIFER, INFERNAL PRINCE OF THE NINE RINGS OF HELL, YOUR NEW LORD AND MASTER" print_tk "HAIL SATAN!" print_tk "HAIL SATAN!" print_tk "DARK BRETHERN, OUR SATANIC DAYCARE CENTERS WILL RUN RED WITH THE BLOOD OF MUTILATED FARM ANIMALS" print_tk "ROCK & ROLL D3WDZ !!!" $button = TkButton.new(root) { text "Make me popular!"; command start_whoring; } $button.pack("side"=>"right") Tk.mainloop