From 9fb46b7d14217168763f125c9b2adbe96a201c78 Mon Sep 17 00:00:00 2001 From: Joe Rayhawk Date: Sat, 17 Dec 2016 16:51:49 -0800 Subject: apb/ffbans.rb: new --- apb/ffbans.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 apb/ffbans.rb (limited to 'apb/ffbans.rb') diff --git a/apb/ffbans.rb b/apb/ffbans.rb new file mode 100755 index 0000000..c935d7f --- /dev/null +++ b/apb/ffbans.rb @@ -0,0 +1,15 @@ +#!/usr/bin/ruby + +require 'json' +require 'net/http' + +game = String.new + +http = Net::HTTP.new('ffbans.org', 443) +http.use_ssl = true +#http.verify_mode = OpenSSL::SSL::VERIFY_NONE + +response = JSON.parse(http.request(Net::HTTP::Get.new("/data.php?op=all")).body) +for ban in response + printf( "%-19s %-7s %3s %-20s\n", ban['Timestamp'], ban['Server'].to_s, ban['Rating'].to_s, ban['Name'] ) +end -- cgit v1.2.3