#!/usr/bin/ruby #require 'open-uri' require 'net/http' File.readlines("/home/nick/avg/tunnels.txt").each do |line| open "https://admin:n3td0te!@192.168.10.10/nph-vpn.cgi?name=#{line.chomp}&cmd=status", &:read end if tunnel.include? "active" puts "The tunnel is ACTIVE" elsif tunnel.include? "down" puts "The tunnels is DOWN" elsif tunnel.include? "unknown" puts "The Status of the tunnel is currently UNKNOWN" else puts "The Tunnel has reported the status of #{tunnel}" end