id int64 0 458k | file_name stringlengths 4 119 | file_path stringlengths 14 227 | content stringlengths 24 9.96M | size int64 24 9.96M | language stringclasses 1
value | extension stringclasses 14
values | total_lines int64 1 219k | avg_line_length float64 2.52 4.63M | max_line_length int64 5 9.91M | alphanum_fraction float64 0 1 | repo_name stringlengths 7 101 | repo_stars int64 100 139k | repo_forks int64 0 26.4k | repo_open_issues int64 0 2.27k | repo_license stringclasses 12
values | repo_extraction_date stringclasses 433
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
39,800 | parser_bingmurls.py | certtools_intelmq/intelmq/bots/parsers/microsoft/parser_bingmurls.py | # SPDX-FileCopyrightText: 2018 Sebastian Wagner
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
Parses BingMURLs data in JSON format.
"""
import json
from intelmq.lib.bot import ParserBot
MAPPING = {"Attributable": "extra.attributable",
"Description": "event_description.text",
... | 3,115 | Python | .py | 63 | 37.52381 | 125 | 0.594346 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,801 | parser_ctip.py | certtools_intelmq/intelmq/bots/parsers/microsoft/parser_ctip.py | # SPDX-FileCopyrightText: 2018 Sebastian Wagner
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
Parses CTIP data in JSON format.
Key indicatorexpirationdatetime is ignored, meaning is unknown.
There are two different variants of data
* Interflow format: JSON format, MAPPING
* Azure format... | 14,116 | Python | .py | 301 | 37.478405 | 184 | 0.630808 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,802 | _config.py | certtools_intelmq/intelmq/bots/parsers/shadowserver/_config.py | # SPDX-FileCopyrightText: 2016-2018 by Bundesamt für Sicherheit in der Informationstechnik (BSI)
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
Copyright (c)2016-2018 by Bundesamt für Sicherheit in der Informationstechnik (BSI)
Software engineering by BSI & Intevation GmbH
This is a config... | 14,733 | Python | .py | 334 | 38.377246 | 118 | 0.677995 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,803 | parser.py | certtools_intelmq/intelmq/bots/parsers/shadowserver/parser.py | # SPDX-FileCopyrightText: 2016 by Bundesamt für Sicherheit in der Informationstechnik
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
Copyright (C) 2016 by Bundesamt für Sicherheit in der Informationstechnik
Software engineering by Intevation GmbH
This is an "all-in-one" parser for a lot of ... | 11,643 | Python | .py | 247 | 33.939271 | 109 | 0.571265 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,804 | parser_n6stomp.py | certtools_intelmq/intelmq/bots/parsers/n6/parser_n6stomp.py | # SPDX-FileCopyrightText: 2015 aaronkaplan
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
The source provides a JSON file with a dictionary. The keys of this dict are
identifiers and the values are lists of domains.
"""
import json
import re
from intelmq.lib import utils
from intelmq.lib.b... | 7,561 | Python | .py | 150 | 38.326667 | 86 | 0.542517 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,805 | parser.py | certtools_intelmq/intelmq/bots/parsers/turris/parser.py | # SPDX-FileCopyrightText: 2023 Filip Pokorn√Ω
#
# SPDX-License-Identifier: AGPL-3.0-or-later
from intelmq.lib.bot import ParserBot
PORTS = {
"ftp": 21,
"telnet": 23,
"http": 80
# smtp uses both 25 and 587, therefore we can't say for certain
}
class TurrisGreylistParserBot(ParserBot):
"""Parse th... | 1,428 | Python | .py | 33 | 34.090909 | 125 | 0.606083 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,806 | parser_drop.py | certtools_intelmq/intelmq/bots/parsers/spamhaus/parser_drop.py | # SPDX-FileCopyrightText: 2015 Sebastian Wagner
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
""" Single IntelMQ parser for Spamhaus drop feeds """
import dateutil.parser
from intelmq.lib.bot import ParserBot
class SpamhausDropParserBot(ParserBot):
"""Parse the Spamhaus DROP, EDROP, DR... | 2,107 | Python | .py | 42 | 38.52381 | 92 | 0.581259 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,807 | parser_cert.py | certtools_intelmq/intelmq/bots/parsers/spamhaus/parser_cert.py | # SPDX-FileCopyrightText: 2015 Sebastian Wagner
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
Header of the File:
; Bots filtered by last 1 hours, prepared for <CERTNAME> on UTC = ...
; Copyright © 2015 The Spamhaus Project Ltd. All rights reserved.
; No re-distribution or public access al... | 9,286 | Python | .py | 164 | 43.493902 | 133 | 0.589507 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,808 | parser.py | certtools_intelmq/intelmq/bots/parsers/twitter/parser.py | # SPDX-FileCopyrightText: 2018 Karel
#
# SPDX-License-Identifier: AGPL-3.0-or-later
r"""
Parser of text intended to obtain IOCs from tweets.
First substitutions are performed and then words in the text are compared with
'(/|^)([a-z0-9.-]+\.[a-z0-9]+?)([/:]|$)'
In the case of a match it is checked whether this can be ... | 5,012 | Python | .py | 112 | 35.919643 | 132 | 0.634016 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,809 | parser_haas.py | certtools_intelmq/intelmq/bots/parsers/cznic/parser_haas.py | # SPDX-FileCopyrightText: 2020 gethvi
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
import dateutil.parser
from intelmq.lib.bot import ParserBot
class CZNICHaasParserBot(ParserBot):
"""CZ.NIC HaaS Parser is the bot responsible to parse the report and sanitize the information"""
par... | 1,388 | Python | .py | 30 | 38.8 | 100 | 0.654762 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,810 | parser_proki.py | certtools_intelmq/intelmq/bots/parsers/cznic/parser_proki.py | # SPDX-FileCopyrightText: 2020 sinus-x
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
import json
from intelmq.lib import utils
from intelmq.lib.bot import ParserBot
class CZNICProkiParserBot(ParserBot):
"""Parse the feed from malicious IP addresses on Czech networks"""
recover_line... | 1,218 | Python | .py | 30 | 32.633333 | 77 | 0.646809 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,811 | parser.py | certtools_intelmq/intelmq/bots/parsers/openphish/parser.py | # SPDX-FileCopyrightText: 2015 National CyberSecurity Center
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
from intelmq.lib import utils
from intelmq.lib.bot import ParserBot
class OpenPhishParserBot(ParserBot):
"""Parse the OpenPhish feed"""
def process(self):
report = sel... | 805 | Python | .py | 22 | 28.636364 | 60 | 0.632468 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,812 | parser_commercial.py | certtools_intelmq/intelmq/bots/parsers/openphish/parser_commercial.py | # SPDX-FileCopyrightText: 2018 Filip Pokorn√Ω
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
import dateutil.parser
from intelmq.lib.bot import ParserBot
class OpenPhishCommercialParserBot(ParserBot):
"""
Parse the OpenPhish feed
List of source fields:
[
'asn',
... | 2,868 | Python | .py | 73 | 30.438356 | 116 | 0.596832 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,813 | parser.py | certtools_intelmq/intelmq/bots/parsers/dyn/parser.py | # SPDX-FileCopyrightText: 2015 National CyberSecurity Center
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
format:
ponmocup-malware-IP ponmocup-malware-domain ponmocup-malware-URI-path ponmocup-htaccess-infected-domain
"""
import dateutil.parser
from intelmq.lib import utils
from intelm... | 2,700 | Python | .py | 57 | 34.842105 | 103 | 0.582254 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,814 | parser_asn.py | certtools_intelmq/intelmq/bots/parsers/dshield/parser_asn.py | # SPDX-FileCopyrightText: 2015 National CyberSecurity Center
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
# created: Tue, 22 Dec 2015 12:19:03 +0000#
# Source IP is 0 padded so each byte is three digits long
# Reports: number of packets received
# Targets: number of target IPs that report... | 2,019 | Python | .py | 49 | 33.346939 | 91 | 0.607984 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,815 | parser_block.py | certtools_intelmq/intelmq/bots/parsers/dshield/parser_block.py | # SPDX-FileCopyrightText: 2015 National CyberSecurity Center
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
# primary URL: https://feeds.dshield.org/block.txt
# PGP Sign.: https://feeds.dshield.org/block.txt.asc
#
# updated: Tue Dec 15 15:33:38 2015 UTC
#
# This list summarizes ... | 2,364 | Python | .py | 63 | 29.269841 | 79 | 0.580263 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,816 | parser_cap_program.py | certtools_intelmq/intelmq/bots/parsers/cymru/parser_cap_program.py | # SPDX-FileCopyrightText: 2018 Sebastian Wagner
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
import re
from intelmq.lib import utils
from intelmq.lib.bot import ParserBot
from intelmq.lib.harmonization import FQDN
MAPPING_STATIC = {'bot': {
'classification.type': 'infected-system'},
... | 17,550 | Python | .py | 333 | 39.201201 | 159 | 0.561661 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,817 | parser_full_bogons.py | certtools_intelmq/intelmq/bots/parsers/cymru/parser_full_bogons.py | # SPDX-FileCopyrightText: 2018 Sebastian Wagner
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
import dateutil
from intelmq.lib import utils
from intelmq.lib.bot import ParserBot
class CymruFullBogonsParserBot(ParserBot):
"""Parse the Cymru Full Bogons feed"""
def parse(self, report... | 1,291 | Python | .py | 30 | 35.8 | 73 | 0.650883 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,818 | parser.py | certtools_intelmq/intelmq/bots/parsers/misp/parser.py | # SPDX-FileCopyrightText: 2016 kralca
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
import json
from datetime import datetime
from urllib.parse import urljoin
from intelmq.lib import utils
from intelmq.lib.bot import ParserBot
class MISPParserBot(ParserBot):
"""Parse MISP events"""
... | 5,004 | Python | .py | 110 | 35.2 | 82 | 0.607509 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,819 | parser_otx.py | certtools_intelmq/intelmq/bots/parsers/alienvault/parser_otx.py | # SPDX-FileCopyrightText: 2015 robcza
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
Events are gathered based on user subscriptions in AlienVault OTX
The data structure is described in detail here:
https://github.com/AlienVault-Labs/OTX-Python-SDK/blob/master/
howto_use_python_otx_api.ipyn... | 5,382 | Python | .py | 117 | 32.435897 | 112 | 0.537626 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,820 | parser.py | certtools_intelmq/intelmq/bots/parsers/alienvault/parser.py | # SPDX-FileCopyrightText: 2015 National CyberSecurity Center
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
from intelmq.lib.bot import ParserBot
CLASSIFICATION = {
"c2server": "c2-server",
"scanning host": "scanner",
"malicious host": "infected-system",
"spamming": "spam",
... | 1,972 | Python | .py | 48 | 30.208333 | 64 | 0.578092 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,821 | parser.py | certtools_intelmq/intelmq/bots/parsers/html_table/parser.py | # SPDX-FileCopyrightText: 2019 Brajneesh Kumar
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
HTML Table parser
Parameters:
columns: string
ignore_values: string
skip_table_head: boolean
attribute_name: string
attribute_value: string
table_index: int
split_column: string
split_separator: s... | 4,787 | Python | .py | 118 | 29.389831 | 96 | 0.566659 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,822 | parser.py | certtools_intelmq/intelmq/bots/parsers/threatminer/parser.py | # SPDX-FileCopyrightText: 2018 dargen3
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
from html.parser import HTMLParser
from intelmq.lib import utils
from intelmq.lib.bot import ParserBot
class MyHTMLParser(HTMLParser):
@property
def set_empty_data(self):
self.lsData = []
... | 1,742 | Python | .py | 48 | 28.208333 | 70 | 0.623068 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,823 | expert.py | certtools_intelmq/intelmq/bots/experts/uwhoisd/expert.py | # SPDX-FileCopyrightText: 2021 Raphaël Vinot
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
import socket
from urllib.parse import urlparse
from intelmq.lib.bot import ExpertBot
class UniversalWhoisExpertBot(ExpertBot):
""" Universal Whois expert bot get the whois entry related an a do... | 1,796 | Python | .py | 45 | 30.333333 | 75 | 0.597358 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,824 | expert.py | certtools_intelmq/intelmq/bots/experts/rdap/expert.py | # SPDX-FileCopyrightText: 2021 Sebastian Waldbauer
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
from intelmq.lib.bot import ExpertBot
from intelmq.lib.utils import create_request_session
from intelmq.lib.exceptions import MissingDependencyError
from intelmq.lib.mixins import CacheMixin
try:
... | 7,070 | Python | .py | 128 | 37.1875 | 172 | 0.519086 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,825 | expert.py | certtools_intelmq/intelmq/bots/experts/field_reducer/expert.py | # SPDX-FileCopyrightText: 2017 Sebastian Wagner
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
Reducer bot
"""
from intelmq.lib.bot import ExpertBot
from intelmq.lib.message import Event
class FieldReducerExpertBot(ExpertBot):
"""Remove fields from events"""
type = None
keys ... | 1,109 | Python | .py | 33 | 25.636364 | 83 | 0.605066 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,826 | expert_mar.py | certtools_intelmq/intelmq/bots/experts/mcafee/expert_mar.py | # SPDX-FileCopyrightText: 2018 tux78
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
MARExpertBot queries environment for occurrences of IOCs via McAfee Active Response.
Parameter:
dxl_config_file: string
lookup_type: string
"""
try:
from dxlclient.client_config import DxlClientConfi... | 4,520 | Python | .py | 130 | 21.315385 | 134 | 0.477444 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,827 | expert.py | certtools_intelmq/intelmq/bots/experts/domain_valid/expert.py | """
Domain validator
SPDX-FileCopyrightText: 2021 Marius Karotkis <marius.karotkis@gmail.com>
SPDX-License-Identifier: AGPL-3.0-or-later
"""
try:
import validators
except ImportError:
validators = None
import os.path
import pathlib
import sys
import requests.exceptions
from intelmq.lib.bot import ExpertBot... | 4,120 | Python | .py | 93 | 34.892473 | 111 | 0.637681 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,828 | expert.py | certtools_intelmq/intelmq/bots/experts/rfc1918/expert.py | # SPDX-FileCopyrightText: 2015 Sebastian Wagner
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# *- coding: utf-8 -*-
"""
RFC 1918 Will Drop Local IP from a given record and a bit more.
It checks for RFC1918 IPv4 Hosts
It checks for localhost, multicast and test LANs
It checks for Link Local and Documentation LA... | 5,160 | Python | .py | 108 | 37.555556 | 207 | 0.595073 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,829 | expert.py | certtools_intelmq/intelmq/bots/experts/splunk_saved_search/expert.py | """Splunk saved search enrichment export bot
SPDX-FileCopyrightText: 2020 Linköping University <https://liu.se/>
SPDX-License-Identifier: AGPL-3.0-or-later
Searches Splunk for fields in an event and adds search results to it.
This bot is quite slow, since it needs to submit a search job to
Splunk, get the job ID, p... | 8,658 | Python | .py | 163 | 40.300613 | 127 | 0.612044 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,830 | expert.py | certtools_intelmq/intelmq/bots/experts/taxonomy/expert.py | # SPDX-FileCopyrightText: 2015 National CyberSecurity Center
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
The mapping follows
Reference Security Incident Taxonomy Working Group – RSIT WG
https://github.com/enisaeu/Reference-Security-Incident-Taxonomy-Task-Force/
with extensions.
"""
fr... | 3,400 | Python | .py | 80 | 36.9125 | 160 | 0.686612 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,831 | expert.py | certtools_intelmq/intelmq/bots/experts/truncate_by_delimiter/expert.py | """
Cut string if length is bigger than max
SPDX-FileCopyrightText: 2021 Marius Karotkis <marius.karotkis@gmail.com>
SPDX-License-Identifier: AGPL-3.0-or-later
"""
from intelmq.lib.bot import ExpertBot
class TruncateByDelimiterExpertBot(ExpertBot):
delimiter: str = '.'
max_length: int = 200
field: str = ... | 788 | Python | .py | 20 | 33 | 87 | 0.693421 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,832 | expert.py | certtools_intelmq/intelmq/bots/experts/wait/expert.py | # SPDX-FileCopyrightText: 2018 Sebastian Wagner
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
Created on Tue Jan 23 15:25:58 2018
@author: sebastian
"""
import time
import redis
from intelmq.lib.bot import ExpertBot
class WaitExpertBot(ExpertBot):
"""Wait for a some time or until ... | 1,632 | Python | .py | 48 | 25.083333 | 81 | 0.583969 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,833 | expert.py | certtools_intelmq/intelmq/bots/experts/gethostbyname/expert.py | # SPDX-FileCopyrightText: 2016 Sebastian Wagner
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
These are all possible gaierrors according to the source:
http://www.castaglia.org/proftpd/doc/devel-guide/src/lib/glibc-gai_strerror.c.html ::
# define EAI_BADFLAGS -1 /* Invalid value ... | 3,395 | Python | .py | 73 | 37.452055 | 91 | 0.592503 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,834 | expert.py | certtools_intelmq/intelmq/bots/experts/domain_suffix/expert.py | # SPDX-FileCopyrightText: 2018 Sebastian Wagner
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
The library publicsuffixlist will be used if installed,
otherwise our own internal fallback is used.
"""
import codecs
import pathlib
import os.path
import sys
import requests.exceptions
from in... | 4,796 | Python | .py | 101 | 38.712871 | 183 | 0.65631 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,835 | _lib.py | certtools_intelmq/intelmq/bots/experts/domain_suffix/_lib.py | # SPDX-FileCopyrightText: 2021 Sebastian Waldbauer
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
A custom public suffix implementation
Only works with punycode, not unicode, as intelmq only uses
the first representation.
"""
class PublicSuffixList:
def __init__(self, source, only_ica... | 1,805 | Python | .py | 46 | 28.478261 | 99 | 0.555872 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,836 | expert_status.py | certtools_intelmq/intelmq/bots/experts/http/expert_status.py | """
HTTP Status Expert Bot
SPDX-FileCopyrightText: 2021 Birger Schacht <schacht@cert.at>
SPDX-License-Identifier: AGPL-3.0-or-later
"""
from typing import List
from intelmq.lib.bot import ExpertBot
from intelmq.lib.utils import create_request_session
class HttpStatusExpertBot(ExpertBot):
"""
Fetch the HTTP ... | 2,129 | Python | .py | 46 | 36.521739 | 115 | 0.639479 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,837 | expert_content.py | certtools_intelmq/intelmq/bots/experts/http/expert_content.py | """
HTTP Content Expert Bot
SPDX-FileCopyrightText: 2021 Birger Schacht <schacht@cert.at>
SPDX-License-Identifier: AGPL-3.0-or-later
"""
from typing import List
from intelmq.lib.bot import ExpertBot
from intelmq.lib.utils import create_request_session
class HttpContentExpertBot(ExpertBot):
"""
Test if a giv... | 2,073 | Python | .py | 49 | 32.836735 | 119 | 0.624441 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,838 | expert.py | certtools_intelmq/intelmq/bots/experts/modify/expert.py | # SPDX-FileCopyrightText: 2015 Sebastian Wagner
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
Modify Expert bot let's you manipulate all fields with a config file.
"""
import re
import sys
from intelmq.lib.bot import ExpertBot
from intelmq.lib.utils import load_configuration
def is_re_p... | 4,123 | Python | .py | 101 | 29.029703 | 160 | 0.563641 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,839 | expert.py | certtools_intelmq/intelmq/bots/experts/aggregate/expert.py | """
Aggregate Expert
SPDX-FileCopyrightText: 2021 Intelmq Team <intelmq-team@cert.at>
SPDX-License-Identifier: AGPL-3.0-or-later
"""
from datetime import datetime, timedelta
import time
import json
from intelmq.lib.bot import ExpertBot
from intelmq.lib.utils import parse_relative
from intelmq.lib.mixins import CacheMi... | 3,967 | Python | .py | 81 | 37.691358 | 162 | 0.584647 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,840 | expert.py | certtools_intelmq/intelmq/bots/experts/geohash/expert.py | # SPDX-FileCopyrightText: 2019 Sebastian Wagner
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
'''
Uses
https://pypi.org/project/geolib/
https://github.com/joyanujoy/geolib
'''
from intelmq.lib.bot import ExpertBot
try:
from geolib import geohash
except ImportError:
geohash = None
cl... | 1,368 | Python | .py | 37 | 28.297297 | 104 | 0.621499 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,841 | expert.py | certtools_intelmq/intelmq/bots/experts/recordedfuture_iprisk/expert.py | # SPDX-FileCopyrightText: 2018 olekristoffer
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
See README for database download.
"""
import io
import csv
import sys
import tarfile
import pathlib
import requests
from intelmq.lib.bot import ExpertBot
from intelmq.lib.utils import get_bots_sett... | 5,378 | Python | .py | 111 | 36.531532 | 183 | 0.598167 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,842 | expert.py | certtools_intelmq/intelmq/bots/experts/jinja/expert.py | # SPDX-FileCopyrightText: 2021 Birger Schacht
#
# SPDX-License-Identifier: AGPL-3.0-or-later
from intelmq.lib.bot import ExpertBot
from intelmq.lib.exceptions import MissingDependencyError
import pathlib
import os
from typing import Union, Dict
try:
from jinja2 import Template, TemplateError
except ImportError:
... | 1,877 | Python | .py | 47 | 32.085106 | 101 | 0.65215 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,843 | expert.py | certtools_intelmq/intelmq/bots/experts/tor_nodes/expert.py | # SPDX-FileCopyrightText: 2015 National CyberSecurity Center
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
See README for database download.
"""
import re
import sys
import pathlib
import requests
from intelmq.lib.bot import ExpertBot
from intelmq.lib.utils import get_bots_settings, creat... | 4,318 | Python | .py | 94 | 35.691489 | 183 | 0.612488 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,844 | expert.py | certtools_intelmq/intelmq/bots/experts/cymru_whois/expert.py | # SPDX-FileCopyrightText: 2015 National CyberSecurity Center
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
import json
from intelmq.lib.bot import ExpertBot
from intelmq.lib.harmonization import IPAddress
from intelmq.lib.mixins import CacheMixin
from ._lib import Cymru
CACHE_KEY = "%d_%s"
... | 1,893 | Python | .py | 46 | 31.065217 | 107 | 0.601093 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,845 | _lib.py | certtools_intelmq/intelmq/bots/experts/cymru_whois/_lib.py | # SPDX-FileCopyrightText: 2021 Sebastian Waldbauer
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
Reference: https://team-cymru.com/community-services/ip-asn-mapping/#dns
If the query returns more than one network, we select the more specific one.
See https://github.com/certtools/intelmq/i... | 4,681 | Python | .py | 135 | 24.725926 | 79 | 0.543276 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,846 | expert.py | certtools_intelmq/intelmq/bots/experts/sieve/expert.py | # SPDX-FileCopyrightText: 2017 Antoine Neuenschwander
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
SieveExpertBot filters and modifies events based on a specification language similar to mail sieve.
Parameters:
file: string
"""
import ipaddress
import os
import re
import traceback
im... | 21,487 | Python | .py | 505 | 32.106931 | 120 | 0.596495 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,847 | expert.py | certtools_intelmq/intelmq/bots/experts/tuency/expert.py | """
© 2021 Sebastian Wagner <wagner@cert.at>
SPDX-License-Identifier: AGPL-3.0-or-later
https://gitlab.com/intevation/tuency/tuency/-/blob/master/backend/docs/IntelMQ-API.md
Example query:
> curl -s -H "Authorization: Bearer XXX"\
'https://tuency-demo1.example.com/intelmq/lookup?classification_taxonomy=availabi... | 3,531 | Python | .py | 73 | 39.09589 | 270 | 0.623294 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,848 | expert.py | certtools_intelmq/intelmq/bots/experts/do_portal/expert.py | # SPDX-FileCopyrightText: 2019 Sebastian Wagner
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
As the frontend reverse-proxies the (backend) API
a "502 Bad Gateway" status code is treated the same as a timeout,
i.e. will be retried instead of a fail.
"""
try:
import requests
except Impo... | 2,317 | Python | .py | 57 | 33.070175 | 96 | 0.638307 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,849 | expert.py | certtools_intelmq/intelmq/bots/experts/national_cert_contact_certat/expert.py | # SPDX-FileCopyrightText: 2017 Sebastian Wagner
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
CERT.at geolocate the national CERT abuse service
https://contacts.cert.at/cgi-bin/abuse-nationalcert.pl
HTTP GET: https://contacts.cert.at/cgi-bin/abuse-nationalcert.pl?ip=1.2.3.4
HTTP POST: htt... | 2,899 | Python | .py | 65 | 35.476923 | 246 | 0.641335 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,850 | expert.py | certtools_intelmq/intelmq/bots/experts/deduplicator/expert.py | # SPDX-FileCopyrightText: 2015 National CyberSecurity Center
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""Deduplicator expert bot
Parameters:
redis_cache_host: string
redis_cache_port: int
redis_cache_db: int
redis_cache_ttl: int
redis_cache_password: string. def... | 1,963 | Python | .py | 48 | 32.75 | 102 | 0.652059 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,851 | expert.py | certtools_intelmq/intelmq/bots/experts/generic_db_lookup/expert.py | # SPDX-FileCopyrightText: 2016 Sebastian Wagner
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
Generic DB Lookup
"""
from intelmq.lib.bot import ExpertBot
from intelmq.lib.mixins import SQLMixin
class GenericDBLookupExpertBot(ExpertBot, SQLMixin):
"""Fetche data from a database"""
... | 3,003 | Python | .py | 66 | 34.575758 | 129 | 0.580767 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,852 | expert.py | certtools_intelmq/intelmq/bots/experts/lookyloo/expert.py | # SPDX-FileCopyrightText: 2021 Sebastian Waldbauer
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
from intelmq.lib.bot import ExpertBot
from intelmq.lib.exceptions import MissingDependencyError
try:
import pylookyloo
except ImportError:
pylookyloo = None
class LookyLooExpertBot(Expe... | 995 | Python | .py | 26 | 32.538462 | 103 | 0.700418 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,853 | expert.py | certtools_intelmq/intelmq/bots/experts/trusted_introducer_lookup/expert.py | """
Trusted Introducer Expert
SPDX-FileCopyrightText: 2021 Intelmq Team <intelmq-team@cert.at>
SPDX-License-Identifier: AGPL-3.0-or-later
"""
from intelmq.lib.bot import ExpertBot
from intelmq.lib.exceptions import MissingDependencyError
from intelmq.lib.mixins import HttpMixin
class TrustedIntroducerLookupExpertBot... | 2,827 | Python | .py | 64 | 30.453125 | 92 | 0.525319 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,854 | expert.py | certtools_intelmq/intelmq/bots/experts/abusix/expert.py | # SPDX-FileCopyrightText: 2015 National CyberSecurity Center
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
'''
Reference: https://abusix.com/contactdb.html
RIPE abuse contacts resolving through DNS TXT queries
'''
from intelmq.lib.bot import ExpertBot
from ._lib import Abusix
try:
impor... | 1,322 | Python | .py | 37 | 28.027027 | 108 | 0.637863 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,855 | _lib.py | certtools_intelmq/intelmq/bots/experts/abusix/_lib.py | # SPDX-FileCopyrightText: 2021 Sebastian Waldbauer
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
import ipaddress
import re
import intelmq.lib.utils as utils
QUERY_HOST = ".abuse-contacts.abusix.org"
REGEX = r"[^@]+@[^@]+\.[^@]+"
class Abusix():
@staticmethod
def query(ip):
... | 875 | Python | .py | 26 | 26 | 72 | 0.570238 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,856 | expert.py | certtools_intelmq/intelmq/bots/experts/ripe/expert.py | # SPDX-FileCopyrightText: 2018 Brajneesh Kumar
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
'''
Reference:
https://stat.ripe.net/docs/data_api
https://github.com/RIPE-NCC/whois/wiki/WHOIS-REST-API-abuse-contact
'''
import json
import warnings
import intelmq.lib.utils as utils
from intelmq.l... | 6,546 | Python | .py | 139 | 35.935252 | 133 | 0.580392 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,857 | expert.py | certtools_intelmq/intelmq/bots/experts/idea/expert.py | # SPDX-FileCopyrightText: 2017 Pavel Kácha
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
IDEA classification: https://idea.cesnet.cz/en/classifications
"""
from base64 import b64decode
from collections.abc import Mapping, Sequence
from urllib.parse import quote_plus
from uuid import uuid4... | 9,073 | Python | .py | 209 | 30.933014 | 123 | 0.528101 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,858 | expert.py | certtools_intelmq/intelmq/bots/experts/filter/expert.py | # SPDX-FileCopyrightText: 2015 National CyberSecurity Center
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
import re
from datetime import datetime, timedelta, timezone
from dateutil import parser
from intelmq.lib.bot import ExpertBot
from intelmq.lib.utils import parse_relative, TIMESPANS
... | 6,664 | Python | .py | 138 | 35.144928 | 106 | 0.584372 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,859 | expert.py | certtools_intelmq/intelmq/bots/experts/url2fqdn/expert.py | # SPDX-FileCopyrightText: 2015 robcza
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
import warnings
from urllib.parse import urlparse
from typing import Optional, List
from intelmq.lib.bot import ExpertBot
DEPRECATION_WARNING = "This bot is deprecated and will be removed in version 4.0. Use... | 1,420 | Python | .py | 35 | 31.742857 | 112 | 0.633577 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,860 | expert.py | certtools_intelmq/intelmq/bots/experts/threshold/expert.py | """Threshold value expert bot
SPDX-FileCopyrightText: 2020 Linköping University <https://liu.se/>
SPDX-License-Identifier: AGPL-3.0-or-later
Given a stream of messages, this bot will let through only the single
one that makes the count of similar messages go above a threshold
value.
This bot is not multiprocessing ... | 3,574 | Python | .py | 73 | 39.438356 | 109 | 0.659568 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,861 | expert.py | certtools_intelmq/intelmq/bots/experts/csv_converter/expert.py | # SPDX-FileCopyrightText: 2019 Sebastian Wagner
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
import csv
import io
from intelmq.lib.bot import ExpertBot
class CSVConverterExpertBot(ExpertBot):
"""Convert data to CSV"""
fieldnames: str = "time.source,classification.type,source.ip" # ... | 906 | Python | .py | 26 | 28.923077 | 99 | 0.663991 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,862 | expert.py | certtools_intelmq/intelmq/bots/experts/maxmind_geoip/expert.py | # SPDX-FileCopyrightText: 2015 National CyberSecurity Center
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
This product includes GeoLite2 data created by MaxMind, available from
<a href="http://www.maxmind.com">http://www.maxmind.com</a>.
"""
import io
import sys
import pathlib
import req... | 7,665 | Python | .py | 155 | 35.670968 | 183 | 0.581448 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,863 | expert.py | certtools_intelmq/intelmq/bots/experts/url/expert.py | # SPDX-FileCopyrightText: 2023 Filip Pokorn√Ω
#
# SPDX-License-Identifier: AGPL-3.0-or-later
from typing import Optional, List
from urllib.parse import urlparse
from intelmq.lib.bot import ExpertBot
from intelmq.lib.harmonization import IPAddress, FQDN
URLSCHEMES = {
"ftp": {
"default_port": 21,
"... | 4,286 | Python | .py | 108 | 30.777778 | 181 | 0.615848 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,864 | expert.py | certtools_intelmq/intelmq/bots/experts/format_field/expert.py | # SPDX-FileCopyrightText: 2019 Brajneesh kumar
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
from intelmq.lib.bot import ExpertBot
class FormatFieldExpertBot(ExpertBot):
"""Perform string method operations on column values"""
new_value = ""
old_value = ""
replace_... | 1,464 | Python | .py | 36 | 32.25 | 129 | 0.62103 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,865 | expert.py | certtools_intelmq/intelmq/bots/experts/misp/expert.py | # SPDX-FileCopyrightText: 2019 Raphaël Vinot
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
An expert to for looking up values in MISP.
Parameters:
- misp_url: URL of the MISP server
- misp_key: API key for accessing MISP
- http_verify_cert: true or false, check the validity of the ... | 1,788 | Python | .py | 44 | 31.886364 | 91 | 0.632948 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,866 | expert.py | certtools_intelmq/intelmq/bots/experts/asn_lookup/expert.py | # SPDX-FileCopyrightText: 2015 National CyberSecurity Center
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
import os
import io
import re
import sys
import bz2
import pathlib
import requests
from intelmq.lib.bot import ExpertBot
from intelmq.lib.exceptions import MissingDependencyError
from in... | 6,287 | Python | .py | 137 | 35.014599 | 183 | 0.606968 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,867 | expert.py | certtools_intelmq/intelmq/bots/experts/remove_affix/expert.py | """
Remove Affix
SPDX-FileCopyrightText: 2021 Marius Karotkis <marius.karotkis@gmail.com>
SPDX-License-Identifier: AGPL-3.0-or-later
"""
from intelmq.lib.bot import ExpertBot
class RemoveAffixExpertBot(ExpertBot):
remove_prefix: bool = True # True - from start, False - from end
affix: str = 'www.'
field... | 1,139 | Python | .py | 30 | 30.233333 | 90 | 0.643312 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,868 | expert.py | certtools_intelmq/intelmq/bots/experts/reverse_dns/expert.py | # SPDX-FileCopyrightText: 2015 robcza
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
from datetime import datetime
import dns.exception
import dns.resolver
import dns.reversename
from intelmq.lib.bot import ExpertBot
from intelmq.lib.harmonization import IPAddress
from intelmq.lib.mixins imp... | 2,838 | Python | .py | 67 | 30.552239 | 107 | 0.586545 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,869 | collector_rt.py | certtools_intelmq/intelmq/bots/collectors/rt/collector_rt.py | # SPDX-FileCopyrightText: 2015 Sebastian Wagner
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
import re
from datetime import datetime, timedelta
from typing import Optional
from dateutil import parser
from intelmq.lib.bot import CollectorBot
from intelmq.lib.mixins import HttpMixin
from inte... | 9,924 | Python | .py | 204 | 33.857843 | 112 | 0.538025 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,870 | collector.py | certtools_intelmq/intelmq/bots/collectors/opendxl/collector.py | # SPDX-FileCopyrightText: 2018 root
#
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
openDXL Collector Bot
Connects to a openDXL fabric and subscribes to ATD topic
TLS is used by default.
Parameters:
dxl_config_file: string
dxl_topic: string
"""
import time
from intelmq.lib.bot import CollectorBot
from intelmq.li... | 3,478 | Python | .py | 84 | 30.892857 | 99 | 0.622585 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,871 | collector_mail_attach.py | certtools_intelmq/intelmq/bots/collectors/mail/collector_mail_attach.py | # SPDX-FileCopyrightText: 2015 National CyberSecurity Center
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
In Version 0.9.5 the attachment filename is no longer surrounded by double quotes, see for the discussion:
https://github.com/certtools/intelmq/pull/1134
https://github.com/martinruse... | 3,149 | Python | .py | 67 | 35.716418 | 122 | 0.61044 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,872 | collector_mail_url.py | certtools_intelmq/intelmq/bots/collectors/mail/collector_mail_url.py | # SPDX-FileCopyrightText: 2015 National CyberSecurity Center
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
Uses the common mail iteration method from the lib file.
"""
import io
import re
from intelmq.lib.mixins import HttpMixin
from intelmq.lib.splitreports import generate_reports
from i... | 3,572 | Python | .py | 79 | 31.962025 | 109 | 0.557986 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,873 | _lib.py | certtools_intelmq/intelmq/bots/collectors/mail/_lib.py | # SPDX-FileCopyrightText: 2021 Sebastian Waldbauer
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
import imaplib
import re
import ssl
from intelmq.lib.bot import CollectorBot
from intelmq.lib.exceptions import MissingDependencyError
try:
import imbox
except ImportError:
imbox = None
... | 3,222 | Python | .py | 78 | 28.269231 | 104 | 0.556691 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,874 | collector_mail_body.py | certtools_intelmq/intelmq/bots/collectors/mail/collector_mail_body.py | # SPDX-FileCopyrightText: 2018 Sebastian Wagner
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
Uses the common mail iteration method from the lib file.
"""
from typing import Union, Iterable
from ._lib import MailCollectorBot
class MailBodyCollectorBot(MailCollectorBot):
"Monitor IMA... | 1,749 | Python | .py | 42 | 33 | 101 | 0.614522 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,875 | collector_mas.py | certtools_intelmq/intelmq/bots/collectors/fireeye/collector_mas.py | # SPDX-FileCopyrightText: 2021 Sebastian Wagner
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
Fireeye collector bot
Parameters:
http_username, http_password: string
http_timeout_max_tries: an integer depicting how often a connection attempt is retried
host : dns name of the local applianc... | 3,786 | Python | .py | 78 | 39.615385 | 130 | 0.64131 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,876 | collector_amqp.py | certtools_intelmq/intelmq/bots/collectors/amqp/collector_amqp.py | # SPDX-FileCopyrightText: 2019 Sebastian Wagner
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
Collecting from a (remote) AMQP Server and fetching either intelmq or any other messages.
"""
import ssl
from intelmq.bots.outputs.amqptopic.output import AMQPTopicOutputBot
from intelmq.lib.bot ... | 3,233 | Python | .py | 73 | 35.205479 | 118 | 0.652769 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,877 | collector.py | certtools_intelmq/intelmq/bots/collectors/alienvault_otx/collector.py | # SPDX-FileCopyrightText: 2015 robcza
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
import datetime
import json
from intelmq.lib.bot import CollectorBot
from intelmq.lib.exceptions import MissingDependencyError
try:
from OTXv2 import OTXv2
except ImportError:
OTXv2 = None
class Ali... | 1,414 | Python | .py | 37 | 31.432432 | 102 | 0.681053 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,878 | collector.py | certtools_intelmq/intelmq/bots/collectors/stomp/collector.py | # SPDX-FileCopyrightText: 2017 Sebastian Wagner
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
try:
import stomp
except ImportError:
stomp = None
else:
import stomp.exception
from intelmq.lib.bot import CollectorBot
from intelmq.lib.mixins import StompMixin
if stomp is not None:... | 5,336 | Python | .py | 113 | 37.168142 | 100 | 0.615592 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,879 | collector_rsync.py | certtools_intelmq/intelmq/bots/collectors/rsync/collector_rsync.py | # SPDX-FileCopyrightText: 2018 dargen3
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
import stat
import shlex
from os import mkdir, path, chmod
from subprocess import run, PIPE
from datetime import datetime, timedelta
from intelmq import VAR_STATE_PATH
from intelmq.lib.bot import CollectorBot... | 4,387 | Python | .py | 94 | 36.62766 | 161 | 0.607018 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,880 | collector_http.py | certtools_intelmq/intelmq/bots/collectors/http/collector_http.py | # SPDX-FileCopyrightText: 2015 National CyberSecurity Center
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
HTTP collector bot
Parameters:
http_url (string)
http_header (dictionary): default: {}
http_verify_cert (boolean): default: True
extract_files: value used to extract ... | 6,836 | Python | .py | 159 | 32.685535 | 123 | 0.60897 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,881 | collector_http_stream.py | certtools_intelmq/intelmq/bots/collectors/http/collector_http_stream.py | # SPDX-FileCopyrightText: 2015 National CyberSecurity Center
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
HTTP collector bot
Parameters:
http_url: string
http_header: dictionary
default: {}
http_verify_cert: boolean
default: True
http_username, http_passwo... | 2,825 | Python | .py | 70 | 29.142857 | 102 | 0.584733 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,882 | collector.py | certtools_intelmq/intelmq/bots/collectors/eset/collector.py | # SPDX-FileCopyrightText: 2020 Mikk Margus Möll
#
# SPDX-License-Identifier: AGPL-3.0-or-later
import datetime
from intelmq.lib.bot import CollectorBot
from intelmq.lib.exceptions import MissingDependencyError
try:
import cabby
except ImportError:
cabby = None
class ESETCollectorBot(CollectorBot):
"""... | 1,779 | Python | .py | 41 | 36.170732 | 109 | 0.68137 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,883 | collector_crimeserver.py | certtools_intelmq/intelmq/bots/collectors/blueliv/collector_crimeserver.py | # SPDX-FileCopyrightText: 2015 robcza
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
import json
import logging
from intelmq.lib.bot import CollectorBot
from intelmq.lib.exceptions import MissingDependencyError
try:
from sdk.blueliv_api import BluelivAPI
except ImportError:
BluelivAPI... | 1,388 | Python | .py | 36 | 30.805556 | 72 | 0.658464 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,884 | collector_file.py | certtools_intelmq/intelmq/bots/collectors/file/collector_file.py | # SPDX-FileCopyrightText: 2016 by Bundesamt für Sicherheit in der Informationstechnik
#
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
File Collector Bot
Regularly checks a directory and reads files matching an extension from it
It can delete the file if a delete switch was set.
The bot creates on report per file.
... | 3,858 | Python | .py | 79 | 31.506329 | 92 | 0.520767 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,885 | collector_api.py | certtools_intelmq/intelmq/bots/collectors/api/collector_api.py | # SPDX-FileCopyrightText: 2018 tavi.poldma
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
API Collector bot
"""
from threading import Thread
from typing import Optional
import grp
import os
import socket
from intelmq.lib.bot import CollectorBot
from intelmq.lib.exceptions import MissingDep... | 2,776 | Python | .py | 79 | 27.898734 | 98 | 0.650746 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,886 | collector_stream.py | certtools_intelmq/intelmq/bots/collectors/shodan/collector_stream.py | # SPDX-FileCopyrightText: 2018 Sebastian Wagner
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
Parameters:
* api_key: The API key
Selectors:
* countries: A list of strings or a comma separated list with country codes
* alert: An alert ID from monitor.shodan.io
"""
import pkg_resources
from... | 3,015 | Python | .py | 77 | 28.38961 | 108 | 0.589603 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,887 | collector_certstream.py | certtools_intelmq/intelmq/bots/collectors/calidog/collector_certstream.py | # SPDX-FileCopyrightText: 2018 Sebastian Wagner
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
A Bot to collect data from the Certificate Transparency Log (CTL)
This bot works based on certstream library (https://github.com/CaliDog/certstream-python)
@author: Florian Krenn, Chr... | 1,620 | Python | .py | 37 | 37.675676 | 130 | 0.716475 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,888 | collector_interflow.py | certtools_intelmq/intelmq/bots/collectors/microsoft/collector_interflow.py | # SPDX-FileCopyrightText: 2018 Sebastian Wagner
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
https://interflow.portal.azure-api.net/
Example:
[{
"indicatorthreattype": "Botnet",
"description": "B106-Dynamer",
"indicatorexpirationdatetime": "2017-04- 05T20:21:09.0000000Z",
"tlplevel": "G... | 5,682 | Python | .py | 127 | 36.094488 | 130 | 0.637975 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,889 | collector_azure.py | certtools_intelmq/intelmq/bots/collectors/microsoft/collector_azure.py | # SPDX-FileCopyrightText: 2017 Sebastian Wagner
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
Uses the azure.storage.blob module. Tested with version 12.13.1
"""
import gzip
import io
from intelmq.lib.bot import CollectorBot
from intelmq.lib.exceptions import MissingDependencyError
from i... | 2,596 | Python | .py | 57 | 36.438596 | 101 | 0.648082 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,890 | collector_reports_api.py | certtools_intelmq/intelmq/bots/collectors/shadowserver/collector_reports_api.py | """
Shadowserver Reports API Collector Bot
SPDX-FileCopyrightText: 2020 Intelmq Team <intelmq-team@cert.at>
SPDX-License-Identifier: AGPL-3.0-or-later
"""
from datetime import datetime, timedelta, timezone
import json
import hashlib
import hmac
import re
from typing import Optional
import requests.exceptions
from in... | 6,932 | Python | .py | 135 | 42.251852 | 279 | 0.645495 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,891 | collector_github_contents_api.py | certtools_intelmq/intelmq/bots/collectors/github_api/collector_github_contents_api.py | # SPDX-FileCopyrightText: 2019 Tomas Bellus
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
GITHUB contents API Collector bot
PARAMETERS:
'basic_auth_username': github Basic authentication username (REQUIRED)
'basic_auth_password': github Basic authentication password (REQUIRED)
... | 3,636 | Python | .py | 77 | 36.844156 | 116 | 0.617207 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,892 | _collector_github_api.py | certtools_intelmq/intelmq/bots/collectors/github_api/_collector_github_api.py | # SPDX-FileCopyrightText: 2022 Sebastian Waldbauer
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
GITHUB API Collector bot
"""
from typing import Optional
import requests
from intelmq.lib.bot import CollectorBot
static_params = {
'headers': {
'Accept': 'application/vnd.github.... | 1,450 | Python | .py | 40 | 29.125 | 111 | 0.651677 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,893 | collector_twitter.py | certtools_intelmq/intelmq/bots/collectors/twitter/collector_twitter.py | # SPDX-FileCopyrightText: 2018 Karel
#
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
Twitter Collector Bot
Extracts tweet_text from tweets and follows urls in supported_sources.
Url text and tweet text are sent separately.
Parameters:
feed - feed name (Twitter)
tweet_count : int default 20
target_t... | 4,580 | Python | .py | 110 | 31.436364 | 95 | 0.607063 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,894 | collector.py | certtools_intelmq/intelmq/bots/collectors/tcp/collector.py | # SPDX-FileCopyrightText: 2018 Edvard Rejthar
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
import socket
import struct
from intelmq.lib.bot import CollectorBot
class TCPCollectorBot(CollectorBot):
"""Receive events by opening a TCP port (ex: from TCP Output of another IntelMQ instance... | 2,379 | Python | .py | 61 | 27.721311 | 116 | 0.559705 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,895 | collector.py | certtools_intelmq/intelmq/bots/collectors/kafka/collector.py | # SPDX-FileCopyrightText: 2020 Birger Schacht
#
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
Kafka Collector Bot
Collects information from the Apache Kafka distributed stream processing system.
Args:
topic (str): topic to collect information from
bootstrap_servers (str): the ‘host[:port]’ string of the A... | 1,884 | Python | .py | 38 | 43.631579 | 279 | 0.719672 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,896 | collector.py | certtools_intelmq/intelmq/bots/collectors/misp/collector.py | # SPDX-FileCopyrightText: 2016 kralca
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""A collector for grabbing appropriately tagged events from MISP.
Parameters:
misp_url: URL of the MISP server
misp_key: API key for accessing MISP
misp_tag_to_process: MISP tag identifying events... | 2,994 | Python | .py | 72 | 33.569444 | 90 | 0.65667 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,897 | generate-feeds-docs.py | certtools_intelmq/scripts/generate-feeds-docs.py | #!/usr/bin/env python3
# SPDX-FileCopyrightText: 2020 Sebastian Wagner, 2023 Filip Pokorný
# SPDX-License-Identifier: AGPL-3.0-or-later
# This script generates the "feeds.md" documentation page.
import codecs
import json
import os.path
from ruamel.yaml import YAML
BASEDIR = os.path.join(os.path.dirname(__file__), ... | 3,275 | Python | .py | 63 | 41.301587 | 114 | 0.588959 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,898 | generate-event-docs.py | certtools_intelmq/scripts/generate-event-docs.py | #!/usr/bin/env python3
# SPDX-FileCopyrightText: 2020 Sebastian Wagner, 2023 Filip Pokorný
# SPDX-License-Identifier: AGPL-3.0-or-later
# This script generates the "event.md" documentation page.
import codecs
import json
import os.path
from ruamel.yaml import YAML
BASEDIR = os.path.join(os.path.dirname(__file__), ... | 15,573 | Python | .py | 157 | 96.726115 | 477 | 0.609307 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
39,899 | fix-dnspython-name.patch | certtools_intelmq/debian/patches/fix-dnspython-name.patch | Description: Undo rename of the dependency dnspython3
The packages was renamed upstream; however, this change does not immediately
affect this package's target distributions.
Author: Gernot Schulz <gernot@intevation.de>
Last-Update: 2016-10-04
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- ... | 560 | Python | .pyt | 17 | 30.705882 | 77 | 0.715342 | certtools/intelmq | 963 | 295 | 206 | AGPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |