F
Flemming Munk jensen
This script will GET the page i request when i call it from dos-prompt
like this "ruby nukeuser.rb 1"
--------------------------------------------------
require 'uri'
require 'net/https'
user_id = ARGV[0].strip
url = "https://<ip
address>/services_captiveportal_users.php?act=del&id=" + user_id
url1 = URI.parse(url)
http = Net::HTTP.new(url1.host, url1.port)
http.use_ssl = true
# Do not warn us about certificate - blithely accept whatever
certificate we receive!
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
req = Net::HTTP::Get.new(url1.path)
req.basic_auth 'username', 'password'
res = http.start do |h|
h.request(req)
end
print res.body
like this "ruby nukeuser.rb 1"
--------------------------------------------------
require 'uri'
require 'net/https'
user_id = ARGV[0].strip
url = "https://<ip
address>/services_captiveportal_users.php?act=del&id=" + user_id
url1 = URI.parse(url)
http = Net::HTTP.new(url1.host, url1.port)
http.use_ssl = true
# Do not warn us about certificate - blithely accept whatever
certificate we receive!
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
req = Net::HTTP::Get.new(url1.path)
req.basic_auth 'username', 'password'
res = http.start do |h|
h.request(req)
end
print res.body