Exemplo n.º 1
0
    def _printGLOBSET(self, pos):
        runner = GLOBSetRunner(self.data, pos)
        consumed = runner.run()
        count = 0
        for r in runner.ranges:
            print "        %d: [0x%.12x:0x%.12x]" % ((count,) + r)
            count = count + 1

        return consumed
    def _printGLOBSET(self, pos):
        runner = GLOBSetRunner(self.data, pos)
        consumed = runner.run()
        count = 0
        for r in runner.ranges:
            print "        %d: [0x%.12x:0x%.12x]" % ((count, ) + r)
            count = count + 1

        return consumed
def PrintUploadStream(data):
    dataLen = len(data)
    if dataLen < 16:
        raise Exception, "Data buffer is only %d bytes long" % dataLen

    start = struct.unpack_from("<LHH", data, 0)
    final = struct.unpack_from(">HHL", data, 8)
    print "{%.8x-%.4x-%.4x-%.4x-%.4x%.8x}" % (start + final)

    runner = GLOBSetRunner(data, 16)
    consumed = runner.run()
    count = 0
    for r in runner.ranges:
        print "        %d: [0x%.12x:0x%.12x]" % ((count, ) + r)
        count = count + 1
Exemplo n.º 4
0
def PrintUploadStream(data):
    dataLen = len(data)
    if dataLen < 16:
        raise Exception, "Data buffer is only %d bytes long" % dataLen

    start = struct.unpack_from("<LHH", data, 0)
    final = struct.unpack_from(">HHL", data, 8)
    print "{%.8x-%.4x-%.4x-%.4x-%.4x%.8x}" % (start + final)

    runner = GLOBSetRunner(data, 16)
    consumed = runner.run()
    count = 0
    for r in runner.ranges:
        print "        %d: [0x%.12x:0x%.12x]" % ((count,) + r)
        count = count + 1