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
34,400
GenericPlayer.py
mps-youtube_yewtube/mps_youtube/players/GenericPlayer.py
import os import subprocess from .. import config from ..player import CmdPlayer # # This class can be used as a templete for new players # # NOTE: # If you're defining a new player donot forget # to name both the class and file the same as your player # class GenericPlayer(CmdPlayer): def __init__(self, playe...
1,381
Python
.py
40
27.825
71
0.532173
mps-youtube/yewtube
8,070
645
212
GPL-3.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,401
mpv.py
mps-youtube_yewtube/mps_youtube/players/mpv.py
import json import os import re import socket import subprocess import sys import tempfile import time from .. import c, config, g, paths, screen, util from ..player import CmdPlayer from ..util import not_utf8_environment mswin = os.name == "nt" class mpv(CmdPlayer): def __init__(self, player): self.pl...
11,846
Python
.py
261
31.954023
84
0.510518
mps-youtube/yewtube
8,070
645
212
GPL-3.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,402
user.py
mps-youtube_yewtube/mps_youtube/listview/user.py
from .base import ListViewItem from .. import util as u class ListUser(ListViewItem): """ Describes a user """ # pylint: disable=unused-argument def id(self, length=0): """ Returns YTID """ return self.data.get("id") def name(self, length=10): """ Returns channel name """ ...
1,030
Python
.py
27
31.148148
151
0.623872
mps-youtube/yewtube
8,070
645
212
GPL-3.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,403
songtitle.py
mps-youtube_yewtube/mps_youtube/listview/songtitle.py
from .base import ListViewItem from .. import util as u class ListSongtitle(ListViewItem): """ Describes a user """ # pylint: disable=unused-argument _checked = False _certainty = 1.0 def __init__(self, data, certainty=1.0): self._checked = True self._certainty = certainty ...
1,245
Python
.py
37
26.621622
74
0.581454
mps-youtube/yewtube
8,070
645
212
GPL-3.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,404
livestream.py
mps-youtube_yewtube/mps_youtube/listview/livestream.py
from .base import ListViewItem from .. import util class ListLiveStream(ListViewItem): """ Class exposing necessary components of a live stream """ # pylint: disable=unused-argument def ytid(self, lngt=10): """ Exposes ytid(string) """ return self.data.get("id").get("videoId") def ret...
817
Python
.py
21
32
78
0.626276
mps-youtube/yewtube
8,070
645
212
GPL-3.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,405
__init__.py
mps-youtube_yewtube/mps_youtube/listview/__init__.py
""" DOCSTING COMES HERE """ import re import math from .. import c, g, util, content from .base import ListViewItem from .user import ListUser from .livestream import ListLiveStream from .songtitle import ListSongtitle class ListView(content.PaginatedContent): """ Content Agnostic Numbered List This...
5,676
Python
.py
128
33.375
158
0.549037
mps-youtube/yewtube
8,070
645
212
GPL-3.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,406
base.py
mps-youtube_yewtube/mps_youtube/listview/base.py
class ListViewItem: """ Base class for items Used by Listview """ data = None def __init__(self, data): self.data = data def __getattr__(self, key): return self.data[key] if key in self.data.keys() else None def length(self, _=0): """ Returns length of ListView...
455
Python
.py
15
22.733333
66
0.576659
mps-youtube/yewtube
8,070
645
212
GPL-3.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,407
gen_ref_nav.py
mps-youtube_yewtube/docs/gen_ref_nav.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """Generate the code reference pages and navigation.""" from pathlib import Path import mkdocs_gen_files nav = mkdocs_gen_files.Nav() skip_files = [ (Path("mps_youtube") / "config.py"), (Path("mps_youtube") / "mpris.py"), ] skip_files.extend((Path("mps_youtube")...
1,015
Python
.py
26
34.961538
68
0.647299
mps-youtube/yewtube
8,070
645
212
GPL-3.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,408
semantic-release-python.yml
mps-youtube_yewtube/.github/workflows/semantic-release-python.yml
name: Semantic Release on: push: branches: - master jobs: release: runs-on: ubuntu-latest concurrency: release steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - name: Python Semantic Release uses: relekang/python-semantic-release@master with: ...
455
Python
.py
19
18.315789
54
0.641204
mps-youtube/yewtube
8,070
645
212
GPL-3.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,409
conf.py
mps-youtube_yewtube/doc/conf.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # mps_youtube documentation build configuration file, created by # sphinx-quickstart on Mon Apr 18 17:35:31 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this ...
11,602
Python
.py
270
41.477778
80
0.730225
mps-youtube/yewtube
8,070
645
212
GPL-3.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,410
semantic-release-python.yml
mps-youtube_yewtube/.github/workflows/semantic-release-python.yml
name: Semantic Release on: push: branches: - master jobs: release: runs-on: ubuntu-latest concurrency: release steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - name: Python Semantic Release uses: relekang/python-semantic-release@master with: ...
455
Python
.pyt
19
18.315789
54
0.641204
mps-youtube/yewtube
8,070
645
212
GPL-3.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,411
Recategorize.py
RedSiege_EyeWitness/Python/Recategorize.py
#!/usr/bin/env python3 import glob import os import sys import webbrowser from modules.helpers import strtobool from modules.db_manager import DB_Manager from modules.reporting import sort_data_and_write def open_file_input(cli_parsed): files = glob.glob(os.path.join(cli_parsed.d, 'report.html')) if len(file...
1,823
Python
.py
50
29.06
117
0.618428
RedSiege/EyeWitness
4,893
837
26
GPL-3.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,412
Search.py
RedSiege_EyeWitness/Python/Search.py
#!/usr/bin/env python import glob import os import sys import webbrowser from modules.helpers import strtobool from modules.db_manager import DB_Manager from modules.reporting import search_report def open_file_input(cli_parsed): files = glob.glob(os.path.join(cli_parsed.d, 'search.html')) if len(files) > 0...
2,013
Python
.py
56
28.553571
89
0.613532
RedSiege/EyeWitness
4,893
837
26
GPL-3.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,413
EyeWitness.py
RedSiege_EyeWitness/Python/EyeWitness.py
#!/usr/bin/env python3 import argparse import glob import os import re import shutil import signal import sys import time import webbrowser from modules import db_manager from modules import objects from modules import selenium_module from modules.helpers import class_info from modules.helpers import create_folders_c...
19,351
Python
.py
416
34.444712
118
0.571716
RedSiege/EyeWitness
4,893
837
26
GPL-3.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,414
MiktoList.py
RedSiege_EyeWitness/Python/MiktoList.py
#!/usr/bin/env python import glob import os import sys import webbrowser from modules.helpers import strtobool from modules.db_manager import DB_Manager def open_file_input(cli_parsed): files = glob.glob(os.path.join(cli_parsed.d, 'report.html')) if len(files) > 0: print('Would you like to open the r...
1,503
Python
.py
40
29.875
91
0.603153
RedSiege/EyeWitness
4,893
837
26
GPL-3.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,415
selenium_module.py
RedSiege_EyeWitness/Python/modules/selenium_module.py
import http.client import os import socket import sys import urllib.request import urllib.error import ssl try: from ssl import CertificateError as sslerr except: from ssl import SSLError as sslerr try: from selenium import webdriver from selenium.webdriver.firefox.options import Options from sele...
12,843
Python
.py
289
35.041522
134
0.63857
RedSiege/EyeWitness
4,893
837
26
GPL-3.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,416
reporting.py
RedSiege_EyeWitness/Python/modules/reporting.py
import os import sys import urllib.parse try: from fuzzywuzzy import fuzz except ImportError: print('[*] fuzzywuzzy not found.') print('[*] Please run the script in the setup directory!') sys.exit() def process_group( data, group, toc, toc_table, page_num, section, sectionid, html): ...
18,696
Python
.py
413
33.62954
177
0.520222
RedSiege/EyeWitness
4,893
837
26
GPL-3.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,417
objects.py
RedSiege_EyeWitness/Python/modules/objects.py
import html import os import re from modules.helpers import strip_nonalphanum class HTTPTableObject(object): """docstring for HTTPTableObject""" def __init__(self): super(HTTPTableObject, self).__init__() self._id = None self._screenshot_path = None self._http_headers = {} ...
14,843
Python
.py
373
29.589812
116
0.546643
RedSiege/EyeWitness
4,893
837
26
GPL-3.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,418
db_manager.py
RedSiege_EyeWitness/Python/modules/db_manager.py
import pickle import sqlite3 from modules.objects import HTTPTableObject from modules.objects import UAObject from modules.helpers import default_creds_category class DB_Manager(object): """docstring for DB_Manager""" def __init__(self, dbpath): super(DB_Manager, self).__init__() self._dbpa...
7,854
Python
.py
199
28.442211
97
0.549436
RedSiege/EyeWitness
4,893
837
26
GPL-3.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,419
helpers.py
RedSiege_EyeWitness/Python/modules/helpers.py
# -*- coding: utf-8 -*- import hashlib import os import platform import random import shutil import sys import time import xml.sax import glob import socket from netaddr import IPAddress from netaddr.core import AddrFormatError from urllib.parse import urlparse class XML_Parser(xml.sax.ContentHandler): def __in...
31,002
Python
.py
635
34.72126
174
0.508964
RedSiege/EyeWitness
4,893
837
26
GPL-3.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,420
setup.py
guelfoweb_knock/setup.py
from setuptools import setup import os wordlist = 'wordlist' + os.sep + 'wordlist.txt' setup( name='knock-subdomains', version='7.0.1', description='Domain Inspector Global Audit', url='https://github.com/guelfoweb/knock', author='Gianni Amato', author_email='guelfoweb@gmail.com', license=...
672
Python
.py
21
27.095238
125
0.639445
guelfoweb/knock
3,834
853
71
GPL-3.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,421
knockpy.py
guelfoweb_knock/knockpy.py
#!/usr/bin/python3 # -*- coding: utf-8 -*- import os import sys from knockpy import knockpy def main(): knockpy.main() if __name__ == "__main__": try: main() except KeyboardInterrupt: print("\nInterrupted") try: sys.exit(0) except SystemExit: os._...
327
Python
.py
16
14.9375
30
0.563518
guelfoweb/knock
3,834
853
71
GPL-3.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,422
poc.py
guelfoweb_knock/tests/poc.py
from knock import KNOCKPY domain = 'github.com' results = KNOCKPY(domain, dns=None, useragent=None, timeout=None, threads=None, recon=True, bruteforce=True, wordlist=None) print (results)
190
Python
.py
4
46
123
0.793478
guelfoweb/knock
3,834
853
71
GPL-3.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,423
knockpy.py
guelfoweb_knock/knock/knockpy.py
#!/usr/bin/env python3 from datetime import datetime, date import concurrent.futures import dns.resolver import OpenSSL import ssl import requests import argparse import random import string import json import bs4 import sys import os import re from tqdm.auto import tqdm import warnings from urllib3.exceptions import ...
18,543
Python
.py
402
33.970149
151
0.567622
guelfoweb/knock
3,834
853
71
GPL-3.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,424
setup.py
emirozer_fake2db/setup.py
from setuptools import setup, find_packages import os setup( name='fake2db', version='0.5.4', author='Emir Ozer', author_email='emirozer@yandex.com', url='https://github.com/emirozer/fake2db', description= 'Generate test databases filled with fake data (NOW CUSTOM SCHEMA CREATION SUPPORTED)...
991
Python
.py
25
33.96
161
0.667358
emirozer/fake2db
2,274
119
7
GPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,425
mysql_handler.py
emirozer_fake2db/fake2db/mysql_handler.py
import sys from .base_handler import BaseHandler from .custom import faker_options_container from .helpers import fake2db_logger, str_generator, rnd_id_generator logger, extra_information = fake2db_logger() try: import mysql.connector except ImportError: logger.error( 'MySql Connector/Python not foun...
12,387
Python
.py
244
36.565574
121
0.559044
emirozer/fake2db
2,274
119
7
GPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,426
postgresql_handler.py
emirozer_fake2db/fake2db/postgresql_handler.py
import psycopg2 import sys from .base_handler import BaseHandler from .custom import faker_options_container from .helpers import fake2db_logger, str_generator from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT logger, extra_information = fake2db_logger() d = extra_information class Fake2dbPostgresqlHandler(...
10,089
Python
.py
196
37.841837
133
0.574449
emirozer/fake2db
2,274
119
7
GPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,427
base_handler.py
emirozer_fake2db/fake2db/base_handler.py
import sys from .helpers import fake2db_logger logger, extra_information = fake2db_logger() d = extra_information try: from faker import Factory except ImportError: logger.error('faker package not found onto python packages, please run : \ pip install -r requirements.txt \ on the root of the project'...
1,135
Python
.py
29
31.275862
121
0.645132
emirozer/fake2db
2,274
119
7
GPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,428
fake2db.py
emirozer_fake2db/fake2db/fake2db.py
import argparse import getpass import subprocess import time import sys from .custom import faker_options_container from .helpers import fake2db_logger logger, extra_information = fake2db_logger() class InstantiateDBHandlerException(Exception): '''An Exception at the instantiation of the handler ''' class Miss...
9,438
Python
.py
200
35.885
212
0.62371
emirozer/fake2db
2,274
119
7
GPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,429
sqlite_handler.py
emirozer_fake2db/fake2db/sqlite_handler.py
import sqlite3 import sys from .base_handler import BaseHandler from .custom import faker_options_container from .helpers import fake2db_logger, str_generator, rnd_id_generator logger, extra_information = fake2db_logger() d = extra_information class DbConnException(Exception): """Database Connection or Creation ...
8,241
Python
.py
174
34.41954
130
0.580146
emirozer/fake2db
2,274
119
7
GPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,430
__init__.py
emirozer_fake2db/fake2db/__init__.py
# -*- coding: utf-8 -*- """ fake2db ~~~~~~~~ """ __title__ = 'fake2db' __version__ = '0.5.4' __author__ = 'Emir Ozer' __license__ = 'GNU General Public License v2'
166
Python
.py
9
17.222222
45
0.548387
emirozer/fake2db
2,274
119
7
GPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,431
redis_handler.py
emirozer_fake2db/fake2db/redis_handler.py
import redis import sys from .base_handler import BaseHandler from .custom import faker_options_container from .helpers import fake2db_logger, rnd_id_generator logger, extra_information = fake2db_logger() d = extra_information class Fake2dbRedisHandler(BaseHandler): def fake2db_redis_initiator(self, host, port...
6,130
Python
.py
134
31.880597
100
0.544715
emirozer/fake2db
2,274
119
7
GPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,432
mongodb_handler.py
emirozer_fake2db/fake2db/mongodb_handler.py
import pymongo import sys from .base_handler import BaseHandler from .custom import faker_options_container from .helpers import fake2db_logger, str_generator, rnd_id_generator logger, extra_information = fake2db_logger() d = extra_information class Fake2dbMongodbHandler(BaseHandler): def fake2db_mongodb_initi...
7,089
Python
.py
144
33.263889
100
0.532378
emirozer/fake2db
2,274
119
7
GPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,433
custom.py
emirozer_fake2db/fake2db/custom.py
def faker_options_container(): ''' Following dictionary is mapped with fake-factory providers, so that custom db creation be made with faker. for detailed info for providers: http://fake-factory.readthedocs.org/en/latest/# ''' faker_options = {"name_male": "varchar(200)", ...
7,328
Python
.py
147
29.095238
70
0.400809
emirozer/fake2db
2,274
119
7
GPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,434
helpers.py
emirozer_fake2db/fake2db/helpers.py
import logging import getpass import string import random import uuid def fake2db_logger(): '''creates a logger obj''' # Pull the local ip and username for meaningful logging username = getpass.getuser() # Set the logger FORMAT = '%(asctime)-15s %(user)-8s %(message)s' logging.basicConfig...
984
Python
.py
30
28.6
75
0.68259
emirozer/fake2db
2,274
119
7
GPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,435
couchdb_handler.py
emirozer_fake2db/fake2db/couchdb_handler.py
import couchdb import sys from .base_handler import BaseHandler from .custom import faker_options_container from .helpers import fake2db_logger, lower_str_generator, rnd_id_generator logger, extra_information = fake2db_logger() d = extra_information class Fake2dbCouchdbHandler(BaseHandler): def fake2db_couchdb_...
6,778
Python
.py
156
28.942308
99
0.525862
emirozer/fake2db
2,274
119
7
GPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,436
vpn_duo_auth_failures.py
mozilla_MozDef/alerts/vpn_duo_auth_failures.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.qu...
1,883
Python
.py
35
46.114286
105
0.674102
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,437
http_errors.py
mozilla_MozDef/alerts/http_errors.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2017 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.qu...
1,420
Python
.py
31
38.516129
97
0.669811
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,438
ldap_bruteforce_user.py
mozilla_MozDef/alerts/ldap_bruteforce_user.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.q...
1,810
Python
.py
35
43.657143
118
0.663832
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,439
triagebot_escalation.py
mozilla_MozDef/alerts/triagebot_escalation.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2017 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.qu...
1,526
Python
.py
32
40.21875
168
0.674309
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,440
cloudtrail_logging_disabled.py
mozilla_MozDef/alerts/cloudtrail_logging_disabled.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2017 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.qu...
1,160
Python
.py
24
41.583333
108
0.693606
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,441
bugzilla_auth_bruteforce.py
mozilla_MozDef/alerts/bugzilla_auth_bruteforce.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2017 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.qu...
1,416
Python
.py
31
38.419355
97
0.672
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,442
alert_actions_worker.py
mozilla_MozDef/alerts/alert_actions_worker.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation # # Alert Worker to listen for alerts and call python ac...
4,918
Python
.py
121
31.809917
99
0.643681
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,443
generic_alert_loader.py
mozilla_MozDef/alerts/generic_alert_loader.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2017 Mozilla Corporation # TODO: Dont use query_models, nicer fixes for AlertTas...
7,596
Python
.py
160
37.40625
145
0.613234
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,444
session_opened_sensitive_user.py
mozilla_MozDef/alerts/session_opened_sensitive_user.py
#!/usr/bin/env python # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation # # This code alerts on every successfully opened sessi...
2,611
Python
.py
51
42.509804
182
0.650943
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,445
write_audit.py
mozilla_MozDef/alerts/write_audit.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation # # This code alerts on every successfully opened sessio...
2,158
Python
.py
46
38.413043
92
0.631253
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,446
proxy_drop_executable.py
mozilla_MozDef/alerts/proxy_drop_executable.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.q...
2,049
Python
.py
42
40.404762
129
0.657802
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,447
http_auth_bruteforce.py
mozilla_MozDef/alerts/http_auth_bruteforce.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2017 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.qu...
1,407
Python
.py
31
38.16129
97
0.67008
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,448
ldap_group.py
mozilla_MozDef/alerts/ldap_group.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.qu...
1,628
Python
.py
40
33.025
82
0.655675
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,449
deadman_generic.py
mozilla_MozDef/alerts/deadman_generic.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation from lib.deadman_alerttask import DeadmanAlertTask fro...
2,303
Python
.py
47
40.191489
103
0.663697
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,450
bruteforce_ssh.py
mozilla_MozDef/alerts/bruteforce_ssh.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2017 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.qu...
2,058
Python
.py
38
46.315789
102
0.670817
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,451
ssh_lateral.py
mozilla_MozDef/alerts/ssh_lateral.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2017 Mozilla Corporation from lib.alerttask import AlertTask, add_hostname_to_ip...
6,136
Python
.py
149
32.302013
142
0.570568
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,452
get_watchlist.py
mozilla_MozDef/alerts/get_watchlist.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation import requests import json from lib.alerttask import...
3,034
Python
.py
70
33.071429
115
0.588953
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,453
auth0_bruteforce_user.py
mozilla_MozDef/alerts/auth0_bruteforce_user.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.q...
1,794
Python
.py
35
40.514286
137
0.622998
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,454
nsm_scan_port.py
mozilla_MozDef/alerts/nsm_scan_port.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2018 Mozilla Corporation from lib.alerttask import AlertTask, add_hostname_to_ip...
1,985
Python
.py
40
41.175
102
0.650646
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,455
multiple_intel_hits.py
mozilla_MozDef/alerts/multiple_intel_hits.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.qu...
3,113
Python
.py
51
49.803922
124
0.612787
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,456
trace_audit.py
mozilla_MozDef/alerts/trace_audit.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation # # This code alerts on every successfully opened sessio...
1,486
Python
.py
32
39.21875
92
0.672211
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,457
guard_duty_probe.py
mozilla_MozDef/alerts/guard_duty_probe.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.q...
1,750
Python
.py
34
44.088235
98
0.691271
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,458
proxy_drop_ip.py
mozilla_MozDef/alerts/proxy_drop_ip.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.q...
2,644
Python
.py
59
35.186441
122
0.61215
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,459
nsm_scan_address.py
mozilla_MozDef/alerts/nsm_scan_address.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2018 Mozilla Corporation from lib.alerttask import AlertTask, add_hostname_to_ip...
1,856
Python
.py
37
41.864865
102
0.656164
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,460
ssh_access.py
mozilla_MozDef/alerts/ssh_access.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2017 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.qu...
1,813
Python
.py
42
34.261905
101
0.628198
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,461
ldap_add.py
mozilla_MozDef/alerts/ldap_add.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.qu...
1,314
Python
.py
30
36.6
111
0.661695
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,462
proxy_drop_non_standard_port.py
mozilla_MozDef/alerts/proxy_drop_non_standard_port.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.q...
1,941
Python
.py
39
41.153846
126
0.661196
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,463
proxy_exfil_domains.py
mozilla_MozDef/alerts/proxy_exfil_domains.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.q...
2,042
Python
.py
38
45.947368
132
0.678894
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,464
ssh_bruteforce_bro.py
mozilla_MozDef/alerts/ssh_bruteforce_bro.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2017 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.qu...
1,378
Python
.py
31
37.16129
97
0.663174
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,465
old_events.py
mozilla_MozDef/alerts/old_events.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2017 Mozilla Corporation # # Looks for events that have an old timestamp # which ...
1,274
Python
.py
26
43.923077
88
0.735057
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,466
geomodel_location.py
mozilla_MozDef/alerts/geomodel_location.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2015 Mozilla Corporation from datetime import datetime, timedelta import hjson i...
7,272
Python
.py
162
33.209877
90
0.600057
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,467
deadman.py
mozilla_MozDef/alerts/deadman.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2017 Mozilla Corporation # # a collection of alerts looking for the lack of event...
1,688
Python
.py
36
38.694444
94
0.656917
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,468
duo_authfail.py
mozilla_MozDef/alerts/duo_authfail.py
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2017 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.query_models import Searc...
1,703
Python
.py
36
38.833333
153
0.656212
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,469
duo_fail_open.py
mozilla_MozDef/alerts/duo_fail_open.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation # # This script alerts when openvpn's duo security faile...
1,796
Python
.py
33
48.393939
117
0.715916
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,470
auth0_vertical_password_guessing.py
mozilla_MozDef/alerts/auth0_vertical_password_guessing.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.q...
2,040
Python
.py
42
39.880952
144
0.655259
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,471
promisc_kernel.py
mozilla_MozDef/alerts/promisc_kernel.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation # # This code alerts on every successfully opened sessio...
1,343
Python
.py
29
39.413793
98
0.683807
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,472
ssh_access_signreleng.py
mozilla_MozDef/alerts/ssh_access_signreleng.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2017 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.qu...
2,906
Python
.py
58
40.086207
131
0.627603
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,473
nsm_scan_random.py
mozilla_MozDef/alerts/nsm_scan_random.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2018 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.qu...
1,725
Python
.py
36
39.861111
102
0.656939
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,474
ldap_lockout.py
mozilla_MozDef/alerts/ldap_lockout.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.qu...
1,195
Python
.py
27
37.333333
83
0.67931
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,475
ldap_delete.py
mozilla_MozDef/alerts/ldap_delete.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.qu...
1,322
Python
.py
30
36.866667
113
0.663807
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,476
promisc_audit.py
mozilla_MozDef/alerts/promisc_audit.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation # # This code alerts on every successfully opened sessio...
1,270
Python
.py
29
36.931034
92
0.675873
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,477
auditd_sftp.py
mozilla_MozDef/alerts/auditd_sftp.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.qu...
1,626
Python
.py
38
34.368421
105
0.629278
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,478
ssl_blacklist_hit.py
mozilla_MozDef/alerts/ssl_blacklist_hit.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.qu...
1,342
Python
.py
30
37.4
79
0.670507
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,479
config.py
mozilla_MozDef/alerts/lib/config.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation from celery.schedules import crontab, timedelta import ...
2,093
Python
.py
70
24.214286
108
0.585778
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,480
alerttask.py
mozilla_MozDef/alerts/lib/alerttask.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2017 Mozilla Corporation import collections import json import kombu import os i...
20,453
Python
.py
492
30.575203
116
0.585357
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,481
tasks.py
mozilla_MozDef/alerts/lib/tasks.py
from celery import Celery from lib.celery_scheduler import celery_config from lib.celery_scheduler.celery_rest_client import CeleryRestClient app = Celery("alerts") app.config_from_object(celery_config, force=True) celery_rest = CeleryRestClient() celery_rest.load_and_register_alerts() if __name__ == "__main__": ...
334
Python
.py
9
35.222222
68
0.785047
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,482
deadman_alerttask.py
mozilla_MozDef/alerts/lib/deadman_alerttask.py
from .alerttask import AlertTask class DeadmanAlertTask(AlertTask): def executeSearchEventsSimple(self): # We override this method to specify the size as 1 # since we only care about if ANY events are found or not results = self.main_query.execute(self.es, indices=self.event_indices, size...
347
Python
.py
7
43
86
0.732938
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,483
alert_plugin_set.py
mozilla_MozDef/alerts/lib/alert_plugin_set.py
from mozdef_util.plugin_set import PluginSet class AlertPluginSet(PluginSet): def send_message_to_plugin(self, plugin_class, message, metadata=None): return plugin_class.onMessage(message), metadata
214
Python
.py
4
48.75
75
0.78744
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,484
celery_config.py
mozilla_MozDef/alerts/lib/celery_scheduler/celery_config.py
import os from logging.config import dictConfig from lib.config import LOGGING, RABBITMQ, RESTAPI_URL, RESTAPI_TOKEN # XXX TBD this should get wrapped into an object that provides pyconfig if os.getenv("OPTIONS_MQPROTOCOL", "amqp") == "sqs": BROKER_URL = "sqs://@" BROKER_TRANSPORT_OPTIONS = {'region': os.get...
1,356
Python
.py
32
38.9375
126
0.714719
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,485
celery_rest_client.py
mozilla_MozDef/alerts/lib/celery_scheduler/celery_rest_client.py
from celery.utils.log import get_logger from celery import current_app from requests_jwt import JWTAuth import requests import json from importlib import import_module from celery.schedules import crontab, timedelta from mozdef_util.utilities.logger import logger from lib.config import ALERTS, RESTAPI_URL from .perio...
4,888
Python
.py
89
42.505618
134
0.612074
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,486
alert_schedule_entry.py
mozilla_MozDef/alerts/lib/celery_scheduler/alert_schedule_entry.py
# Copyright 2013 Regents of the University of Michigan # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy # of the License at http://www.apache.org/licenses/LICENSE-2.0 # Vendored and modified from https://github.c...
2,728
Python
.py
62
35.306452
101
0.622499
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,487
alerts_scheduler.py
mozilla_MozDef/alerts/lib/celery_scheduler/alerts_scheduler.py
# Copyright 2013 Regents of the University of Michigan # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy # of the License at http://www.apache.org/licenses/LICENSE-2.0 # Vendored and modified from https://github.c...
3,383
Python
.py
74
37.337838
115
0.646916
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,488
periodic_task.py
mozilla_MozDef/alerts/lib/celery_scheduler/periodic_task.py
# Copyright 2013 Regents of the University of Michigan # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy # of the License at http://www.apache.org/licenses/LICENSE-2.0 import datetime import celery.schedules from ...
4,871
Python
.py
141
24.624113
89
0.565264
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,489
config.py
mozilla_MozDef/alerts/geomodel/config.py
from typing import List, NamedTuple # TODO: Switch to dataclasses when we move to Python3.7+ class Localities(NamedTuple): '''Contains configuration for working with locality state. ''' es_index: str valid_duration_days: int radius_kilometres: float class Events(NamedTuple): '''Contains co...
1,273
Python
.py
39
27.974359
76
0.730864
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,490
locality.py
mozilla_MozDef/alerts/geomodel/locality.py
import math from datetime import datetime, timedelta from typing import Any, Callable, Dict, List, NamedTuple, Optional from mozdef_util.elasticsearch_client import ElasticsearchClient as ESClient from mozdef_util.utilities.toUTC import toUTC from mozdef_util.query_models import SearchQuery, TermMatch # Default radi...
7,922
Python
.py
193
33.580311
79
0.650412
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,491
execution.py
mozilla_MozDef/alerts/geomodel/execution.py
from datetime import datetime from typing import Callable, NamedTuple, Optional from mozdef_util.elasticsearch_client import ElasticsearchClient as ESClient from mozdef_util.query_models import SearchQuery, TermMatch from mozdef_util.utilities.toUTC import toUTC _TYPE_NAME = 'execution_state' class ExecutionState(...
2,879
Python
.py
65
37.938462
78
0.69734
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,492
factors.py
mozilla_MozDef/alerts/geomodel/factors.py
from typing import Callable, List, NamedTuple from functools import reduce from .alert import Alert class Enhancement(NamedTuple): '''Information to enhance an `Alert` with, produced by an implementation of a `FactorInterface`. The `pipe` function handles constructing a modified `Alert` with enhancement...
2,734
Python
.py
62
36.774194
79
0.664781
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,493
alert.py
mozilla_MozDef/alerts/geomodel/alert.py
from datetime import datetime import math from operator import attrgetter from typing import List, NamedTuple, Optional from .locality import Coordinates, Locality, distance as geo_distance _AIR_TRAVEL_SPEED = 277.778 # m/s # TODO: Switch to dataclasses when we move to Python3.7+ class Origin(NamedTuple): ''...
4,320
Python
.py
117
30.606838
82
0.645999
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,494
pagerduty.py
mozilla_MozDef/alerts/actions/pagerduty.py
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation import requests import hjson import os from mozdef_util.utilities.logger impo...
2,959
Python
.py
69
30.898551
123
0.557719
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,495
triage_bot.py
mozilla_MozDef/alerts/actions/triage_bot.py
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation from datetime import datetime, timedelta from enum import Enum import json imp...
23,264
Python
.py
587
31.660988
85
0.640496
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,496
block_ip.py
mozilla_MozDef/alerts/actions/block_ip.py
import requests import json import os from configlib import getConfig, OptionParser from requests_jwt import JWTAuth class message(object): def __init__(self): ''' takes an incoming alert and triggers the block ip rest api endpoint ''' self.configfile = os.path.join(os.pat...
2,004
Python
.py
45
35.733333
140
0.625512
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,497
ipaddr.py
mozilla_MozDef/alerts/plugins/ipaddr.py
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation import netaddr def isIPv4(ip): try: return netaddr.valid_ipv4(ip...
5,173
Python
.py
98
36.540816
131
0.541807
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,498
dhcp_assignment.py
mozilla_MozDef/alerts/plugins/dhcp_assignment.py
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2017 Mozilla Corporation import json import os import typing from lib.config import ES from mozdef_ut...
5,138
Python
.py
124
34.66129
79
0.645791
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)
34,499
ip_source_enrichment.py
mozilla_MozDef/alerts/plugins/ip_source_enrichment.py
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation import json from operator import add import os import re import functools imp...
4,639
Python
.py
114
33.394737
676
0.565634
mozilla/MozDef
2,167
327
0
MPL-2.0
9/5/2024, 5:15:03 PM (Europe/Amsterdam)