]> git.ipfire.org Git - thirdparty/suricata-update.git/log
thirdparty/suricata-update.git
3 years agochangelog: update 313/head
Jason Ish [Thu, 14 Apr 2022 15:08:06 +0000 (09:08 -0600)] 
changelog: update

3 years agoBetter URL fail message on with --fail.
Jason Ish [Fri, 15 Apr 2022 15:24:58 +0000 (09:24 -0600)] 
Better URL fail message on with --fail.

If --fail, we wil not use the cached version.

3 years agomain: add fail option and handle it
Shivani Bhardwaj [Mon, 27 Dec 2021 17:27:50 +0000 (22:57 +0530)] 
main: add fail option and handle it

Ticket 4579

3 years agomain: use format for error strings
Shivani Bhardwaj [Mon, 27 Dec 2021 17:22:24 +0000 (22:52 +0530)] 
main: use format for error strings

3 years agoDon't fail when source removed from index.
Jason Ish [Thu, 14 Apr 2022 15:54:30 +0000 (09:54 -0600)] 
Don't fail when source removed from index.

Instead of failing when an enabled source is no longer in the index, log
an error and continue onto the next source.

Ticket 5269

3 years agomodify: metadata-add filter
Jason Ish [Tue, 29 Mar 2022 23:21:36 +0000 (17:21 -0600)] 
modify: metadata-add filter

A new addition to `modify.conf` that allows for adding a new metadata.

Example configuration lines:
  metadata-add re:"SURICATA STREAM" "evebox-action" "archive"
  metadata-add 2010646 "evebox-action" "archive"

Matching rules will have a new `metadata` section added onto the end of
the rule.

Ticket #5221

3 years agodatasets: dataset handling for --local files
Jason Ish [Mon, 11 Apr 2022 19:53:24 +0000 (13:53 -0600)] 
datasets: dataset handling for --local files

Look for datasets on the filesystem when referenced from rules loaded
with "--local".

3 years agodatasets: disable rule if file not found
Jason Ish [Fri, 1 Apr 2022 16:34:03 +0000 (10:34 -0600)] 
datasets: disable rule if file not found

If a dataset file is not found for load, print a warning and disable the
rule. This will allow Suricata to pass the -T test so the working rules
are updated instead of rolling back.

3 years agodatasets: rewrite dataset filenames to a hash of the filename
Jason Ish [Tue, 29 Mar 2022 06:38:58 +0000 (00:38 -0600)] 
datasets: rewrite dataset filenames to a hash of the filename

Prevents dataset filenames from different rulesets that share the same
name from overwriting each other.

3 years agodatasets: fix path handling issues
Jason Ish [Tue, 29 Mar 2022 06:00:48 +0000 (00:00 -0600)] 
datasets: fix path handling issues

3 years agohandle dataset files properly
Shivani Bhardwaj [Thu, 10 Feb 2022 13:20:06 +0000 (18:50 +0530)] 
handle dataset files properly

- Cover edge cases for invalid dataset rules
- Handle "state" attribute
- Make checks more robust

Ticket 5010

3 years agoRespect Suricata's install location when loading config.
Jason Ish [Wed, 30 Mar 2022 21:00:54 +0000 (15:00 -0600)] 
Respect Suricata's install location when loading config.

During startup change the default locations of S-U configuration files
(enable.conf, disable.conf, etc) to be relative to the installed
Suricata's --sysconfdir, but only if they exist.  This keeps the
fallback behaviour to /etc/suricata for now.

Ticket #4374

3 years agochangelog: add fix for issue 4373
Jason Ish [Mon, 28 Mar 2022 22:23:57 +0000 (16:23 -0600)] 
changelog: add fix for issue 4373

3 years agocheckversions: fix wrong version checks
Shivani Bhardwaj [Wed, 29 Dec 2021 10:53:57 +0000 (16:23 +0530)] 
checkversions: fix wrong version checks

Ticket 4373

3 years agogithub-ci: update fedora tests to f34 and f35
Jason Ish [Mon, 28 Mar 2022 22:06:58 +0000 (16:06 -0600)] 
github-ci: update fedora tests to f34 and f35

3 years agogithub-ci: convert centos 8 build to almalinux 8
Jason Ish [Mon, 28 Mar 2022 22:04:32 +0000 (16:04 -0600)] 
github-ci: convert centos 8 build to almalinux 8

4 years agochangelog: update
Jason Ish [Fri, 7 Jan 2022 18:04:48 +0000 (12:04 -0600)] 
changelog: update

4 years agoAdd warning to update sources if no index found
Tharushi Jayasekara [Thu, 8 Oct 2020 16:46:21 +0000 (22:16 +0530)] 
Add warning to update sources if no index found

Don't automatically update the sources on list-sources
if it does not exist. Instead just use the bundled version.

Ticket #3249.

4 years agohelp output: hide advanced options behind a flag
Tharushi Jayasekara [Thu, 15 Oct 2020 13:34:26 +0000 (19:04 +0530)] 
help output: hide advanced options behind a flag

Cleaning up the suricata help output and hiding the extra options
behind a "--show-advanced" option.

Hidden options are:

* --user-agent <user-agent>
* --no-check-certificate
* --yaml-fragment <filename>
* --url <url>
* --local <path>
* --sid-msg-map <filename>
* --sid-msg-map-2 <filename>
* --ignore <pattern>
* --no-ignore
* --threshold-in <filename>
* --threshold-out <filename>
* --dump-sample-configs
* --etopen
* --reload-command <command>
* --test-command <command>
* --no-merge

Ticket #3974.

4 years agodoc: add --show-advanced to common options
Tharushi Jayasekara [Sat, 17 Oct 2020 04:26:00 +0000 (09:56 +0530)] 
doc: add --show-advanced to common options

Ticket #3974.

4 years agologging: Improve flowbit logs
Riju [Fri, 16 Oct 2020 20:37:13 +0000 (02:07 +0530)] 
logging: Improve flowbit logs

Add and update debug logs for flowbit requirements to display pass

Ticket #3205.

4 years agotrivial typo in comment
Joe Atzberger [Thu, 18 Nov 2021 23:30:19 +0000 (18:30 -0500)] 
trivial typo in comment

4 years agochangelog: update
Jason Ish [Wed, 5 Jan 2022 17:42:37 +0000 (11:42 -0600)] 
changelog: update

4 years agoFix counter accuracy.
Jason Ish [Wed, 29 Dec 2021 17:04:25 +0000 (11:04 -0600)] 
Fix counter accuracy.

Instead of counting how many modifications took place, just
count the number of rules that were modified.

4 years agoFix multiple modifications not having an affect.
Jason Ish [Wed, 29 Dec 2021 16:33:42 +0000 (10:33 -0600)] 
Fix multiple modifications not having an affect.

In the case where multiple modifications changed a rule (drop included),
only the last modification took affect.

This is due to the modifications each being done on a clean version of
the rule, rather than the previously modified version of the rule.

Ticket #4259

4 years agotests: add integration tests for multiple modifications
Jason Ish [Wed, 29 Dec 2021 18:51:23 +0000 (12:51 -0600)] 
tests: add integration tests for multiple modifications

4 years agointegration tests: format
Jason Ish [Wed, 29 Dec 2021 17:09:11 +0000 (11:09 -0600)] 
integration tests: format

4 years agoindex: allow custom url for embedded index update
Jason Ish [Thu, 28 Oct 2021 15:10:11 +0000 (09:10 -0600)] 
index: allow custom url for embedded index update

4 years agoDoc: Improve documentation of Suricata reload.
Andreas Dolp [Mon, 26 Jul 2021 19:44:09 +0000 (21:44 +0200)] 
Doc: Improve documentation of Suricata reload.

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

4 years agodoc: fix formatting error
Jason Ish [Thu, 7 Oct 2021 19:16:49 +0000 (13:16 -0600)] 
doc: fix formatting error

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

5 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.