Commit 148ecb8a authored by Franco Fichtner's avatar Franco Fichtner

src: prune (our) copyrights for clartity

We did the same sanity cleanup for all other code.  Easier on the
eyes and easier to fork.  ;)

Discussed with: ad@
parent 58dd87c9
#!/usr/bin/env python2.7
"""
Copyright (c) 2015 Deciso B.V.
part of OPNsense (https://www.opnsense.org/)
All rights reserved.
Redistribution and use in source and binary forms, with or without
......@@ -26,7 +24,6 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
"""
__author__ = 'Ad Schellevis'
......
"""
Copyright (c) 2015 Deciso B.V.
part of OPNsense (https://www.opnsense.org/)
All rights reserved.
Redistribution and use in source and binary forms, with or without
......@@ -27,11 +24,9 @@
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
package : translate
function: collect acl translatable text
"""
__author__ = 'Ad Schellevis'
......
"""
Copyright (c) 2015 Deciso B.V.
part of OPNsense (https://www.opnsense.org/)
All rights reserved.
Redistribution and use in source and binary forms, with or without
......@@ -27,11 +24,9 @@
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
package : translate
function: collect controller translatable text
"""
__author__ = 'Ad Schellevis'
......
"""
Copyright (c) 2015 Deciso B.V.
part of OPNsense (https://www.opnsense.org/)
All rights reserved.
Redistribution and use in source and binary forms, with or without
......@@ -27,11 +24,9 @@
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
package : translate
function: collect model translatable text
"""
__author__ = 'Ad Schellevis'
......
#!/usr/local/bin/python2.7
"""
Copyright (c) 2015 Ad Schellevis
part of OPNsense (https://www.opnsense.org/)
All rights reserved.
Redistribution and use in source and binary forms, with or without
......@@ -28,9 +26,11 @@
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
Generate dependency maps for legacy files.
To use this script, please install graphviz package ( pkg install graphviz )
"""
import time
import os
import os.path
......
#!/usr/local/bin/python2.7
"""
Copyright (c) 2015 Jos Schellevis - Deciso B.V.
part of OPNsense (https://www.opnsense.org/)
All rights reserved.
Redistribution and use in source and binary forms, with or without
......
"""
Copyright (c) 2015 Ad Schellevis
part of OPNsense (https://www.opnsense.org/)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
"""
#!/usr/local/bin/python2.7
"""
Copyright (c) 2015 Ad Schellevis
part of OPNsense (https://www.opnsense.org/)
All rights reserved.
Redistribution and use in source and binary forms, with or without
......@@ -28,6 +26,7 @@
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
Install suricata ruleset into opnsense.rules directory
"""
import os.path
......
"""
Copyright (c) 2015 Ad Schellevis
part of OPNsense (https://www.opnsense.org/)
All rights reserved.
Redistribution and use in source and binary forms, with or without
......@@ -25,8 +22,8 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
"""
# define paths used by suricata
rule_source_directory='/usr/local/etc/suricata/rules/'
suricata_alert_log='/var/log/suricata/eve.json'
"""
Copyright (c) 2015 Ad Schellevis
part of OPNsense (https://www.opnsense.org/)
All rights reserved.
Redistribution and use in source and binary forms, with or without
......@@ -27,8 +24,10 @@
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
rule downloader module (may need to be extended in the future, this version only processes http(s))
"""
import syslog
import requests
......
"""
Copyright (c) 2015 Ad Schellevis
part of OPNsense (https://www.opnsense.org/)
All rights reserved.
Redistribution and use in source and binary forms, with or without
......@@ -25,8 +22,8 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
"""
import os
def reverse_log_reader(filename, block_size = 8192, start_pos=None):
......
"""
Copyright (c) 2015 Ad Schellevis
part of OPNsense (https://www.opnsense.org/)
All rights reserved.
Redistribution and use in source and binary forms, with or without
......@@ -27,8 +24,10 @@
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
shared module for suricata rule metadata
"""
import os
import syslog
import glob
......
"""
Copyright (c) 2015 Ad Schellevis
part of OPNsense (https://www.opnsense.org/)
All rights reserved.
Redistribution and use in source and binary forms, with or without
......@@ -25,9 +22,8 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
"""
import sys
def updateParams(parameters):
......
"""
Copyright (c) 2015 Ad Schellevis
part of OPNsense (https://www.opnsense.org/)
All rights reserved.
Redistribution and use in source and binary forms, with or without
......@@ -27,8 +24,10 @@
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
shared module for suricata scripts, handles the installed rules cache for easy access
"""
import os
import os.path
import glob
......
#!/usr/local/bin/python2.7
"""
Copyright (c) 2015 Ad Schellevis
part of OPNsense (https://www.opnsense.org/)
All rights reserved.
Redistribution and use in source and binary forms, with or without
......@@ -28,8 +26,10 @@
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
list all available alert logs
"""
import os
import glob
import ujson
......
#!/usr/local/bin/python2.7
"""
Copyright (c) 2015 Ad Schellevis
part of OPNsense (https://www.opnsense.org/)
All rights reserved.
Redistribution and use in source and binary forms, with or without
......@@ -28,8 +26,10 @@
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
script to fetch all classtypes from the installed suricata rules using the shared rule cache:
"""
import ujson
from lib.rulecache import RuleCache
......
#!/usr/local/bin/python2.7
"""
Copyright (c) 2015 Ad Schellevis
part of OPNsense (https://www.opnsense.org/)
All rights reserved.
Redistribution and use in source and binary forms, with or without
......@@ -28,8 +26,10 @@
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
list downloadable/installable suricata rules, see metadata/rules/*.xml
"""
import os
import os.path
import ujson
......
#!/usr/local/bin/python2.7
"""
Copyright (c) 2015 Ad Schellevis
part of OPNsense (https://www.opnsense.org/)
All rights reserved.
Redistribution and use in source and binary forms, with or without
......@@ -28,8 +26,10 @@
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
query suricata alert log
"""
import os.path
import re
import sre_constants
......
#!/usr/local/bin/python2.7
"""
Copyright (c) 2015 Ad Schellevis
part of OPNsense (https://www.opnsense.org/)
All rights reserved.
Redistribution and use in source and binary forms, with or without
......@@ -28,11 +26,13 @@
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
script to fetch all suricata rule information into a single json object with the following contents:
rules : all relevant metadata from the rules including the default enabled or disabled state
total_rows: total rowcount for this selection
parameters: list of parameters used
"""
import ujson
from lib.rulecache import RuleCache
from lib.params import updateParams
......
#!/usr/local/bin/python2.7
"""
Copyright (c) 2015 Ad Schellevis
part of OPNsense (https://www.opnsense.org/)
All rights reserved.
Redistribution and use in source and binary forms, with or without
......@@ -28,8 +26,10 @@
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
update suricata rules
"""
import os
import sys
import fcntl
......
#!/usr/local/bin/python2.7
"""
Copyright (c) 2014 Ad Schellevis
part of OPNsense (https://www.opnsense.org/)
All rights reserved.
Redistribution and use in source and binary forms, with or without
......@@ -28,15 +26,13 @@
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
package : configd
function: delivers a process coordinator to handle frontend functions
"""
__author__ = 'Ad Schellevis'
#
import os
import sys
import modules.processhandler
......
#!/usr/local/bin/python2.7
"""
Copyright (c) 2015 Ad Schellevis
part of OPNsense (https://www.opnsense.org/)
All rights reserved.
Redistribution and use in source and binary forms, with or without
......@@ -28,11 +26,11 @@
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
package : configd
function: commandline tool to send commands to configd (response to stdout)
"""
import socket
import os.path
import traceback
......
"""
Copyright (c) 2014 Ad Schellevis
part of opnSense (https://www.opnsense.org/)
All rights reserved.
Redistribution and use in source and binary forms, with or without
......@@ -25,12 +22,8 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
"""
def singleton(cls, *args, **kwargs):
""" singleton pattern, use ad decorator
"""
......
"""
Copyright (c) 2015 Ad Schellevis
part of OPNsense (https://www.opnsense.org/)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
package : configd
"""
"""
Copyright (c) 2015 Ad Schellevis
part of OPNsense (https://www.opnsense.org/)
All rights reserved.
Redistribution and use in source and binary forms, with or without
......@@ -27,8 +24,10 @@
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
package : configd
"""
from operator import itemgetter
class Helpers(object):
......
"""
Copyright (c) 2015 Ad Schellevis
part of OPNsense (https://www.opnsense.org/)
All rights reserved.
Redistribution and use in source and binary forms, with or without
......@@ -27,11 +24,9 @@
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
package : configd
function: config handler
"""
__author__ = 'Ad Schellevis'
......
"""
Copyright (c) 2015 Ad Schellevis
part of OPNsense (https://www.opnsense.org/)
All rights reserved.
Redistribution and use in source and binary forms, with or without
......@@ -27,11 +24,11 @@
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
package : configd
function: make standard config parser case sensitive
"""
from ConfigParser import ConfigParser
......
"""
Copyright (c) 2014 Ad Schellevis
part of OPNsense (https://www.opnsense.org/)
All rights reserved.
Redistribution and use in source and binary forms, with or without
......@@ -27,11 +24,11 @@
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
package : configd
function: unix domain socket process worker process
"""
__author__ = 'Ad Schellevis'
import syslog
......
"""
Copyright (c) 2014 Ad Schellevis
part of OPNsense (https://www.opnsense.org/)
All rights reserved.
Redistribution and use in source and binary forms, with or without
......@@ -27,11 +24,11 @@
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
package : configd
function: unix domain socket process worker process
"""
__author__ = 'Ad Schellevis'
import os
......
"""
Copyright (c) 2015 Ad Schellevis
part of OPNsense (https://www.opnsense.org/)
All rights reserved.
Redistribution and use in source and binary forms, with or without
......@@ -27,11 +24,11 @@
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
package : configd
function: template handler, generate configuration files using templates
"""
__author__ = 'Ad Schellevis'
import os
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment