Module: Firewall::UrlProtectionsHelper
- Defined in:
- app/helpers/firewall/url_protections_helper.rb
Class Method Summary collapse
Class Method Details
.protected_urls ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'app/helpers/firewall/url_protections_helper.rb', line 5 def protected_urls regex = /\d+\s+ACCEPT.*?dpt:80 STRING match "(.*?)" ALGO/ rules = IptablesHelper.show_rules.split(/\n/) protected_urls = [] rules.each{ |line| match = regex.match(line) protected_urls.push(match[1]) unless match.nil? } return protected_urls end |