text
stringlengths
0
9.3M
# Copyright (C) 2015 KillerInstinct # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in...
# Copyright (C) 2014 Optiv, Inc. (brad.spengler@optiv.com) # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. from lib.cuckoo.common.abstracts import Signature import struct class Virus(Signature): name = "virus" description = "Likely vir...
# Copyright (C) 2019 ditekshen # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the ...
# Copyright (C) 2019 ditekshen # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the ...
# Copyright (C) 2010-2013 Cuckoo Sandbox Developers. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. from lib.cuckoo.common.abstracts import Signature class VolMalfind1(Signature): name = "volatility_malfind_1" description = "Malfind ...
# Copyright (C) 2015 KillerInstinct # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in...
# Copyright (C) 2015 KillerInstinct # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. from lib.cuckoo.common.abstracts import Signature class UsesWindowsUtilitiesScheduler(Signature): name = "uses_windows_utilities_to_create_schedu...
# Copyright (C) 2019 Kevin Ross # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the...
# Copyright (C) 2019 ditekshen # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the ...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission.
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import os import tempfile from nose.tools import assert_equals, raises import lib.cuckoo.common.abstracts as abstracts from lib.cuckoo.common.config i...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. from nose.tools import assert_equals from lib.cuckoo.common.colors import color def test_return_text(): """Test colorized text contains the inpu...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import tempfile from nose.tools import assert_equals, raises from lib.cuckoo.common.config import Config from lib.cuckoo.common.exceptions import Cuck...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import tempfile from sqlalchemy.exc import OperationalError from nose.tools import assert_equal, raises from lib.cuckoo.core.database import Database...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. from nose.tools import assert_true, assert_false, assert_equal import email import tempfile from lib.cuckoo.common.email_utils import find_attachments...
#!/usr/bin/env python """ Checks the integrity of one or more virtual machine(s). In order to ensure that there are no remaining tasks in the queue this utility will clean the entire database before starting various analyses. """ import argparse import json import logging import os.path import subprocess import sys imp...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import os import tempfile import copy from nose.tools import assert_equal, raises, assert_not_equal from lib.cuckoo.common.objects import Dictionary, ...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import os import tempfile from nose.tools import assert_equals from lib.cuckoo.common.constants import CUCKOO_VERSION from lib.cuckoo.common.abstracts...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import os import tempfile from nose.tools import assert_equals from lib.cuckoo.common.abstracts import Report from lib.cuckoo.common.config import Con...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. from nose.tools import assert_equals
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import os import tempfile from nose.tools import assert_equal, raises, assert_not_equal from lib.cuckoo.common.objects import File import lib.cuckoo.c...
#!/usr/bin/env python # Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import argparse import json import os import socket import sys import tarfile from datetime import datetime from StringIO import ...
# Copyright (C) 2010-2015 KillerInstinct # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import os import sys import shutil import logging import argparse from multiprocessing.pool import ThreadPool CUCKOO_ROOT = os.path.join(os.path.abspath(o...
#!/usr/bin/env python # Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import os import sys import time import logging import argparse import signal import multiprocessing log = logging.getLogger() ...
# encoding: utf-8 #!/usr/bin/env python # Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import os import sys import time import json jdec = json.JSONDecoder() import shutil import Queue import hashli...
#!/usr/bin/env python # Copyright (C) 2015 Optiv, Inc. (brad.spengler@optiv.com) # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import os import sys import struct PAGE_EXECUTE_READWRITE = 0x40 def main(): if len(sys.argv) != 2: p...
#!/usr/bin/env python # Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import argparse import logging import os.path import sys sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__))...
#!/usr/bin/env python # Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import os import sys import time import json import logging import argparse import signal import multiprocessing log = logging.g...
#!/usr/bin/env python # Copyright (C) 2014-2016 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import argparse import grp import json import logging.handlers import os.path import socket import stat import subprocess import ...
import os import sys import pymongo CUCKOO_ROOT = os.path.join(os.path.abspath(os.path.dirname(__file__)), "..") sys.path.append(CUCKOO_ROOT) from lib.cuckoo.common.config import Config from lib.cuckoo.core.database import Database repconf = Config("reporting") if len(sys.argv) == 2: db = Database() paths =...
#!/usr/bin/env python # Copyright (C) 2014-2016 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import os import sys import logging import asyncore import argparse import smtplib from email.MIMEMultipart import MIMEMultipart...
#!/usr/bin/env python # Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import os.path import sys import time sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)), "..")) from lib....
#!/usr/bin/env python # Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import argparse import fnmatch import logging import os import random import sys try: import requests HAVE_REQUESTS = Tr...
#!/usr/bin/python # Copyright 2015 Optiv, Inc. (brad.spengler@optiv.com) # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import sys import os import time iface = "" for idx, arg in enumerate(sys.argv): if arg == "-i" and idx < len(sys.arg...
#!/usr/bin/env python #-------------------------------------------------------------------------- # Name: tridupdate.py # Purpose: TrID's definitions package updater # # Authors: Marco Pontello - first release # Chenfeng Bao - added compatibility with Python 2.x & 3.x # # Created: 20/05...
#!/usr/bin/env python # Copyright (C) 2016 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import argparse import fcntl import os import socket import struct import sys sys.path.append(os.path.join(os.path.abspath(os.path.di...
#!/usr/bin/env python # Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import os import sys import time import logging import argparse import zipfile from datetime import datetime, timedelta try: ...
#!/usr/bin/env python # Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import os import sys import time import logging import argparse import signal import multiprocessing try: import yara HA...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. from __future__ import with_statement import os.path import sys from alembic import context from sqlalchemy import create_engine, pool from logging.c...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. #https://www.pythoncentral.io/migrate-sqlalchemy-databases-alembic/ """add_sample_parent Revision ID: 36926b59dfbb Revises: 3c8bf4133b44 Create Date:...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. """Add shrike and Parent ID Columns Revision ID: f111620bb8 Revises: 4b09c454108c Create Date: 2015-03-29 08:43:11.468664 """ # revision identifiers,...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. """Database migration from Cuckoo 0.6 to Cuckoo 1.1. Revision ID: 263a45963c72 Revises: None Create Date: 2014-03-23 23:30:36.756792 """ # Revision ...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. """Database migration from Cuckoo 1.1 to Cuckoo 1.2. Added failed statuses to tasks. Revision ID: 495d5a6edef3 Revises: 18eee46c6f81 Create Date: 2015-...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. """Database migration from Cuckoo 0.6 to Cuckoo 1.1. Extend sample's file-type field. Revision ID: 18eee46c6f81 Revises: 263a45963c72 Create Date: 201...
# Copyright (C) 2015 Optiv, Inc. (brad.spengler@optiv.com), KillerInstinct, Cuckoo Foundation # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. """add statistics Revision ID: 4b09c454108c Revises: 495d5a6edef3 Create Date: 2015-03-05 07:39:21.03...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. """options_255_to_1014 Revision ID: 30d0230de7cd Revises: 36926b59dfbb Create Date: 2019-10-11 11:00:31.364356 """ # revision identifiers, used by A...
# Copyright (C) 2016 Brad Spengler # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. """Proper indexing Revision ID: 3c8bf4133b44 Revises: f111620bb8 Create Date: 2016-05-13 11:04:41.685468 """ # revision identifiers, used by Alembic. revision...
#!/usr/bin/env python # Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "web.settings") from dj...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. from django import forms from submission.models import Comment, Tag class CommentForm(forms.ModelForm): class Meta: model = Comment ...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file "docs/LICENSE" for copying permission. from django.conf.urls import url from analysis import views urlpatterns = [ url(r"^$", views.index, name='analysis'), url(r"^page/(?P<page>\d+...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import sys try: import re2 as re except ImportError: import re import datetime import os import shutil import json import zipfile import tem...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission.
try: import re2 as re except ImportError: import re from django.template.defaultfilters import register from collections import OrderedDict @register.filter("mongo_id") def mongo_id(value): """Retrieve _id value. @todo: it will be removed in future. """ if isinstance(value, dict): if v...
from lib.cuckoo.common.utils import convert_to_printable from django.template.defaultfilters import register from collections import deque @register.filter("endswith") def endswith(value, thestr): return value.endswith(thestr) @register.filter("proctreetolist") def proctreetolist(tree): stack = deque(tree) ...
from django import template register = template.Library() @register.filter(name="getkey") def getkey(mapping, value): return mapping.get(value, '')
from django import template register = template.Library() @register.filter(name="datefmt") def datefmt(value): formatted = value[2:6] + "/" + value[6:8] + "/" + value[8:10] + " " + \ value[10:12] + ":" + value[12:14] + ":" + value[14:16] + \ " GMT" + value[16:19] return formatte...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission.
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file "docs/LICENSE" for copying permission. from django.conf.urls import url from api import views urlpatterns = [ url(r"^$", views.index, name='api'), url(r"^tasks/create/file/$", views...
import json import os import socket import sys import tarfile from datetime import datetime, timedelta import random import tempfile import requests from zlib import decompress import subprocess from django.conf import settings from wsgiref.util import FileWrapper from django.http import HttpResponse, StreamingHttpRes...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file "docs/LICENSE" for copying permission. from django.conf.urls import url from compare import views urlpatterns = [ url(r"^(?P<left_id>\d+)/$", views.left, name='compare_left'), url(r...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import sys from django.conf import settings from django.shortcuts import render from django.views.decorators.http import require_safe from django.cont...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file "docs/LICENSE" for copying permission.
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file "docs/LICENSE" for copying permission. from django.conf.urls import url from dashboard import views urlpatterns = [ url(r"^$", views.index), ]
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import sys import time from django.conf import settings from django.http import HttpResponse from django.shortcuts import render from django.views.dec...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. from django.conf.urls import url from submission import views urlpatterns = [ url(r"^$", views.index, name='submission'), url(r"^resubmit/(?P<...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import os import sys import requests import tempfile import random try: import re2 as re except ImportError: import re from django.conf impo...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission.
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import sys from django.conf import settings sys.path.append(settings.CUCKOO_PATH) from lib.cuckoo.common.constants import CUCKOO_VERSION class Cuck...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. LOCAL_SETTINGS = True from settings import * # If you want to customize your cuckoo path set it here. # CUCKOO_PATH = "/where/cuckoo/is/placed/" # Ma...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import sys import os try: import re2 as re except ImportError: import re # Cuckoo path. CUCKOO_PATH = os.path.join(os.getcwd(), "..") sys.pat...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. from django.conf.urls import include, url from django.contrib import admin from django.contrib.auth import views as auth_views from dashboard import v...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. """ WSGI config for web project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission.
#!/usr/bin/env python # Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import argparse import logging import os import sys from pathlib import Path from lib.cuckoo.core.database import Database, init...
#!/usr/bin/env python3 # Copyright (C) 2021- doomedraven # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This pro...
# Copyright (C) 2010-2019 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import argparse import base64 import cgi import enum import http.server import ipaddress import json import os import platform import random import shl...
"""Tests for the agent.""" import base64 import datetime import io import json import multiprocessing import os import pathlib import random import shutil import subprocess import sys import tempfile import time import unittest import uuid import zipfile from typing import Optional from unittest import mock from urlli...
"""Ensure our version check and architecture check function as desired.""" import sys import pytest def test_32_bit(monkeypatch): with monkeypatch.context() as m: # Unload "agent" module if previously imported. sys.modules.pop("agent", None) m.setattr(sys, "maxsize", 2**64) m.set...
# Copyright (C) 2015-2017 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import datetime import hashlib import logging import os import pkgutil import re import sys import tempfile import time import traceback import zipfile...
import enum import os from .errors import AuthError # The auth interface here is unstable. I would like to eventually open this up # for people to define their own custom authentication protocols, but I'm not # familiar with what's needed for that exactly. To work with any message bus # implementation would require a...
from enum import Enum, IntFlag class BusType(Enum): """An enum that indicates a type of bus. On most systems, there are normally two different kinds of buses running. """ SESSION = 1 #: A bus for the current graphical user session. SYSTEM = 2 #: A persistent bus for the whole machine. class M...
class SignatureBodyMismatchError(ValueError): pass class InvalidSignatureError(ValueError): pass class InvalidAddressError(ValueError): pass class AuthError(Exception): pass class InvalidMessageError(ValueError): pass class InvalidIntrospectionError(ValueError): pass class InterfaceN...
import xml.etree.ElementTree as ET from typing import List, Union from .constants import ArgDirection, PropertyAccess from .errors import InvalidIntrospectionError from .signature import SignatureTree, SignatureType from .validators import assert_interface_name_valid, assert_member_name_valid # https://dbus.freedeskt...
from typing import Any, List from ._private.constants import LITTLE_ENDIAN, PROTOCOL_VERSION, HeaderField from ._private.marshaller import Marshaller from .constants import ErrorType, MessageFlag, MessageType from .errors import InvalidMessageError from .signature import SignatureTree, Variant from .validators import ...
import inspect import logging import socket import traceback import xml.etree.ElementTree as ET from typing import Callable, Optional, Type, Union from . import introspection as intr from ._private.address import get_bus_address, parse_address from ._private.util import replace_fds_with_idx, replace_idx_with_fds from ...
import asyncio import inspect import logging import re import xml.etree.ElementTree as ET from typing import Coroutine, List, Type, Union from . import introspection as intr from . import message_bus from ._private.util import replace_idx_with_fds from .constants import ErrorType, MessageType from .errors import DBusE...
import asyncio import copy import inspect from functools import wraps from typing import Any, Dict, List, no_type_check_decorator from . import introspection as intr from ._private.util import parse_annotation, replace_fds_with_idx, replace_idx_with_fds, signature_contains_type from .constants import PropertyAccess fr...
from typing import Any, List, Union from .errors import InvalidSignatureError, SignatureBodyMismatchError from .validators import is_object_path_valid class SignatureType: """A class that represents a single complete type within a signature. This class is not meant to be constructed directly. Use the :class...
import re from .errors import InvalidBusNameError, InvalidInterfaceNameError, InvalidMemberNameError, InvalidObjectPathError _bus_name_re = re.compile(r"^[A-Za-z_-][A-Za-z0-9_-]*$") _path_re = re.compile(r"^[A-Za-z0-9_]+$") _element_re = re.compile(r"^[A-Za-z_][A-Za-z0-9_]*$") def is_bus_name_valid(name: str) -> bo...
from . import aio, introspection, message_bus, proxy_object, service # from . import glib from .constants import ( ArgDirection, BusType, ErrorType, MessageFlag, MessageType, NameFlag, PropertyAccess, ReleaseNameReply, RequestNameReply, ) from .errors import ( AuthError, DBu...
__title__ = "dbus_next" __description__ = "A zero-dependency DBus library for Python with asyncio support" __url__ = "https://github.com/altdesktop/python-dbus-next" __version__ = "0.2.3" __author__ = "Tony Crisci" __author_email__ = "tony@dubstepdish.com" __license__ = "MIT" __copyright__ = "Copyright 2019 Tony Crisci...
import array import asyncio import logging import socket from asyncio import Queue from copy import copy from typing import Optional from .. import introspection as intr from .._private.unmarshaller import Unmarshaller from ..auth import Authenticator, AuthExternal from ..constants import BusType, MessageFlag, Message...
import xml.etree.ElementTree as ET from typing import List, Union from .. import introspection as intr from .._private.util import replace_fds_with_idx, replace_idx_with_fds from ..constants import ErrorType from ..errors import DBusError from ..message import Message, MessageFlag from ..message_bus import BaseMessage...
from .message_bus import MessageBus from .proxy_object import ProxyInterface, ProxyObject
import os import re from urllib.parse import unquote from ..constants import BusType from ..errors import InvalidAddressError invalid_address_chars_re = re.compile(r"[^-0-9A-Za-z_/.%]") def parse_address(address_str): addresses = [] for address in filter(lambda a: a, address_str.split(";")): if add...
from enum import Enum PROTOCOL_VERSION = 1 LITTLE_ENDIAN = ord("l") BIG_ENDIAN = ord("B") class HeaderField(Enum): PATH = 1 INTERFACE = 2 MEMBER = 3 ERROR_NAME = 4 REPLY_SERIAL = 5 DESTINATION = 6 SENDER = 7 SIGNATURE = 8 UNIX_FDS = 9