]> git.ipfire.org Git - thirdparty/suricata-update.git/log
thirdparty/suricata-update.git
4 years agochangelog: update 282/head
Jason Ish [Thu, 7 Oct 2021 18:22:00 +0000 (12:22 -0600)] 
changelog: update

4 years agoAllow more characters in the custom headers
JacobRoed [Wed, 22 Sep 2021 07:14:33 +0000 (09:14 +0200)] 
Allow more characters in the custom headers

Allow more characters in the custom header regular expression to
allow for Oauth2 tokens.

Feature #4701.

[Commit message rewritten by jish@oisf.net with permission]

4 years agotests: fix checksum test for new argument type
Jason Ish [Thu, 7 Oct 2021 18:34:25 +0000 (12:34 -0600)] 
tests: fix checksum test for new argument type

4 years agoUse HTTP-Headers for checksum request
Jascha Sticher [Fri, 16 Jul 2021 13:15:29 +0000 (15:15 +0200)] 
Use HTTP-Headers for checksum request

4 years agochangelog: update 275/head 281/head
Jason Ish [Tue, 18 May 2021 06:01:29 +0000 (00:01 -0600)] 
changelog: update

4 years agotesting: remove python 3.5, add python 3.8
Jason Ish [Tue, 18 May 2021 05:54:40 +0000 (23:54 -0600)] 
testing: remove python 3.5, add python 3.8

Python 3.5 has been end of lifed.

4 years agoconf: allow no-test in configuration file
Jason Ish [Tue, 18 May 2021 05:15:26 +0000 (23:15 -0600)] 
conf: allow no-test in configuration file

If no-test was set in the configuration file, it was always
being overridden by the command, even if not set on the command
line. This change allow no-test to be set in the configuration file
like:

no-test: true

Redmine issue:
https://redmine.openinfosecfoundation.org/versions/168

4 years agochangelog: update
Jason Ish [Tue, 13 Apr 2021 19:37:44 +0000 (13:37 -0600)] 
changelog: update

4 years agogithub-ci: add Ubuntu 20.04
Jason Ish [Tue, 13 Apr 2021 19:34:12 +0000 (13:34 -0600)] 
github-ci: add Ubuntu 20.04

4 years agogithub-ci: add fedora 33, remove fedora 31 (eol)
Jason Ish [Tue, 13 Apr 2021 19:32:42 +0000 (13:32 -0600)] 
github-ci: add fedora 33, remove fedora 31 (eol)

4 years agotravis-ci: remove, appears they haven't been building
Jason Ish [Tue, 13 Apr 2021 19:31:33 +0000 (13:31 -0600)] 
travis-ci: remove, appears they haven't been building

And GitHub CI has all these tests covered.

4 years agotests: add integration test for --http-header
Jason Ish [Tue, 13 Apr 2021 19:23:34 +0000 (13:23 -0600)] 
tests: add integration test for --http-header

4 years agoHTTP BasicAuth support.
Andreas Dolp [Thu, 25 Feb 2021 18:23:09 +0000 (19:23 +0100)] 
HTTP BasicAuth support.

Allow whitespaces in entire HTTP header value.

This enables HTTP Basic Authentication.

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/4362

4 years agoversion: 1.3.0dev0
Jason Ish [Tue, 13 Apr 2021 19:13:45 +0000 (13:13 -0600)] 
version: 1.3.0dev0

4 years agoversion: 1.2.1 271/head 1.2.1
Jason Ish [Tue, 23 Feb 2021 04:54:11 +0000 (22:54 -0600)] 
version: 1.2.1

4 years agodoc: remove --merged option
Jason Ish [Tue, 23 Feb 2021 04:48:42 +0000 (22:48 -0600)] 
doc: remove --merged option

This option was never implemented and is an artifact of the tools
suricata-update was based on.

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/4215

4 years agochangelog: update
Jason Ish [Wed, 17 Feb 2021 15:35:32 +0000 (09:35 -0600)] 
changelog: update

5 years agofix: fix --no-merge option 270/head
Jason [Mon, 15 Feb 2021 22:35:27 +0000 (16:35 -0600)] 
fix: fix --no-merge option

The no-merge handling was not updated when the file storage
was converted to a list causing it to fail.

Also add a --no-merge test to our integration test.

Fixes issue:
https://redmine.openinfosecfoundation.org/issues/4324

5 years agogithub-ci: fix MacOS test 269/head
Jason Ish [Wed, 27 Jan 2021 21:32:14 +0000 (15:32 -0600)] 
github-ci: fix MacOS test

Make sure Python 3 is used.

5 years agogithub-ci: remove CentOS 6 build
Jason Ish [Wed, 27 Jan 2021 21:29:29 +0000 (15:29 -0600)] 
github-ci: remove CentOS 6 build

CentOS 6 has been end of lifed.

5 years ago1.2.0: update version and changelog 268/head 1.2.0
Jason Ish [Mon, 5 Oct 2020 15:00:01 +0000 (09:00 -0600)] 
1.2.0: update version and changelog

5 years agodoc: update quick start to be current 255/head
Jason Ish [Mon, 21 Sep 2020 20:43:06 +0000 (14:43 -0600)] 
doc: update quick start to be current

5 years agodoc: disable default code formatting for code blocks
Jason Ish [Mon, 21 Sep 2020 20:42:04 +0000 (14:42 -0600)] 
doc: disable default code formatting for code blocks

Code blocks were by default being highlighted as Python, but
for Suricata-Update most code blocks are command lines, so
disable language highlighting by default.

5 years ago1.2.0rc2 254/head 1.2.0rc2
Jason Ish [Wed, 9 Sep 2020 22:22:57 +0000 (16:22 -0600)] 
1.2.0rc2

5 years agoHandle obsolete sources. 253/head
Jason Ish [Wed, 9 Sep 2020 19:32:59 +0000 (13:32 -0600)] 
Handle obsolete sources.

An obsolete source is a source that remains in the index but
is otherwise non-functional.

Much like deprecated sources it won't be displayed in list-sources
without the --all flag.

Obsolete sources will never be fetched. Instead a warning will be
printed with the obsolete reason.

5 years agoHandle deprecated sources in index.
Jason Ish [Wed, 9 Sep 2020 19:27:40 +0000 (13:27 -0600)] 
Handle deprecated sources in index.

Handle sources that have been deprecated in the index.

Deprecated sources will not be display with "list-sources" unless
the (new) --all flag is provided.

Also, warn the user if they are using a deprecated source with
the reason.

5 years agofix message containing tuple 252/head
Shivani Bhardwaj [Thu, 3 Sep 2020 15:42:56 +0000 (21:12 +0530)] 
fix message containing tuple

5 years agoallow re-enabling disabled sources
Shivani Bhardwaj [Mon, 24 Aug 2020 08:30:25 +0000 (14:00 +0530)] 
allow re-enabling disabled sources

Closes redmine ticket 3843.

5 years agolist-sources: keep list-enabled-sources as an alias
Jason Ish [Wed, 2 Sep 2020 21:29:10 +0000 (15:29 -0600)] 
list-sources: keep list-enabled-sources as an alias

Keep list-enabled-sources for backwards compatibility.

5 years agodataset parsing: handle spaces between ","
Jason Ish [Sat, 22 Aug 2020 05:00:56 +0000 (23:00 -0600)] 
dataset parsing: handle spaces between ","

Fix dataset parsing so the filename can be parsed from:

  dataset:isset, sslbl, type md5, load sslbl-fingerprints.md5;

5 years agoLoad files into list, not dict to keep duplicate filenames
Jason Ish [Wed, 8 Jul 2020 22:52:12 +0000 (16:52 -0600)] 
Load files into list, not dict to keep duplicate filenames

By loading all downloaded rule files into the same dict, filenames
that are the same cause other files to be lost, and the content
may be different.

Instead use of list objects that tracks the filename and the content
to avoid losing the contents of a filename that already exists.

If the contents is duplicated, the rule deduplication process
will catch that.

Redmine ticket:
https://redmine.openinfosecfoundation.org/issues/3174

5 years agoMake list-enabled-sources command as an option for list-sources
Vagisha Gupta [Fri, 10 Apr 2020 15:08:49 +0000 (20:38 +0530)] 
Make list-enabled-sources command as an option for list-sources

Removed `list-enabled-sources` command  and made use of single
command `suricata-update list-sources --enabled` to list all
the enabled sources.

Redmine issue:
        https://redmine.openinfosecfoundation.org/issues/3248

5 years agoShorten the state of being written for rule files
Shivani Bhardwaj [Tue, 6 Nov 2018 17:33:43 +0000 (23:03 +0530)] 
Shorten the state of being written for rule files

In an attempt to have shorter window for rule files of being written,
write the rules at first to `<filename>.tmp` and then rename the file.

Closes Redmine ticket #2327

5 years agoUse tempdir to log output with tests
Shivani Bhardwaj [Mon, 2 Mar 2020 03:56:54 +0000 (09:26 +0530)] 
Use tempdir to log output with tests

Closes redmine ticket 3262.

5 years agodoc: Add order of application of config files
Shivani Bhardwaj [Tue, 14 Apr 2020 07:45:17 +0000 (13:15 +0530)] 
doc: Add order of application of config files

Closes redmine ticket 3535.

5 years agomodify.conf: add more examples of usage
Shivani Bhardwaj [Fri, 26 Jun 2020 12:52:38 +0000 (18:22 +0530)] 
modify.conf: add more examples of usage

Closes redmine ticket 3550.

5 years agoversion: 1.2.0dev1
Jason Ish [Wed, 2 Sep 2020 21:33:11 +0000 (15:33 -0600)] 
version: 1.2.0dev1

5 years ago1.2.0rc1 1.2.0rc1
Jason Ish [Wed, 5 Aug 2020 05:22:36 +0000 (23:22 -0600)] 
1.2.0rc1

5 years agoindex: update
Jason Ish [Wed, 5 Aug 2020 05:23:48 +0000 (23:23 -0600)] 
index: update

5 years agochangelog: features 2688 and 3528 added
Jason Ish [Sun, 2 Aug 2020 05:18:55 +0000 (23:18 -0600)] 
changelog: features 2688 and 3528 added

5 years agoMove dataset and filemd5 files along with rules
Shivani Bhardwaj [Mon, 23 Mar 2020 21:40:51 +0000 (03:10 +0530)] 
Move dataset and filemd5 files along with rules

Closes redmine tickets 2688 and 3528.

5 years agoBetter environment detection for user-agent
Jason Ish [Fri, 10 Apr 2020 16:05:31 +0000 (10:05 -0600)] 
Better environment detection for user-agent

Don't rely on Python's platform.linux_distribution module as it
has been deprecated and removed in the latest version of Python.

Instead use more generic ways to pick up the distribution such
as looking at /etc/os-release, or falling back to uname.

Should also pickup the version of FreeBSD, which was previously
missing.

5 years agogithub-ci: add Fedora 32 test (Python3 only)
Jason Ish [Wed, 8 Jul 2020 23:00:34 +0000 (17:00 -0600)] 
github-ci: add Fedora 32 test (Python3 only)

5 years agogithub-ci: use fedora:31 instead of fedora:latest
Jason Ish [Wed, 8 Jul 2020 22:57:58 +0000 (16:57 -0600)] 
github-ci: use fedora:31 instead of fedora:latest

Fedora:latest is a moving target, for CI its probably best
to pin the version of the OS that testing is done on.

5 years agochangelog: add classification management
Jason Ish [Mon, 20 Jul 2020 16:42:08 +0000 (10:42 -0600)] 
changelog: add classification management

5 years agoclassifications: logging fixups
Jason Ish [Mon, 20 Jul 2020 16:39:37 +0000 (10:39 -0600)] 
classifications: logging fixups

Log when loading a classification file as debug.

Log the path being written as info.

5 years agotests: add test for classification file merge 242/head
Shivani Bhardwaj [Tue, 30 Jun 2020 03:45:28 +0000 (09:15 +0530)] 
tests: add test for classification file merge

5 years agotests: Rename classification.config
Shivani Bhardwaj [Tue, 30 Jun 2020 03:45:00 +0000 (09:15 +0530)] 
tests: Rename classification.config

5 years agomanage classification.config
Shivani Bhardwaj [Thu, 18 Jun 2020 13:32:12 +0000 (19:02 +0530)] 
manage classification.config

5 years agothreshold typo
michael schem [Thu, 28 May 2020 18:45:09 +0000 (11:45 -0700)] 
threshold typo

5 years agotests/index.yaml: add comment about not adding new sources
Jason Ish [Thu, 28 May 2020 16:58:05 +0000 (10:58 -0600)] 
tests/index.yaml: add comment about not adding new sources

Sources should be added to the suricata-intel-index repo.

5 years agochangelog: add issue 3696 fix
Jason Ish [Thu, 28 May 2020 16:11:21 +0000 (10:11 -0600)] 
changelog: add issue 3696 fix

5 years agochanging source index from http_header to http-header to fix --http_header option
michael schem [Wed, 13 May 2020 00:40:30 +0000 (17:40 -0700)] 
changing source index from http_header to http-header to fix --http_header option

5 years agochangelog: update 223/head
Jason Ish [Wed, 8 Apr 2020 17:42:49 +0000 (11:42 -0600)] 
changelog: update

5 years agotravis-ci: drop python 3.4 testing
Jason Ish [Tue, 31 Mar 2020 15:15:12 +0000 (09:15 -0600)] 
travis-ci: drop python 3.4 testing

5 years agotesting: remove python 3.4 from the test matrix
Jason Ish [Tue, 31 Mar 2020 15:14:13 +0000 (09:14 -0600)] 
testing: remove python 3.4 from the test matrix

PyYAML has dropped support for Python 3.4 causing all tests
on Python 3.4 to fail.

5 years agomodify filters: better error on badly formatted filter
Jason Ish [Wed, 8 Apr 2020 17:38:17 +0000 (11:38 -0600)] 
modify filters: better error on badly formatted filter

Instead of exiting with an uncaught exception on a badly formatted
modify filter, convert the exception to an ApplicationError that
will be logged, along with the line that is badly formatted.

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/3536

6 years agomove modify into loop with others and skip format check 218/head
cthomas [Mon, 6 Jan 2020 20:50:16 +0000 (15:50 -0500)] 
move modify into loop with others and skip format check

6 years agoCheck data directory's permission while updating sources 217/head
Shivani Bhardwaj [Mon, 7 Oct 2019 10:38:18 +0000 (16:08 +0530)] 
Check data directory's permission while updating sources

Closes redmine ticket #3219.

6 years agoDocs: Setup directories with correct permissions
Vagisha Gupta [Wed, 12 Jun 2019 08:21:24 +0000 (13:51 +0530)] 
Docs: Setup directories with correct permissions

Documentation updated with the steps to setup the directories with
the correct permissions.

6 years agoSeparate out matchers
Vagisha Gupta [Thu, 17 Oct 2019 06:46:50 +0000 (12:16 +0530)] 
Separate out matchers

Currently, all the code for matchers happens to be in main.py
which makes it quite cluttered. A separate `matchers.py` module
is created which contains all the code for matching rules and
integrated with main.py. Also the modules `test_main.py` and
`test_matchers.py` are modified accordingly.

Redmine issue:
    https://redmine.openinfosecfoundation.org/issues/2873

6 years agoSeparate out parsers
Vagisha Gupta [Fri, 18 Oct 2019 09:22:51 +0000 (14:52 +0530)] 
Separate out parsers

Parsers are separated out of the `main.py` module to a new `parsers.py`
module to make code cleaner and compact.

This patch is heavily based on Vidushi's work.
Thanks to Vidushi Agrawal <vidushi229@gmail.com>

Redmine issue:
    https://redmine.openinfosecfoundation.org/issues/2874

6 years agodoc: Add missing docs for commands
Shivani Bhardwaj [Fri, 18 Oct 2019 10:50:12 +0000 (16:20 +0530)] 
doc: Add missing docs for commands

Add docs for `list-sources`, `list-enabled-sources` and `check-versions`
commands.
Closes redmine ticket #3228.

6 years agoupdate-sources: python 3 fixup 216/head
Jason Ish [Wed, 11 Dec 2019 21:26:58 +0000 (15:26 -0600)] 
update-sources: python 3 fixup

Open index in binary mode to fix encoding issue on Python 3.6
on CentOS 7.

6 years agogithub: add some github ci actions
Jason Ish [Wed, 11 Dec 2019 16:15:36 +0000 (10:15 -0600)] 
github: add some github ci actions

6 years agointegration-test: use python executable thats starts test
Jason Ish [Wed, 11 Dec 2019 16:29:28 +0000 (10:29 -0600)] 
integration-test: use python executable thats starts test

Use the Python binary that was used to start the integration
test to run suricata-update.

6 years agochangelog: update
Jason Ish [Wed, 11 Dec 2019 18:53:07 +0000 (12:53 -0600)] 
changelog: update

6 years agoDisable SMB rules if not supported by Suricata
Jason Ish [Wed, 13 Nov 2019 16:16:59 +0000 (10:16 -0600)] 
Disable SMB rules if not supported by Suricata

If Suricata is less than 5, and Rust is not enabled, disable
smb rules as they require Rust.

Ticket 3280:
https://redmine.openinfosecfoundation.org/issues/3280

6 years agoCleanup scattered main imports
Vagisha Gupta [Fri, 13 Sep 2019 05:48:13 +0000 (11:18 +0530)] 
Cleanup scattered main imports

Currently, lot of names of a module are imported from a package by
writing multiple import statements in main.py. Instead, Python's
standard grouping mechanism (parentheses) is used to write the import
statement to make them compact.

Redmine issue:
    https://redmine.openinfosecfoundation.org/issues/2872

6 years agoCleanup unused import and use isinstance() instead of type()
Vagisha Gupta [Fri, 15 Mar 2019 12:57:46 +0000 (18:27 +0530)] 
Cleanup unused import and use isinstance() instead of type()

Optimization Cleanup main imports

`import types` is an unused import in main.py, therefore, removed.
Also, using `isinstance()` is the preferred way to access the type.
The isinstance() function checks if the object (first argument)
is an instance or subclass of classinfo class (second argument).
Here object is the 'url' to be checked and classinfo is a string
type.

6 years agoFix failure in case of missing index.yaml, cleanup
Shivani Bhardwaj [Mon, 25 Feb 2019 10:29:54 +0000 (15:59 +0530)] 
Fix failure in case of missing index.yaml, cleanup

If the index.yaml was not present in data directory, update-sources
command would fail with an IOError. Fix this by handling this case. Now,
if sources are updated on a new data directory, there is an info message
"Adding all sources in the log".

Modularize the current structure to make it more readable and perform
one thing per function. Sort the imports and clean them.

6 years agoAdd summary for updated sources
Shivani Bhardwaj [Mon, 5 Nov 2018 16:06:37 +0000 (21:36 +0530)] 
Add summary for updated sources

`suricata-update` when used with its option `update-sources` did not
give any information about what changed and in which source. Add the
logs for any change in the sources, namely, addition, removal or change
in the content.
The log output now looks like:
```
$ ./bin/suricata-update update-sources
31/10/2018 -- 00:03:52 - <Info> -- Loading /etc/suricata/update.yaml
31/10/2018 -- 00:03:52 - <Info> -- Using data-directory /var/lib/suricata.
31/10/2018 -- 00:03:52 - <Info> -- Using Suricata configuration /etc/suricata/suricata.yaml
31/10/2018 -- 00:03:52 - <Info> -- Using /etc/suricata/rules for Suricata provided rules.
31/10/2018 -- 00:03:52 - <Info> -- Found Suricata version 4.1.0-dev at /usr/sbin/suricata.
31/10/2018 -- 00:03:52 - <Info> -- Downloading https://www.openinfosecfoundation.org/rules/index.yaml
31/10/2018 -- 00:03:53 - <Info> -- Source et/open was added
31/10/2018 -- 00:03:53 - <Info> -- Source empty/something was removed
31/10/2018 -- 00:03:53 - <Info> -- Source et/pro was changed
31/10/2018 -- 00:03:53 - <Info> -- Saved /var/lib/suricata/update/cache/index.yaml
```

Closes redmine ticket #2472.

6 years agopr template: Remove unnecessary newlines
Shivani Bhardwaj [Thu, 8 Nov 2018 16:25:36 +0000 (21:55 +0530)] 
pr template: Remove unnecessary newlines

6 years agoversion: 1.2.0dev0
Jason Ish [Thu, 17 Oct 2019 22:51:45 +0000 (16:51 -0600)] 
version: 1.2.0dev0

6 years ago1.1.0: update version and changelog 202/head 203/head 1.1.0
Jason Ish [Fri, 11 Oct 2019 16:01:45 +0000 (10:01 -0600)] 
1.1.0: update version and changelog

6 years agoCopy environment before modify when running Suricata.
Jason Ish [Fri, 11 Oct 2019 16:52:27 +0000 (10:52 -0600)] 
Copy environment before modify when running Suricata.

Related issue:
https://redmine.openinfosecfoundation.org/issues/2669

LD_LIBRARY_PATH wasn't being passed through to the environment
used to run Suricata. Fix this by copying the parent
environment than adding the vars that we need instead of
using a clean environment.

6 years agoindex: update embedded index 201/head
Jason Ish [Fri, 11 Oct 2019 14:58:02 +0000 (08:58 -0600)] 
index: update embedded index

6 years agoindex: remove version info from bundled index
Jason Ish [Fri, 11 Oct 2019 15:24:35 +0000 (09:24 -0600)] 
index: remove version info from bundled index

This prevents the issue of including outdated version info
when a new release of Suricata is made with a bundled
suricata-update.

The user will be asked to update their sources to check
their version info.

6 years agoversion check: small fix - missing import and wording
Jason Ish [Fri, 11 Oct 2019 14:49:34 +0000 (08:49 -0600)] 
version check: small fix - missing import and wording

- import sys was missing cause sys.exit to throw an
  exception

- if the index does not contain a version, suggest the
  user run update-sources.

6 years agoFix check-versions command
Shivani Bhardwaj [Wed, 9 Oct 2019 18:26:30 +0000 (23:56 +0530)] 
Fix check-versions command

This patch addresses the following issues:
1. Checks wherever code could fail
2. Proper handling of dev and stable versions
3. Small optimizations

6 years agoAdd "check-versions" subcommand
Vagisha Gupta [Fri, 12 Jul 2019 07:13:09 +0000 (12:43 +0530)] 
Add "check-versions" subcommand

Add a `suricata-update check-versions` subcommand that checks
the version of suricata and logs if the versions are up to
date, outdated or EOL.

Redmine issue:
    https://redmine.openinfosecfoundation.org/issues/2341

6 years agoconfig: use datarootdir from build info for dist rules
Jason Ish [Wed, 2 Oct 2019 20:53:15 +0000 (14:53 -0600)] 
config: use datarootdir from build info for dist rules

When looking for Suricata provided rules, put the highest
priority on the datarootdir from the build info.

6 years agoDisable ja3_hash rules if Suricata not configured for ja3.
Jason Ish [Wed, 2 Oct 2019 20:43:12 +0000 (14:43 -0600)] 
Disable ja3_hash rules if Suricata not configured for ja3.

Disable rules using ja3 keywords if Suricata is not configure
for ja3, or does not support ja3.

Rules using ja3 keywords with fail to load if Suricata is not
built with NSS, or ja3 fingerprints are disabled.

Take into account the Suricata version as well, as not defining
the ja3_fingerprint configuration field in 5.0+ will leave it
enabled, but in older versions, it will remain disabled if
not defined.

6 years agoengine/config: include info info in config object
Jason Ish [Wed, 2 Oct 2019 20:41:18 +0000 (14:41 -0600)] 
engine/config: include info info in config object

6 years agoengine/build-info: include parsed version info
Jason Ish [Wed, 2 Oct 2019 20:39:26 +0000 (14:39 -0600)] 
engine/build-info: include parsed version info

6 years agoengine: extract features from --build-info
Jason Ish [Wed, 2 Oct 2019 19:22:49 +0000 (13:22 -0600)] 
engine: extract features from --build-info

6 years ago1.1.0rc1 1.1.0rc1
Jason Ish [Mon, 9 Sep 2019 21:37:59 +0000 (15:37 -0600)] 
1.1.0rc1

6 years agochangelog: add ticket 3100: optional checksum url
Jason Ish [Mon, 9 Sep 2019 21:17:02 +0000 (15:17 -0600)] 
changelog: add ticket 3100: optional checksum url

6 years agoAdd no-checksum option 194/head
Vagisha Gupta [Mon, 2 Sep 2019 07:54:12 +0000 (13:24 +0530)] 
Add no-checksum option

Added a `--no-checksum` option to the add-source command and an optional
"checksum" in SourceConfiguration class for add-sources and
enabled-sources.
Also, a check is added to skip downloading the checksum URL if the
source is configured  with checksum false.

Redmine issue:
    https://redmine.openinfosecfoundation.org/issues/3100

6 years agoRedo variable and function names reserved for Python
Vagisha Gupta [Mon, 10 Jun 2019 19:33:09 +0000 (01:03 +0530)] 
Redo variable and function names reserved for Python

Changed the conflicting variable name `filter` and function name
`filter()` accordingly which suricata-update uses as it is reserved
for use in Python standard modules.

6 years agoLog a warning if index is old
Vagisha Gupta [Wed, 10 Jul 2019 05:31:01 +0000 (11:01 +0530)] 
Log a warning if index is old

If the index is older than 2 weeks, logged a warning that the
index is old and user needs to update it by running
`suricata-update update-sources`.

6 years agochangelog: add missing tickets
Jason Ish [Wed, 28 Aug 2019 22:18:18 +0000 (16:18 -0600)] 
changelog: add missing tickets

6 years agoAdd a check to apply colour if output stream on tty
Vagisha Gupta [Mon, 5 Aug 2019 09:10:51 +0000 (14:40 +0530)] 
Add a check to apply colour if output stream on tty

6 years agoSeparate log messages to stderr and stdout
Vagisha Gupta [Mon, 5 Aug 2019 09:05:55 +0000 (14:35 +0530)] 
Separate log messages to stderr and stdout

Currently, all the messages in suricata-update are logged to stderr.
Changes are made to split between log messages where regular
output (INFO, DEBUG) goes to stdout whereas ERRORS, WARNINGS and
CRITICAL messages goes to stderr.

6 years agochangelog: fix for issue 2875
Jason Ish [Wed, 28 Aug 2019 21:59:38 +0000 (15:59 -0600)] 
changelog: fix for issue 2875

6 years agoImprove permission warning
Vagisha Gupta [Tue, 28 May 2019 07:20:29 +0000 (12:50 +0530)] 
Improve permission warning

Improve permission warning when Suricata-update runs with the wrong user

When suricata-update runs with a non-root user, it gives an ugly traceback.
To avoid those ugly tracebacks, try except block is put around the operation
that are being performed on the file i.e. shutil.copyfile(src, dest) and
exit cleanly with an error in the log.
Also, to avoid ugly tracebacks for permission of suricata.yaml, try-except
is put around where it is accessed and exit cleanly.

6 years agochangelog: fix for issue 2867
Jason Ish [Wed, 28 Aug 2019 21:42:32 +0000 (15:42 -0600)] 
changelog: fix for issue 2867

6 years agoFix TypeError : Failure with missing rule params
Vrinda Narayan [Thu, 28 Mar 2019 12:02:48 +0000 (17:32 +0530)] 
Fix TypeError : Failure with missing rule params

Bug #2867 : Failure with missing rule params
If sometimes a rule is not parsed correctly and sid or gid are of
NoneType the program shows a TypeError. While parsing the rule, the sid
can be checked to make sure that sid is not of type None, and if it is,
raise a BadSidError and log it, the rule is not added to the list of
final rules.

6 years agochangelog: pull in changelog for 1.0.4 and 1.0.5
Jason Ish [Wed, 28 Aug 2019 21:35:30 +0000 (15:35 -0600)] 
changelog: pull in changelog for 1.0.4 and 1.0.5

6 years agoCatch Keyboard Interrupt and exit cleanly.
Vrinda Narayan [Wed, 13 Mar 2019 09:53:43 +0000 (15:23 +0530)] 
Catch Keyboard Interrupt and exit cleanly.

Optimization #2878 https://redmine.openinfosecfoundation.org/issues/2878
Can be done by importing python library signal, and defining a function
signal_handler which will print a message if keyboard interrupt is
detected and exit the program.