Projects STRLCPY aardwolf Commits 3a913590
🤬
  • ■ ■ ■ ■
    aardwolf/_version.py
    1 1   
    2  -__version__ = "0.0.8"
     2 +__version__ = "0.0.9"
    3 3  __banner__ = \
    4 4  """
    5 5  # aardwolf %s
    skipped 2 lines
  • ■ ■ ■ ■ ■ ■
    aardwolf/authentication/credssp/native.py
    skipped 1 lines
    2 2  import os
    3 3  from aardwolf import logger
    4 4  from aardwolf.authentication.spnego.native import SPNEGO
    5  -from aardwolf.authentication.credssp.messages.asn1_structs import *
     5 +from aardwolf.authentication.credssp.messages.asn1_structs import NegoDatas, \
     6 + NegoData, TSRequest, TSRequest, TSPasswordCreds, TSCredentials, TSRemoteGuardCreds, \
     7 + TSRemoteGuardPackageCred
    6 8  from hashlib import sha256
    7 9   
    8 10  # https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-cssp/385a7489-d46b-464c-b224-f7340e308a5c
    skipped 79 lines
    88 90   # waiting for server to reply with the re-encrypted verification string + b'\x01'
    89 91   tdata = TSRequest.load(token).native
    90 92   if tdata['errorCode'] is not None:
    91  - raise Exception('CredSSP - Server sent an error! Code: %s' % tdata['errorCode'])
     93 + raise Exception('CredSSP - Server sent an error! Code: %s' % hex(tdata['errorCode'] & (2**32-1)))
    92 94   if tdata['pubKeyAuth'] is None:
    93 95   raise Exception('Missing pubKeyAuth')
    94 96   verification_data, _ = await self.auth_ctx.decrypt(tdata['pubKeyAuth'], 0)
    skipped 54 lines
  • ■ ■ ■ ■ ■
    aardwolf/authentication/kerberos/native.py
    skipped 5 lines
    6 6  # - Links -
    7 7  # 1. See minikerberos library
    8 8   
    9  -import datetime
    10  - 
    11  -import os
    12  -from minikerberos.common import *
    13  - 
    14  - 
    15  -from minikerberos.protocol.asn1_structs import AP_REP, EncAPRepPart, EncryptedData, AP_REQ, Ticket
     9 +from minikerberos.protocol.asn1_structs import AP_REP, EncAPRepPart, Ticket
    16 10  from aardwolf.authentication.kerberos.gssapi import get_gssapi, KRB5_MECH_INDEP_TOKEN
    17 11  from minikerberos.protocol.structures import ChecksumFlags
    18  -from minikerberos.protocol.encryption import Enctype, Key, _enctype_table
    19  -from minikerberos.protocol.constants import MESSAGE_TYPE
     12 +from minikerberos.protocol.encryption import Key, _enctype_table
    20 13  from minikerberos.aioclient import AIOKerberosClient
    21  -from minikerberos.network.aioclientsockssocket import AIOKerberosClientSocksSocket
    22 14  from aardwolf import logger
    23 15   
    24 16   
    skipped 185 lines
  • ■ ■ ■ ■
    aardwolf/authentication/ntlm/native.py
    skipped 13 lines
    14 14  from aardwolf.authentication.ntlm.messages.negotiate import NTLMNegotiate
    15 15  from aardwolf.authentication.ntlm.messages.challenge import NTLMChallenge
    16 16  from aardwolf.authentication.ntlm.messages.authenticate import NTLMAuthenticate
    17  -from aardwolf.authentication.ntlm.creds_calc import *
     17 +from aardwolf.authentication.ntlm.creds_calc import netntlmv2, AVPAIRType, LMResponse, netntlm, netntlm_ess
    18 18  from unicrypto.symmetric import RC4
    19 19  from unicrypto import hashlib
    20 20  from unicrypto import hmac
    skipped 442 lines
  • ■ ■ ■ ■
    aardwolf/authentication/ntlm/structures/challenge_response.py
    1 1  import io
    2 2   
    3  -from aardwolf.commons.utils.ts2dt import *
     3 +from aardwolf.commons.utils.ts2dt import datetime2timestamp, timestamp2datetime
    4 4  from aardwolf.authentication.ntlm.structures.avpair import AVPairs, AVPAIRType
    5 5   
    6 6  # https://msdn.microsoft.com/en-us/library/cc236648.aspx
    skipped 201 lines
  • ■ ■ ■ ■ ■
    aardwolf/channels.py
    1 1   
    2 2  import asyncio
    3 3  import traceback
    4  -import typing
    5 4   
    6 5  from aardwolf.protocol.T124.userdata.constants import ChannelOption
    7 6   
    skipped 91 lines
  • ■ ■ ■ ■ ■ ■
    aardwolf/commons/authbuilder.py
    1  -import enum
    2 1  import platform
    3 2  import os
    4 3   
    5 4  import copy
    6  -from aardwolf.commons.credential import *
     5 +from aardwolf.commons.credential import RDPAuthProtocol, RDPCredential, \
     6 + RDPNTLMCredential, RDPCredentialsSecretType, RDPKerberosCredential, \
     7 + RDPKerberosSSPICredential, RDPNTLMSSPICredential, RDPMultiplexorCredential, \
     8 + RDPMPNCredential, RDPWSNETCredential, RDPSSPIProxyCredential
    7 9  from aardwolf.commons.proxy import RDPProxyType
    8 10  from aardwolf.authentication.spnego.native import SPNEGO
    9 11  from aardwolf.authentication.ntlm.native import NTLMAUTHHandler, NTLMHandlerSettings
    skipped 368 lines
  • ■ ■ ■ ■ ■ ■
    aardwolf/commons/iosettings.py
    1 1  from aardwolf.extensions.RDPECLIP.channel import RDPECLIPChannel
    2 2  from aardwolf.protocol.x224.constants import SUPP_PROTOCOLS, NEG_FLAGS
    3 3  from aardwolf.commons.queuedata.constants import VIDEO_FORMAT
     4 +from aardwolf.protocol.T125.extendedinfopacket import PERF
    4 5   
    5 6  class RDPIOSettings:
    6 7   def __init__(self):
    skipped 15 lines
    22 23   self.video_bpp_max = 16 #max supported bpp
    23 24   # all supported BPPs
    24 25   self.video_bpp_supported = [15, 16, 24, 32]
     26 + 
     27 + #Performance booster flags
     28 + self.performance_flags = PERF.DISABLE_WALLPAPER | PERF.DISABLE_THEMING | PERF.DISABLE_CURSORSETTINGS | PERF.DISABLE_MENUANIMATIONS | PERF.DISABLE_FULLWINDOWDRAG
    25 29  
    26 30   # Keyboard settings
    27 31   # Keyborad settings used by both RDP and VNC
    skipped 26 lines
  • ■ ■ ■ ■ ■ ■
    aardwolf/connection.py
    1 1   
    2  -import traceback
    3  -import asyncio
    4  -import typing
     2 +import io
    5 3  import copy
    6  -import platform
     4 +import typing
     5 +import asyncio
     6 +import traceback
    7 7  from typing import cast
    8 8  from collections import OrderedDict
    9 9   
    10 10  import asn1tools
    11 11  from PIL import Image
    12 12  from aardwolf import logger
    13  -from aardwolf.commons.queuedata.constants import MOUSEBUTTON, VIDEO_FORMAT
    14 13  from aardwolf.keyboard import VK_MODIFIERS
     14 +from aardwolf.commons.queuedata.constants import MOUSEBUTTON, VIDEO_FORMAT
    15 15  from aardwolf.commons.target import RDPTarget
    16  -from aardwolf.network.selector import NetworkSelector
    17 16  from aardwolf.commons.credential import RDPCredential, RDPCredentialsSecretType
    18 17  from aardwolf.commons.cryptolayer import RDPCryptoLayer
    19 18  from aardwolf.network.tpkt import TPKTNetwork
    20 19  from aardwolf.network.x224 import X224Network
     20 +from aardwolf.network.selector import NetworkSelector
    21 21   
    22 22  from aardwolf.protocol.x224.constants import SUPP_PROTOCOLS, NEG_FLAGS
    23 23  from aardwolf.protocol.x224.server.connectionconfirm import RDP_NEG_RSP
    24 24   
     25 +from aardwolf.protocol.pdu.input.keyboard import TS_UNICODE_KEYBOARD_EVENT, TS_KEYBOARD_EVENT, KBDFLAGS
     26 +from aardwolf.protocol.pdu.input.mouse import PTRFLAGS, TS_POINTER_EVENT
     27 +from aardwolf.protocol.pdu.capabilities import CAPSTYPE
     28 +from aardwolf.protocol.pdu.capabilities.general import TS_GENERAL_CAPABILITYSET, OSMAJORTYPE, OSMINORTYPE, EXTRAFLAG
     29 +from aardwolf.protocol.pdu.capabilities.bitmap import TS_BITMAP_CAPABILITYSET
     30 +from aardwolf.protocol.pdu.capabilities.sound import TS_SOUND_CAPABILITYSET
     31 +from aardwolf.protocol.pdu.capabilities.virtualchannel import TS_VIRTUALCHANNEL_CAPABILITYSET, VCCAPS
     32 +from aardwolf.protocol.pdu.capabilities.offscreen import TS_OFFSCREEN_CAPABILITYSET
     33 +from aardwolf.protocol.pdu.capabilities.glyph import TS_GLYPHCACHE_CAPABILITYSET
     34 +from aardwolf.protocol.pdu.capabilities.brush import TS_BRUSH_CAPABILITYSET
     35 +from aardwolf.protocol.pdu.capabilities.input import TS_INPUT_CAPABILITYSET, INPUT_FLAG
     36 +from aardwolf.protocol.pdu.capabilities.pointer import TS_POINTER_CAPABILITYSET
     37 +from aardwolf.protocol.pdu.capabilities.bitmapcache import TS_BITMAPCACHE_CAPABILITYSET
     38 +from aardwolf.protocol.pdu.capabilities.order import TS_ORDER_CAPABILITYSET, ORDERFLAG
     39 + 
    25 40  from aardwolf.protocol.T124.GCCPDU import GCCPDU
    26 41  from aardwolf.protocol.T124.userdata import TS_UD, TS_SC
    27  -from aardwolf.protocol.T124.userdata.constants import *
     42 +from aardwolf.protocol.T124.userdata.constants import TS_UD_TYPE, HIGH_COLOR_DEPTH, ENCRYPTION_FLAG, SUPPORTED_COLOR_DEPTH, \
     43 + COLOR_DEPTH, CONNECTION_TYPE, RNS_UD_CS, ClusterInfo
    28 44  from aardwolf.protocol.T124.userdata.clientcoredata import TS_UD_CS_CORE
    29 45  from aardwolf.protocol.T124.userdata.clientsecuritydata import TS_UD_CS_SEC
    30 46  from aardwolf.protocol.T124.userdata.clientnetworkdata import TS_UD_CS_NET, CHANNEL_DEF
    31 47  from aardwolf.protocol.T124.userdata.clientclusterdata import TS_UD_CS_CLUSTER
    32 48  from aardwolf.protocol.T128.security import TS_SECURITY_HEADER,SEC_HDR_FLAG, TS_SECURITY_HEADER1
    33  -from aardwolf.protocol.T125.infopacket import *
    34  -from aardwolf.protocol.T125.extendedinfopacket import *
     49 +from aardwolf.protocol.T125.infopacket import TS_INFO_PACKET, INFO_FLAG
     50 +from aardwolf.protocol.T125.extendedinfopacket import TS_EXTENDED_INFO_PACKET, TS_TIME_ZONE_INFORMATION, TS_SYSTEMTIME, CLI_AF
    35 51  from aardwolf.protocol.T125.MCSPDU_ver_2 import MCSPDU_ver_2
    36  -from aardwolf.protocol.T125.serverdemandactivepdu import *
    37  -from aardwolf.protocol.T125.clientconfirmactivepdu import *
    38  -from aardwolf.protocol.T125.synchronizepdu import *
    39  -from aardwolf.protocol.T125.controlpdu import *
    40  -from aardwolf.protocol.T125.fontlistpdu import *
    41  -from aardwolf.protocol.T125.inputeventpdu import *
     52 +from aardwolf.protocol.T128.serverdemandactivepdu import TS_DEMAND_ACTIVE_PDU
     53 +from aardwolf.protocol.T128.clientconfirmactivepdu import TS_SHARECONTROLHEADER, TS_CONFIRM_ACTIVE_PDU, TS_CAPS_SET
     54 +from aardwolf.protocol.T128.synchronizepdu import TS_SYNCHRONIZE_PDU
     55 +from aardwolf.protocol.T128.controlpdu import TS_CONTROL_PDU, CTRLACTION
     56 +from aardwolf.protocol.T128.fontlistpdu import TS_FONT_LIST_PDU
     57 +from aardwolf.protocol.T128.inputeventpdu import TS_SHAREDATAHEADER, TS_INPUT_EVENT, TS_INPUT_PDU_DATA
    42 58  from aardwolf.protocol.T125.securityexchangepdu import TS_SECURITY_PACKET
    43  -from aardwolf.protocol.T125.seterrorinfopdu import TS_SET_ERROR_INFO_PDU
     59 +from aardwolf.protocol.T128.seterrorinfopdu import TS_SET_ERROR_INFO_PDU
     60 +from aardwolf.protocol.T128.share import PDUTYPE, STREAM_TYPE, PDUTYPE2
    44 61   
    45 62   
     63 + 
    46 64  from aardwolf.protocol.fastpath import TS_FP_UPDATE_PDU, FASTPATH_UPDATETYPE, FASTPATH_FRAGMENT, FASTPATH_SEC, TS_FP_UPDATE
    47  -from aardwolf.commons.queuedata import *
     65 +from aardwolf.commons.queuedata import RDPDATATYPE, RDP_KEYBOARD_SCANCODE, RDP_KEYBOARD_UNICODE, RDP_MOUSE, RDP_VIDEO
    48 66  from aardwolf.commons.authbuilder import AuthenticatorBuilder
    49 67  from aardwolf.channels import Channel
    50 68  from aardwolf.commons.iosettings import RDPIOSettings
    skipped 1 lines
    52 70   
    53 71  class RDPConnection:
    54 72   def __init__(self, target:RDPTarget, credentials:RDPCredential, iosettings:RDPIOSettings):
     73 + """RDP client connection object. After successful connection the two asynchronous queues named `ext_out_queue` and `ext_in_queue`
     74 + can be used to communicate with the remote server
     75 + 
     76 + Args:
     77 + target (RDPTarget): Target object specifying the network connection details
     78 + credentials (RDPCredential): Credential object specifying the authentication details
     79 + iosettings (RDPIOSettings): Screen/Keyboard/IO settings
     80 + """
    55 81   self.target = target
    56 82   self.credentials = credentials
    57 83   self.authapi = None
    skipped 128 lines
    186 212   await asyncio.wait_for(self.terminate(), timeout = 5)
    187 213  
    188 214   async def connect(self):
    189  - """
    190  - Performs the entire connection sequence
     215 + """Initiates the connection to the server, and performs authentication and all necessary setups.
     216 + Returns:
     217 + Tuple[bool, Exception]: _description_
    191 218   """
    192 219   try:
    193 220   self.__fastpath_in_queue = asyncio.Queue()
    skipped 504 lines
    698 725   extinfo.clientDir = 'C:\\WINNT\\System32\\mstscax.dll'
    699 726   extinfo.clientTimeZone = systz
    700 727   extinfo.clientSessionId = 0
    701  - #extinfo.performanceFlags = PERF.DISABLE_WALLPAPER | PERF.DISABLE_THEMING | PERF.DISABLE_CURSORSETTINGS | PERF.DISABLE_MENUANIMATIONS | PERF.DISABLE_FULLWINDOWDRAG
     728 + if self.iosettings.performance_flags is not None:
     729 + extinfo.performanceFlags = self.iosettings.performance_flags
    702 730   
    703 731   info = TS_INFO_PACKET()
    704 732   info.CodePage = 0
    skipped 620 lines
  • aardwolf/develstuff/pertest.py
    Unable to diff as some line is too long.
  • ■ ■ ■ ■ ■ ■
    aardwolf/develstuff/srvdata.py
    skipped 8 lines
    9 9  from aardwolf.protocol.T125.infopacket import *
    10 10  from aardwolf.protocol.T125.extendedinfopacket import *
    11 11  from aardwolf.protocol.T125.MCSPDU_ver_2 import MCSPDU_ver_2
    12  -from aardwolf.protocol.T125.serverdemandactivepdu import *
    13  -from aardwolf.protocol.T125.clientconfirmactivepdu import *
    14  -from aardwolf.protocol.T125.synchronizepdu import *
    15  -from aardwolf.protocol.T125.controlpdu import *
    16  -from aardwolf.protocol.T125.fontlistpdu import *
    17  -from aardwolf.protocol.T125.inputeventpdu import *
     12 +from aardwolf.protocol.T128.serverdemandactivepdu import *
     13 +from aardwolf.protocol.T128.clientconfirmactivepdu import *
     14 +from aardwolf.protocol.T128.synchronizepdu import *
     15 +from aardwolf.protocol.T128.controlpdu import *
     16 +from aardwolf.protocol.T128.fontlistpdu import *
     17 +from aardwolf.protocol.T128.inputeventpdu import *
    18 18  import asn1tools
    19 19   
    20 20   
    skipped 24 lines
  • ■ ■ ■ ■ ■ ■
    aardwolf/examples/aardpcapscan.py
    skipped 6 lines
    7 7  import json
    8 8   
    9 9  from aardwolf import logger
    10  -from aardwolf.examples.scancommons.targetgens import *
    11  -from aardwolf.examples.scancommons.internal import *
     10 +from aardwolf.examples.scancommons.targetgens import ListTargetGen, FileTargetGen
     11 +from aardwolf.examples.scancommons.internal import EnumResult, EnumResultStatus
    12 12  from aardwolf.utils.univeraljson import UniversalEncoder
    13 13   
    14 14  from aardwolf.network.selector import NetworkSelector
    skipped 423 lines
  • ■ ■ ■ ■ ■
    aardwolf/examples/aardploginscan.py
    skipped 7 lines
    8 8  from aardwolf import logger
    9 9  from aardwolf.commons.url import RDPConnectionURL
    10 10  from aardwolf.commons.iosettings import RDPIOSettings
    11  -from aardwolf.examples.scancommons.targetgens import *
    12  -from aardwolf.examples.scancommons.internal import *
    13  -from aardwolf.examples.scancommons.utils import *
     11 +from aardwolf.examples.scancommons.targetgens import ListTargetGen, FileTargetGen
     12 +from aardwolf.examples.scancommons.internal import EnumResult, EnumResultStatus, EnumProgress
    14 13  from aardwolf.protocol.x224.constants import SUPP_PROTOCOLS
    15 14  from aardwolf.commons.queuedata.constants import VIDEO_FORMAT
    16 15  from tqdm import tqdm
    skipped 353 lines
  • ■ ■ ■ ■ ■
    aardwolf/examples/aardpscreenshot.py
    skipped 5 lines
    6 6  from aardwolf import logger
    7 7  from aardwolf.commons.url import RDPConnectionURL
    8 8  from aardwolf.commons.iosettings import RDPIOSettings
    9  -from aardwolf.examples.scancommons.targetgens import *
    10  -from aardwolf.examples.scancommons.internal import *
    11  -from aardwolf.examples.scancommons.utils import *
     9 +from aardwolf.examples.scancommons.targetgens import ListTargetGen, FileTargetGen
     10 +from aardwolf.examples.scancommons.internal import EnumResult, EnumResultStatus, EnumProgress
    12 11  from aardwolf.commons.queuedata.constants import MOUSEBUTTON, VIDEO_FORMAT
    13 12  from tqdm import tqdm
    14 13   
    skipped 316 lines
  • ■ ■ ■ ■ ■
    aardwolf/extensions/RDPECLIP/channel.py
    1 1   
    2  -from aardwolf.extensions.RDPECLIP.protocol.formatlist import CLIPRDR_LONG_FORMAT_NAME
    3 2  import asyncio
    4 3  import traceback
    5 4  import enum
    skipped 5 lines
    11 10  from aardwolf.extensions.RDPECLIP.protocol.clipboardcapabilities import CLIPRDR_GENERAL_CAPABILITY, CB_GENERAL_FALGS
    12 11  from aardwolf.protocol.channelpdu import CHANNEL_PDU_HEADER, CHANNEL_FLAG
    13 12  from aardwolf.extensions.RDPECLIP.protocol.formatlist import CLIPBRD_FORMAT,CLIPRDR_SHORT_FORMAT_NAME, CLIPRDR_LONG_FORMAT_NAME
    14  -from aardwolf.commons.queuedata import *
     13 +from aardwolf.commons.queuedata import RDP_CLIPBOARD_NEW_DATA_AVAILABLE, RDP_CLIPBOARD_READY, RDPDATATYPE
    15 14  from aardwolf.commons.queuedata.clipboard import RDP_CLIPBOARD_DATA_TXT
    16  -from aardwolf.protocol.T128.security import TS_SECURITY_HEADER,SEC_HDR_FLAG, TS_SECURITY_HEADER1
     15 +from aardwolf.protocol.T128.security import TS_SECURITY_HEADER,SEC_HDR_FLAG
    17 16   
    18 17  class CLIPBRDSTATUS(enum.Enum):
    19 18   WAITING_SERVER_INIT = enum.auto()
    skipped 274 lines
  • ■ ■ ■ ■ ■
    aardwolf/protocol/T124/userdata/clientclusterdata.py
    1 1   
    2 2  import io
     3 +import enum
    3 4  from typing import List
    4  -from aardwolf.protocol.T124.userdata.constants import *
     5 +from aardwolf.protocol.T124.userdata.constants import TS_UD_TYPE, ClusterInfo
    5 6   
    6 7  # https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpbcgr/d68c629f-36a1-4a40-afd0-8b3e56d29aac
    7 8  class TS_UD_CS_CLUSTER:
    skipped 39 lines
  • ■ ■ ■ ■ ■
    aardwolf/protocol/T124/userdata/clientcoredata.py
    1 1   
    2 2  import io
    3  -from aardwolf.protocol.T124.userdata.constants import *
     3 +import enum
     4 +from aardwolf.protocol.T124.userdata.constants import TS_UD_TYPE, COLOR_DEPTH, HIGH_COLOR_DEPTH, \
     5 + SUPPORTED_COLOR_DEPTH, CONNECTION_TYPE, RNS_UD_CS, ORIENTATION
    4 6  from aardwolf.protocol.x224.constants import SUPP_PROTOCOLS
    5 7   
    6 8  # https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpbcgr/8a36630c-9c8e-4864-9382-2ec9d6f368ca
    skipped 184 lines
  • ■ ■ ■ ■ ■
    aardwolf/protocol/T124/userdata/clientmessagechanneldata.py
    1 1   
    2 2  import io
    3  -from aardwolf.protocol.T124.userdata.constants import *
     3 +import enum
     4 +from aardwolf.protocol.T124.userdata.constants import TS_UD_TYPE
    4 5   
    5 6  # https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpbcgr/f50e791c-de03-4b25-b17e-e914c9020bc3
    6 7   
    skipped 35 lines
  • ■ ■ ■ ■ ■
    aardwolf/protocol/T124/userdata/clientmonitorextendeddata.py
    1 1   
    2 2  import io
    3 3  from typing import List
    4  -from aardwolf.protocol.T124.userdata.constants import *
     4 +import enum
     5 +from aardwolf.protocol.T124.userdata.constants import TS_UD_TYPE, ORIENTATION
    5 6   
    6 7  class TS_MONITOR_ATTRIBUTES:
    7 8   def __init__(self):
    skipped 85 lines
  • ■ ■ ■ ■ ■
    aardwolf/protocol/T124/userdata/clientmultitransportchanneldata.py
    1 1   
    2 2  import io
    3  -from aardwolf.protocol.T124.userdata.constants import *
     3 +import enum
     4 +from aardwolf.protocol.T124.userdata.constants import TS_UD_TYPE, MultitransportFlags
    4 5   
    5 6  #https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpbcgr/f50e791c-de03-4b25-b17e-e914c9020bc3
    6 7   
    skipped 35 lines
  • ■ ■ ■ ■ ■
    aardwolf/protocol/T124/userdata/clientnetworkdata.py
    1 1   
    2 2  import io
    3 3  from typing import List
    4  -from aardwolf.protocol.T124.userdata.constants import *
     4 +import enum
     5 +from aardwolf.protocol.T124.userdata.constants import TS_UD_TYPE, ChannelOption
    5 6   
    6 7  class CHANNEL_DEF:
    7 8   def __init__(self):
    skipped 76 lines
  • ■ ■ ■ ■ ■
    aardwolf/protocol/T124/userdata/clientsecuritydata.py
    1 1   
    2 2  import io
    3  -from aardwolf.protocol.T124.userdata.constants import *
     3 +import enum
     4 +from aardwolf.protocol.T124.userdata.constants import TS_UD_TYPE, ENCRYPTION_FLAG
    4 5   
    5 6  # https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpbcgr/6b58e11e-a32b-4903-b736-339f3cfe46ec
    6 7  class TS_UD_CS_SEC:
    skipped 38 lines
  • ■ ■ ■ ■ ■
    aardwolf/protocol/T124/userdata/monitordefinition.py
    1 1   
    2 2  import io
    3 3  from typing import List
    4  -from aardwolf.protocol.T124.userdata.constants import *
     4 +import enum
     5 +from aardwolf.protocol.T124.userdata.constants import TS_UD_TYPE, MonitorConfig
    5 6   
    6 7  class TS_MONITOR_DEF:
    7 8   def __init__(self):
    skipped 79 lines
  • ■ ■ ■ ■ ■
    aardwolf/protocol/T124/userdata/servercoredata.py
    1 1   
    2 2  import io
    3  -from aardwolf.protocol.T124.userdata.constants import *
     3 +import enum
     4 +from aardwolf.protocol.T124.userdata.constants import TS_UD_TYPE, RNS_UD_SC
    4 5   
    5 6  # https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpbcgr/379a020e-9925-4b4f-98f3-7d634e10b411
    6 7  class TS_UD_SC_CORE:
    skipped 51 lines
  • ■ ■ ■ ■ ■
    aardwolf/protocol/T124/userdata/servermessagechannel.py
    1 1   
    2 2  import io
    3  -from aardwolf.protocol.T124.userdata.constants import *
     3 +import enum
     4 +from aardwolf.protocol.T124.userdata.constants import TS_UD_TYPE
    4 5   
    5 6  # https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpbcgr/9269d58a-3d85-48a2-942a-bb0bbe5a55aa
    6 7  class TS_UD_SC_MCS_MSGCHANNEL:
    skipped 34 lines
  • ■ ■ ■ ■ ■
    aardwolf/protocol/T124/userdata/servermultitransportchanneldata.py
    1 1   
    2 2  import io
    3  -from aardwolf.protocol.T124.userdata.constants import *
     3 +import enum
     4 +from aardwolf.protocol.T124.userdata.constants import TS_UD_TYPE, MultitransportFlags
    4 5   
    5 6  # https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpbcgr/bf7201d4-9ed9-4dfe-9f6f-f2d68a7367ed
    6 7  class TS_UD_SC_MULTITRANSPORT:
    skipped 34 lines
  • ■ ■ ■ ■ ■
    aardwolf/protocol/T124/userdata/servernetworkdata.py
    1 1   
    2 2  import io
     3 +import enum
    3 4  from typing import List
    4  -from aardwolf.protocol.T124.userdata.constants import *
     5 +from aardwolf.protocol.T124.userdata.constants import TS_UD_TYPE
    5 6   
    6 7  # https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpbcgr/89fa11de-5275-4106-9cf1-e5aa7709436c
    7 8  class TS_UD_SC_NET:
    skipped 47 lines
  • ■ ■ ■ ■ ■
    aardwolf/protocol/T124/userdata/serversecuritydata.py
    1 1   
    2 2  import io
    3  -from aardwolf.protocol.T124.userdata.constants import *
     3 +import enum
     4 + 
     5 +from aardwolf.protocol.T124.userdata.constants import TS_UD_TYPE, ENCRYPTION_FLAG, ENCRYPTION_LEVEL
    4 6  from asn1crypto.x509 import Certificate
    5 7   
    6 8  class CERT_CHAIN_VERSION(enum.Enum):
    skipped 213 lines
  • ■ ■ ■ ■ ■ ■
    aardwolf/protocol/T125/clientconfirmactivepdu.py aardwolf/protocol/T128/clientconfirmactivepdu.py
    1 1  import enum
    2 2  import io
    3 3  from typing import List
    4  -from aardwolf.protocol.T128.share import *
    5  -from aardwolf.protocol.pdu.capabilities import *
     4 +from aardwolf.protocol.T128.share import TS_SHARECONTROLHEADER
     5 +from aardwolf.protocol.pdu.capabilities import TS_CAPS_SET
    6 6   
    7 7  class TS_CONFIRM_ACTIVE_PDU:
    8 8   def __init__(self):
    skipped 58 lines
  • ■ ■ ■ ■
    aardwolf/protocol/T125/controlpdu.py aardwolf/protocol/T128/controlpdu.py
    1 1  import io
    2 2  import enum
    3  -from aardwolf.protocol.T128.share import *
     3 +from aardwolf.protocol.T128.share import TS_SHAREDATAHEADER
    4 4   
    5 5  class CTRLACTION(enum.Enum):
    6 6   REQUEST_CONTROL = 0x0001 #Request control
    skipped 42 lines
  • ■ ■ ■ ■
    aardwolf/protocol/T125/fontlistpdu.py aardwolf/protocol/T128/fontlistpdu.py
    1 1  import io
    2 2  import enum
    3  -from aardwolf.protocol.T128.share import *
     3 +from aardwolf.protocol.T128.share import TS_SHAREDATAHEADER
    4 4   
    5 5  class TS_FONT_LIST_PDU:
    6 6   def __init__(self):
    skipped 39 lines
  • ■ ■ ■ ■
    aardwolf/protocol/T125/fontmappdu.py aardwolf/protocol/T128/fontmappdu.py
    1 1  import io
    2 2  import enum
    3  -from aardwolf.protocol.T128.share import *
     3 +from aardwolf.protocol.T128.share import TS_SHAREDATAHEADER
    4 4   
    5 5  class TS_FONT_MAP_PDU:
    6 6   def __init__(self):
    skipped 39 lines
  • ■ ■ ■ ■ ■ ■
    aardwolf/protocol/T125/inputeventpdu.py aardwolf/protocol/T128/inputeventpdu.py
    1 1  import io
    2 2  import enum
    3 3  from typing import List
    4  -from aardwolf.protocol.T128.share import *
    5  -from aardwolf.protocol.pdu.input import *
     4 +from aardwolf.protocol.T128.share import TS_SHAREDATAHEADER
     5 +from aardwolf.protocol.pdu.input import TS_INPUT_EVENT
    6 6   
    7 7   
    8 8  class TS_INPUT_PDU_DATA:
    skipped 41 lines
  • ■ ■ ■ ■
    aardwolf/protocol/T125/persistentbitmapcachepdu.py aardwolf/protocol/T128/persistentbitmapcachepdu.py
    1 1  import io
    2 2  import enum
    3 3  from typing import List
    4  -from aardwolf.protocol.T128.share import *
     4 +from aardwolf.protocol.T128.share import TS_SHAREDATAHEADER
    5 5   
    6 6  class TS_BITMAPCACHE_PERSISTENT_LIST_ENTRY:
    7 7   def __init__(self):
    skipped 96 lines
  • ■ ■ ■ ■ ■ ■
    aardwolf/protocol/T125/serverdemandactivepdu.py aardwolf/protocol/T128/serverdemandactivepdu.py
    1 1  import enum
    2 2  import io
    3 3  from typing import List
    4  -from aardwolf.protocol.T128.share import *
    5  -from aardwolf.protocol.pdu.capabilities import *
     4 +from aardwolf.protocol.T128.share import TS_SHARECONTROLHEADER
     5 +from aardwolf.protocol.pdu.capabilities import TS_CAPS_SET
    6 6   
    7 7  class TS_DEMAND_ACTIVE_PDU:
    8 8   def __init__(self):
    skipped 59 lines
  • ■ ■ ■ ■ ■
    aardwolf/protocol/T125/seterrorinfopdu.py aardwolf/protocol/T128/seterrorinfopdu.py
    1 1  import enum
    2 2  import io
    3  -from typing import List
    4  -from aardwolf.protocol.T128.share import *
    5  -from aardwolf.protocol.pdu.capabilities import *
     3 +from aardwolf.protocol.T128.share import TS_SHAREDATAHEADER
    6 4   
    7 5  class ERRINFO(enum.Enum):
    8 6   UNK = 'blabla' # error not found
    skipped 166 lines
  • ■ ■ ■ ■ ■
    aardwolf/protocol/T125/synchronizepdu.py aardwolf/protocol/T128/synchronizepdu.py
    1 1  import io
    2 2  import enum
    3  -from aardwolf.protocol.T128.share import *
    4  - 
     3 +from aardwolf.protocol.T128.share import TS_SHAREDATAHEADER
    5 4   
    6 5  class TS_SYNCHRONIZE_PDU:
    7 6   def __init__(self):
    skipped 34 lines
  • ■ ■ ■ ■ ■
    aardwolf/protocol/fastpath/__init__.py
    skipped 1 lines
    2 2  import enum
    3 3  import io
    4 4  from typing import List
    5  -from aardwolf.protocol.T128.share import *
    6 5  from aardwolf.protocol.fastpath.palette import TS_UPDATE_PALETTE_DATA
    7 6  from aardwolf.protocol.fastpath.bitmap import TS_UPDATE_BITMAP_DATA
    8 7  from aardwolf.protocol.fastpath.pointer import TS_FP_LARGEPOINTERATTRIBUTE, TS_FP_CACHEDPOINTERATTRIBUTE, TS_FP_POINTERATTRIBUTE, TS_POINTERPOSATTRIBUTE, TS_FP_COLORPOINTERATTRIBUTE
    skipped 207 lines
  • ■ ■ ■ ■ ■ ■
    aardwolf/protocol/pdu/capabilities/__init__.py
    skipped 2 lines
    3 3  from os import stat
    4 4   
    5 5  from aardwolf import logger
    6  -from aardwolf.protocol.pdu.capabilities.bitmamachachehostsupp import *
    7  -from aardwolf.protocol.pdu.capabilities.bitmap import *
    8  -from aardwolf.protocol.pdu.capabilities.bitmapcache import *
    9  -from aardwolf.protocol.pdu.capabilities.bitmapcache2 import *
    10  -from aardwolf.protocol.pdu.capabilities.brush import *
    11  -from aardwolf.protocol.pdu.capabilities.bitmapcodecs import *
    12  -from aardwolf.protocol.pdu.capabilities.colortablecache import *
    13  -from aardwolf.protocol.pdu.capabilities.compdesk import *
    14  -from aardwolf.protocol.pdu.capabilities.control import *
    15  -from aardwolf.protocol.pdu.capabilities.font import *
    16  -from aardwolf.protocol.pdu.capabilities.frameack import *
    17  -from aardwolf.protocol.pdu.capabilities.gdiplus import *
    18  -from aardwolf.protocol.pdu.capabilities.general import *
    19  -from aardwolf.protocol.pdu.capabilities.glyph import *
    20  -from aardwolf.protocol.pdu.capabilities.input import *
    21  -from aardwolf.protocol.pdu.capabilities.largepointer import *
    22  -from aardwolf.protocol.pdu.capabilities.multifragmentupdate import *
    23  -from aardwolf.protocol.pdu.capabilities.ninegrid import *
    24  -from aardwolf.protocol.pdu.capabilities.offscreen import *
    25  -from aardwolf.protocol.pdu.capabilities.order import *
    26  -from aardwolf.protocol.pdu.capabilities.pointer import *
    27  -from aardwolf.protocol.pdu.capabilities.remoteprograms import *
    28  -from aardwolf.protocol.pdu.capabilities.share import *
    29  -from aardwolf.protocol.pdu.capabilities.sound import *
    30  -from aardwolf.protocol.pdu.capabilities.surface import *
    31  -from aardwolf.protocol.pdu.capabilities.virtualchannel import *
    32  -from aardwolf.protocol.pdu.capabilities.windowactivation import *
    33  -from aardwolf.protocol.pdu.capabilities.windowlist import *
     6 +from aardwolf.protocol.pdu.capabilities.bitmamachachehostsupp import TS_BITMAPCACHE_HOSTSUPPORT_CAPABILITYSET
     7 +from aardwolf.protocol.pdu.capabilities.bitmap import TS_BITMAP_CAPABILITYSET
     8 +from aardwolf.protocol.pdu.capabilities.bitmapcache import TS_BITMAPCACHE_CAPABILITYSET
     9 +from aardwolf.protocol.pdu.capabilities.bitmapcache2 import TS_BITMAPCACHE_CAPABILITYSET_REV2
     10 +from aardwolf.protocol.pdu.capabilities.brush import TS_BRUSH_CAPABILITYSET
     11 +from aardwolf.protocol.pdu.capabilities.bitmapcodecs import TS_BITMAPCODECS_CAPABILITYSET
     12 +from aardwolf.protocol.pdu.capabilities.colortablecache import TS_COLORTABLE_CAPABILITYSET
     13 +from aardwolf.protocol.pdu.capabilities.compdesk import TS_COMPDESK_CAPABILITYSET
     14 +from aardwolf.protocol.pdu.capabilities.control import TS_CONTROL_CAPABILITYSET
     15 +from aardwolf.protocol.pdu.capabilities.font import TS_FONT_CAPABILITYSET
     16 +from aardwolf.protocol.pdu.capabilities.frameack import TS_FRAME_ACKNOWLEDGE_CAPABILITYSET
     17 +#from aardwolf.protocol.pdu.capabilities.gdiplus import *
     18 +from aardwolf.protocol.pdu.capabilities.general import TS_GENERAL_CAPABILITYSET
     19 +from aardwolf.protocol.pdu.capabilities.glyph import TS_GLYPHCACHE_CAPABILITYSET
     20 +from aardwolf.protocol.pdu.capabilities.input import TS_INPUT_CAPABILITYSET
     21 +from aardwolf.protocol.pdu.capabilities.largepointer import TS_LARGE_POINTER_CAPABILITYSET
     22 +from aardwolf.protocol.pdu.capabilities.multifragmentupdate import TS_MULTIFRAGMENTUPDATE_CAPABILITYSET
     23 +from aardwolf.protocol.pdu.capabilities.ninegrid import TS_DRAW_NINEGRID_CAPABILITYSET
     24 +from aardwolf.protocol.pdu.capabilities.offscreen import TS_OFFSCREEN_CAPABILITYSET
     25 +from aardwolf.protocol.pdu.capabilities.order import TS_ORDER_CAPABILITYSET
     26 +from aardwolf.protocol.pdu.capabilities.pointer import TS_POINTER_CAPABILITYSET
     27 +from aardwolf.protocol.pdu.capabilities.remoteprograms import TS_REMOTE_PROGRAMS_CAP_SET
     28 +from aardwolf.protocol.pdu.capabilities.share import TS_SHARE_CAPABILITYSET
     29 +from aardwolf.protocol.pdu.capabilities.sound import TS_SOUND_CAPABILITYSET
     30 +from aardwolf.protocol.pdu.capabilities.surface import TS_SURFCMDS_CAPABILITYSET
     31 +from aardwolf.protocol.pdu.capabilities.virtualchannel import TS_VIRTUALCHANNEL_CAPABILITYSET
     32 +from aardwolf.protocol.pdu.capabilities.windowactivation import TS_WINDOWACTIVATION_CAPABILITYSET
     33 +from aardwolf.protocol.pdu.capabilities.windowlist import TS_WINDOW_LIST_CAP_SET
    34 34   
    35 35   
    36 36  class CAPSTYPE(enum.Enum):
    skipped 117 lines
  • ■ ■ ■ ■ ■ ■
    aardwolf/protocol/pdu/input/__init__.py
    skipped 1 lines
    2 2  import enum
    3 3   
    4 4  from aardwolf import logger
    5  -from aardwolf.protocol.pdu.input.keyboard import *
    6  -from aardwolf.protocol.pdu.input.unicode import *
    7  -from aardwolf.protocol.pdu.input.mouse import *
    8  -from aardwolf.protocol.pdu.input.mousex import *
    9  -from aardwolf.protocol.pdu.input.sync import *
    10  -from aardwolf.protocol.pdu.input.unused import *
     5 +from aardwolf.protocol.pdu.input.keyboard import TS_KEYBOARD_EVENT
     6 +from aardwolf.protocol.pdu.input.unicode import TS_UNICODE_KEYBOARD_EVENT
     7 +from aardwolf.protocol.pdu.input.mouse import TS_POINTER_EVENT
     8 +from aardwolf.protocol.pdu.input.mousex import TS_POINTERX_EVENT
     9 +from aardwolf.protocol.pdu.input.sync import TS_SYNC_EVENT
     10 +from aardwolf.protocol.pdu.input.unused import TS_UNUSED_EVENT
    11 11   
    12 12   
    13 13  class INPUT_EVENT(enum.Enum):
    skipped 70 lines
  • ■ ■ ■ ■ ■ ■
    aardwolf/transport/tcp.py
    1 1  import asyncio
    2 2   
    3 3  import logging
    4  -import traceback
    5  -import socket
    6  -#from aardwolf import logger
    7  -#from aardwolf.commons.exceptions import *
    8 4   
    9 5  class TCPSocket:
    10 6   """
    skipped 145 lines
  • aardwolf/utils/rectconvert.bal aardwolf/utils/rectconvert.bak
    Content is identical
  • ■ ■ ■ ■ ■
    aardwolf/utils/rectconvert.py
    skipped 4 lines
    5 5   
    6 6  from aardwolf.commons.queuedata.constants import VIDEO_FORMAT
    7 7   
     8 + 
    8 9  bpp_2_bytes = {
    9 10   15: 2,
    10 11   16: 2,
    skipped 10 lines
  • ■ ■ ■ ■ ■
    aardwolf/vncconnection.py
    skipped 6 lines
    7 7  # TODO: Add mouse scroll functionality (QT5 client needs to be modified for that)
    8 8   
    9 9  import io
    10  -import copy
    11 10  import asyncio
    12 11  import traceback
    13 12  from struct import pack, unpack
    skipped 6 lines
    20 19   
    21 20  from aardwolf.commons.target import RDPTarget
    22 21  from aardwolf.commons.credential import RDPCredential, RDPAuthProtocol
    23  -from aardwolf.commons.queuedata import *
     22 +from aardwolf.commons.queuedata import RDPDATATYPE, RDP_KEYBOARD_SCANCODE, RDP_KEYBOARD_UNICODE, \
     23 + RDP_MOUSE, RDP_VIDEO, RDP_CLIPBOARD_READY, RDP_CLIPBOARD_DATA_TXT, RDP_CLIPBOARD_NEW_DATA_AVAILABLE, \
     24 + RDP_BEEP
    24 25  from aardwolf.extensions.RDPECLIP.protocol.formatlist import CLIPBRD_FORMAT
    25 26  from aardwolf.protocol.vnc.keyboard import *
    26 27  from aardwolf.keyboard import VK_MODIFIERS
    skipped 819 lines
Please wait...
Page is in error, reload to recover