Skip to content
Permalink
Browse files

BUG: contrib/malware name mapping: argument name

conflicting argument name
and startswith on list does not work, use first argument
  • Loading branch information...
wagner-certat committed Jun 20, 2019
1 parent 97b2131 commit 0c1dcc6316047bea96fe00321750a81ce6222919
Showing with 3 additions and 3 deletions.
  1. +3 −3 contrib/malware_name_mapping/download_mapping.py
@@ -39,13 +39,13 @@ def main(url: str=URL, add_default=False, params=None, include_malpedia=False):
download.raise_for_status()
rules = [generate_rule(*line[:2])
for line in csv.reader(io.StringIO(download.text))
if not line.startswith('#')]
if not line[0].startswith('#')]
if include_malpedia:
download = requests.get(URL_MALPEDIA)
download.raise_for_status()
rules.extend([generate_rule(*line[:2])
for line in csv.reader(io.StringIO(download.text))
if not line.startswith('#')])
if not line[0].startswith('#')])

if add_default:
rules.append(generate_rule(".*", "{msg[malware.name]}", name="default"))
@@ -83,7 +83,7 @@ def main(url: str=URL, add_default=False, params=None, include_malpedia=False):
parser.add_argument('--identifier', '-i',
nargs=1, action='append',
help='Identifier for an additional rule.')
parser.add_argument('-i', '--include-malpedia',
parser.add_argument('-m', '--include-malpedia',
default=False, action='store_true',
help='Include malpedia data (CC BY-NC-SA 3.0), '
'see https://malpedia.caad.fkie.fraunhofer.de/usage/tos from %s'

0 comments on commit 0c1dcc6

Please sign in to comment.
You can’t perform that action at this time.