当前位置: 首页>>代码示例>>Python>>正文


Python LOG.warning方法代码示例

本文整理汇总了Python中impacket.LOG.warning方法的典型用法代码示例。如果您正苦于以下问题:Python LOG.warning方法的具体用法?Python LOG.warning怎么用?Python LOG.warning使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在impacket.LOG的用法示例。


在下文中一共展示了LOG.warning方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: write_raw

# 需要导入模块: from impacket import LOG [as 别名]
# 或者: from impacket.LOG import warning [as 别名]
def write_raw(self,tid,fid,data, offset = 0, wait_answer=1):
        LOG.warning("[MS-CIFS] This command was introduced in the CorePlus dialect, but is often listed as part of the LAN Manager 1.0 dialect.This command has been deprecated.Clients SHOULD use SMB_COM_WRITE_ANDX")
        smb = NewSMBPacket()
        smb['Tid']    = tid

        writeRaw = SMBCommand(SMB.SMB_COM_WRITE_RAW)
        writeRaw['Parameters'] = SMBWriteRaw_Parameters()
        writeRaw['Parameters']['Fid'] = fid
        writeRaw['Parameters']['Offset'] = offset
        writeRaw['Parameters']['Count'] = len(data)
        writeRaw['Parameters']['DataLength'] = 0
        writeRaw['Parameters']['DataOffset'] = 0
        smb.addCommand(writeRaw)

        self.sendSMB(smb)
        self._sess.send_packet(data)

        if wait_answer:
            smb = self.recvSMB()
            if smb.isValidAnswer(SMB.SMB_COM_WRITE_RAW):
                return smb
        return None 
开发者ID:joxeankoret,项目名称:CVE-2017-7494,代码行数:24,代码来源:smb.py

示例2: decode

# 需要导入模块: from impacket import LOG [as 别名]
# 或者: from impacket.LOG import warning [as 别名]
def decode(self, aBuffer):
        i = ImpactPacket.IP(aBuffer)
        self.set_decoded_protocol ( i )
        off = i.get_header_size()
        end = i.get_ip_len()
        # If ip_len == 0 we might be facing TCP segmentation offload, let's calculate the right len
        if end == 0:
            LOG.warning('IP len reported as 0, most probably because of TCP segmentation offload. Attempting to fix its size')
            i.set_ip_len(len(aBuffer))
            end = i.get_ip_len()

        if i.get_ip_p() == ImpactPacket.UDP.protocol:
            self.udp_decoder = UDPDecoder()
            packet = self.udp_decoder.decode(aBuffer[off:end])
        elif i.get_ip_p() == ImpactPacket.TCP.protocol:
            self.tcp_decoder = TCPDecoder()
            packet = self.tcp_decoder.decode(aBuffer[off:end])
        elif i.get_ip_p() == ImpactPacket.ICMP.protocol:
            self.icmp_decoder = ICMPDecoder()
            packet = self.icmp_decoder.decode(aBuffer[off:end])
        elif i.get_ip_p() == ImpactPacket.IGMP.protocol:
            self.igmp_decoder = IGMPDecoder()
            packet = self.igmp_decoder.decode(aBuffer[off:end])
        else:
            self.data_decoder = DataDecoder()
            packet = self.data_decoder.decode(aBuffer[off:end])
        i.contains(packet)
        return i 
开发者ID:joxeankoret,项目名称:CVE-2017-7494,代码行数:30,代码来源:ImpactDecoder.py

示例3: __init__

# 需要导入模块: from impacket import LOG [as 别名]
# 或者: from impacket.LOG import warning [as 别名]
def __init__(self, hive, isRemote = False):
        self.__hive = hive
        if isRemote is True:
            self.fd = self.__hive
            self.__hive.open()
        else:
            self.fd = open(hive,'rb')
        data = self.fd.read(4096)
        self.__regf = REG_REGF(data)
        self.indent = ''
        self.rootKey = self.__findRootKey()
        if self.rootKey is None:
            LOG.error("Can't find root key!")
        elif self.__regf['MajorVersion'] != 1 and self.__regf['MinorVersion'] > 5:
            LOG.warning("Unsupported version (%d.%d) - things might not work!" % (self.__regf['MajorVersion'], self.__regf['MinorVersion'])) 
开发者ID:joxeankoret,项目名称:CVE-2017-7494,代码行数:17,代码来源:winregistry.py

示例4: tree_connect

# 需要导入模块: from impacket import LOG [as 别名]
# 或者: from impacket.LOG import warning [as 别名]
def tree_connect(self, path, password = '', service = SERVICE_ANY):
        LOG.warning("[MS-CIFS] This is an original Core Protocol command.This command has been deprecated.Client Implementations SHOULD use SMB_COM_TREE_CONNECT_ANDX")

        # return 0x800
        if password:
            # Password is only encrypted if the server passed us an "encryption" during protocol dialect
            if self._dialects_parameters['ChallengeLength'] > 0:
                # this code is untested
                password = self.get_ntlmv1_response(ntlm.compute_lmhash(password))

        if not unicode_support:
            if unicode_convert:
                path = str(path)
            else:
                raise Exception('SMB: Can\t conver path from unicode!')

        smb = NewSMBPacket()
        treeConnect = SMBCommand(SMB.SMB_COM_TREE_CONNECT)
        treeConnect['Parameters'] = SMBTreeConnect_Parameters()
        treeConnect['Data']       = SMBTreeConnect_Data()
        treeConnect['Data']['Path'] = path.upper()
        treeConnect['Data']['Password'] = password
        treeConnect['Data']['Service'] = service
        smb.addCommand(treeConnect)
        self.sendSMB(smb)

        while 1:
            smb = self.recvSMB()
            if smb.isValidAnswer(SMB.SMB_COM_TREE_CONNECT):
                # XXX Here we are ignoring the rest of the response
                return smb['Tid']
            return smb['Tid'] 
开发者ID:joxeankoret,项目名称:CVE-2017-7494,代码行数:34,代码来源:smb.py

示例5: get_protocol_version

# 需要导入模块: from impacket import LOG [as 别名]
# 或者: from impacket.LOG import warning [as 别名]
def get_protocol_version(self):
        LOG.warning('deprecated soon')
        return self.get_ip_v() 
开发者ID:joxeankoret,项目名称:CVE-2017-7494,代码行数:5,代码来源:IP6.py

示例6: get_destination_address

# 需要导入模块: from impacket import LOG [as 别名]
# 或者: from impacket.LOG import warning [as 别名]
def get_destination_address(self):
        LOG.warning('deprecated soon')
        return self.get_ip_dst() 
开发者ID:joxeankoret,项目名称:CVE-2017-7494,代码行数:5,代码来源:IP6.py

示例7: set_protocol_version

# 需要导入模块: from impacket import LOG [as 别名]
# 或者: from impacket.LOG import warning [as 别名]
def set_protocol_version(self, version):
        LOG.warning('deprecated soon')
        self.set_ip_v(version) 
开发者ID:joxeankoret,项目名称:CVE-2017-7494,代码行数:5,代码来源:IP6.py

示例8: set_source_address

# 需要导入模块: from impacket import LOG [as 别名]
# 或者: from impacket.LOG import warning [as 别名]
def set_source_address(self, source_address):
        LOG.warning('deprecated soon')
        self.set_ip_src(source_address) 
开发者ID:joxeankoret,项目名称:CVE-2017-7494,代码行数:5,代码来源:IP6.py

示例9: set_destination_address

# 需要导入模块: from impacket import LOG [as 别名]
# 或者: from impacket.LOG import warning [as 别名]
def set_destination_address(self, destination_address):
        LOG.warning('deprecated soon')
        self.set_ip_dst(destination_address) 
开发者ID:joxeankoret,项目名称:CVE-2017-7494,代码行数:5,代码来源:IP6.py

示例10: get_source_address

# 需要导入模块: from impacket import LOG [as 别名]
# 或者: from impacket.LOG import warning [as 别名]
def get_source_address(self):
        LOG.warning('deprecated soon')
        return self.get_ip_src() 
开发者ID:Coalfire-Research,项目名称:Slackor,代码行数:5,代码来源:IP6.py


注:本文中的impacket.LOG.warning方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。