Similar to the Snort pkg/README diff I sent earlier, this diff changes
oinkmaster.conf's sample snort.org URLs to use HTTPS to avoid exposing
the oinkcode in transit.

It also updates the Snort version in the URLs to 2.9.4.0 to match the
Snort version in the ports tree.

I have also tweaked the regexp that oinkmaster uses to validate the
snort.org URLs so that it won't think that a URL that starts with
httpsssss:// is valid (I don't think anyone has invented that
protocol yet! :))

Thoughts? OK?

Lawrence


Index: Makefile
===================================================================
RCS file: /cvs/ports/net/oinkmaster/Makefile,v
retrieving revision 1.18
diff -u -p -r1.18 Makefile
--- Makefile    13 Oct 2012 02:56:15 -0000      1.18
+++ Makefile    28 Jan 2013 03:27:37 -0000
@@ -3,7 +3,7 @@
 COMMENT=       update your Snort rules
 
 DISTNAME=      oinkmaster-2.0
-REVISION=      1
+REVISION=      2
 CATEGORIES=    net security
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=oinkmaster/}
 
Index: patches/patch-oinkmaster_conf
===================================================================
RCS file: /cvs/ports/net/oinkmaster/patches/patch-oinkmaster_conf,v
retrieving revision 1.7
diff -u -p -r1.7 patch-oinkmaster_conf
--- patches/patch-oinkmaster_conf       13 Oct 2012 02:56:15 -0000      1.7
+++ patches/patch-oinkmaster_conf       7 Feb 2013 04:05:07 -0000
@@ -21,10 +21,10 @@ $OpenBSD: patch-oinkmaster_conf,v 1.7 20
 -# 5a081649c06a277e1022e1284bdc8fabda70e2a4/snortrules-snapshot-2.4.tar.gz
 -# See the Oinkmaster FAQ Q1 and http://www.snort.org/rules/ for
 -# more information.
-+# http://www.snort.org/reg-rules/<filename>/<oinkcode>
++# https://www.snort.org/reg-rules/<filename>/<oinkcode>
 +# For example, if your code is 5a081649c06a277e1022e1284bdc8fabda70e2a4
-+# and you use Snort 2.9.3.1, the url to use would be (without the wrap):
-+# http://www.snort.org/reg-rules/snortrules-snapshot-2931.tar.gz/
++# and you use Snort 2.9.4.0, the url to use would be (without the wrap):
++# https://www.snort.org/reg-rules/snortrules-snapshot-2940.tar.gz/
 +# 5a081649c06a277e1022e1284bdc8fabda70e2a4
 +# See http://www.snort.org/snort-rules/cli for more information.
  
@@ -34,19 +34,19 @@ $OpenBSD: patch-oinkmaster_conf,v 1.7 20
  
 -# Example for Snort 2.4
 -# url = 
http://www.snort.org/pub-bin/oinkmaster.cgi/<oinkcode>/snortrules-snapshot-2.4.tar.gz
-+# Example for Snort 2.9.3.1 registered user release
-+# url = 
http://www.snort.org/reg-rules/snortrules-snapshot-2931.tar.gz/<oinkcode>
++# Example for Snort 2.9.4.0 registered user release
++# url = 
https://www.snort.org/reg-rules/snortrules-snapshot-2940.tar.gz/<oinkcode>
  
 -# Example for Snort-current ("current" means cvs snapshots).
 -# url = 
http://www.snort.org/pub-bin/oinkmaster.cgi/<oinkcode>/snortrules-snapshot-CURRENT.tar.gz
-+# Example for Snort 2.9.3.1 subscriber release
-+# url = 
http://www.snort.org/sub-rules/snortrules-snapshot-2931.tar.gz/<oinkcode>
++# Example for Snort 2.9.4.0 subscriber release
++# url = 
https://www.snort.org/sub-rules/snortrules-snapshot-2940.tar.gz/<oinkcode>
  
 -# Example for Community rules
 -# url = 
http://www.snort.org/pub-bin/downloads.cgi/Download/comm_rules/Community-Rules.tar.gz
 +# Example for Snort edge rulepack (latest versioned rulepack)
 +# See http://www.snort.org/snort-rules/cli for details
-+# url = 
http://www.snort.org/reg-rules/snortrules-snapshot-edge.tar.gz/<oinkcode>
++# url = 
https://www.snort.org/reg-rules/snortrules-snapshot-edge.tar.gz/<oinkcode>
  
 -# Example for rules from the Bleeding Snort project
 -# url = http://www.bleedingsnort.com/bleeding.rules.tar.gz
Index: patches/patch-oinkmaster_pl
===================================================================
RCS file: /cvs/ports/net/oinkmaster/patches/patch-oinkmaster_pl,v
retrieving revision 1.1
diff -u -p -r1.1 patch-oinkmaster_pl
--- patches/patch-oinkmaster_pl 13 Oct 2012 02:56:15 -0000      1.1
+++ patches/patch-oinkmaster_pl 7 Feb 2013 04:05:38 -0000
@@ -5,7 +5,7 @@ $OpenBSD: patch-oinkmaster_pl,v 1.1 2012
      foreach my $url (@urls) {
          clean_exit("incorrect URL: \"$url\"")
            unless ($url =~ 
/^((?:https*|ftp|file|scp):\/\/.+\.(?:tar\.gz|tgz))$/
-+            || $url =~ 
/^((?:https*):\/\/www\.snort\.org\/(sub|reg)-rules\/.+\.tar\.gz\/[0-9a-f]{40})$/
++            || $url =~ 
/^((?:https?):\/\/www\.snort\.org\/(sub|reg)-rules\/.+\.tar\.gz\/[0-9a-f]{40})$/
              || $url =~ /^(dir:\/\/.+)/);
          my $ok_url = $1;
  

Reply via email to