예제 #1
0
파일: packets.py 프로젝트: phibos/dionaea
class MySQL_Client_Authentication(Packet):
    name = "MySQL Client Authentication"
    fields_desc = [
        FlagsField("ClientCapabilities", 0, -16, MySQL_Capabilities),
        FlagsField("ClientExCapabilities", 0, -16,
                   MySQL_Extended_Capabilities),
        LEIntField("MaxPacketSize", 0),
        ByteField("CharSetNumber", 0),
        StrFixedLenField("Filler", b"", 23),
        StrNullField("User", "bob"),
        LengthCodedBinaryField("ScrambleBuffer", b""),
        StrNullField("DatabaseName", b"")
    ]
예제 #2
0
파일: tds.py 프로젝트: phibos/dionaea
class TDS_Login7_Request(Packet):
    name = "TDS Login7 Request"
    fields_desc = [
        LEIntField("Length", 0),
        LEIntField("TDSVersion", 0),
        LEIntField("PacketSize", 0),
        LEIntField("ClientProgVer", 0),
        LEIntField("ClientPID", 0),
        LEIntField("PID", 0),
        FlagsField("OptionFlags1", 0, -8, TDS_OptionFlags1),
        FlagsField("OptionFlags2", 0, -8, TDS_OptionFlags2),
        FlagsField("TypesFlags", 0, -8, TDS_TypesFlags),
        FlagsField("OptionFlags3", 0, -8, TDS_OptionFlags3),
        LEIntField("ClientTimeZone", 0),

        # start of ClientLCID field
        LEShortField("LCID", 0x0),
        FlagsField("ColFlags", 0, -8, TDS_ColFlags),
        ByteField("Version", 0x0),
        # end of ClientLCID field

        # start of OffsetLength field
        LEShortField("ibHostName", 0),
        LEShortField("cchHostName", 0),
        LEShortField("ibUserName", 0),
        LEShortField("cchUserName", 0),
        LEShortField("ibPassword", 0),
        LEShortField("cchPassword", 0),
        LEShortField("ibAppName", 0),
        LEShortField("cchAppName", 0),
        LEShortField("ibServerName", 0),
        LEShortField("cchServerName", 0),
        LEShortField("ibUnused", 0),
        LEShortField("cbUnused", 0),
        LEShortField("ibCltIntName", 0),
        LEShortField("cchCltIntName", 0),
        LEShortField("ibLanguage", 0),
        LEShortField("cchLanguage", 0),
        LEShortField("ibDatabase", 0),
        LEShortField("cchDatabase", 0),
        StrFixedLenField("ClientID", "012345", 6),
        LEShortField("ibSSPI", 0),
        LEShortField("cbSSPI", 0),
        LEShortField("ibAtchDBFile", 0),
        LEShortField("cchAtchDBFile", 0),
        #LEShortField("ibChangePassword",0),	# introduce in TDS 7.2
        #LEShortField("ibChangePassword",0),	# introduce in TDS 7.2
        #LEIntField("cbSSPILong",0),		# introduce in TDS 7.2
        # end of OffsetLength field
        StrField("Payload", ""),
    ]
예제 #3
0
파일: tds.py 프로젝트: phibos/dionaea
class TDS_Token_DoneProc(Packet):
    name = "TDS Token DONEPROC"
    fields_desc = [
        #		ByteField("TokenType",0xfe),
        FlagsField("Status", 0, -16, TDS_Token_Status),
        LEShortField("CurCmd", 0xE0),
        LEIntField("DoneRowCount", 0),
    ]
예제 #4
0
파일: tds.py 프로젝트: phibos/dionaea
class TDS_Token_ColMetaData(Packet):
    name = "TDS Token COLMETADATA"
    #	tds_type = TDS_TYPES_TABULAR_RESULT
    fields_desc = [
        #		ByteField("TokenType",0x81),
        LEShortField("Count", 1),

        # SQL Server 2005 is LEIntField
        # SQL Server 2000 is LEShortField
        LEShortField("UserType", 0),
        FlagsField("Status", 0x1, -16, TDS_ColMetaData_Flags),

        # TypeInfo section
        # the value obtained with MS SQLServer 2005 client and server
        ByteField("Type", 0x38),  # 0x38 = INT4TYPE
        ByteField("ColNameLength", 0),
    ]
예제 #5
0
파일: packets.py 프로젝트: phibos/dionaea
class MySQL_Result_Field(Packet):
    name = "MySQL Result Field"
    fields_desc = [
        LengthCodedBinaryField("Catalog", None),
        LengthCodedBinaryField("Database", None),
        LengthCodedBinaryField("Table", None),
        LengthCodedBinaryField("ORGTable", None),
        LengthCodedBinaryField("Name", None),
        LengthCodedBinaryField("ORGName", None),
        ByteField("Filler", 0xc),
        LEShortField("CharSet", 0),
        LEIntField("Length", 0),
        XByteEnumField("Type", 0, MySQL_Field_Types),
        FlagsField("Flags", 0, -16, MySQL_Field_Flags),
        ByteField("Decimals", 0),
        LEShortField("Filler2", 0),
        LengthCodedBinaryField("Default", None),
    ]
예제 #6
0
파일: packets.py 프로젝트: phibos/dionaea
class MySQL_Server_Greeting(Packet):
    name = "MySQL Server Greeting"
    fields_desc = [
        ByteField("ProtocolVersion", 10),
        StrNullField("ServerVersion", "5.0.54"),
        IntField("ThreadID", 4711),
        StrFixedLenField("ScrambleBuffer", "a" * 8, 8),
        ByteField("Filler0", 0),
        FlagsField(
            "ServerCapabilities", CLIENT_LONG_FLAG | CLIENT_CONNECT_WITH_DB
            | CLIENT_COMPRESS | CLIENT_PROTOCOL_41 | CLIENT_TRANSACTIONS
            | CLIENT_SECURE_CONNECTION, -16, MySQL_Capabilities),
        ByteField("ServerLanguage", 33),
        LEShortEnumField("ServerStatus", SERVER_STATUS_AUTOCOMMIT,
                         MySQL_Server_Status),
        StrFixedLenField("Unused", b"", 13),
        StrNullField("Salt", " " * 12)
    ]