Closed GoogleCodeExporter closed 9 years ago
Wow.. nice catch Bryan.. Can you send me an output of the error you receive?
Original comment by bet...@gmail.com
on 10 Sep 2012 at 5:26
caught exception: ("'L' format requires 0 <= number <= 4294967295", "When
packing field 'pNetName | <L | 4410144592' in
impacket.dcerpc.srvsvc.SRVSVCShareInfo1")
Original comment by bryanbu...@gmail.com
on 10 Sep 2012 at 5:28
here's a random test in my environment:
In [1]: x = id('test')
In [2]: x
Out[2]: 4341761680
In [3]: x > 2**32
Out[3]: True
In [4]: x - 2**32
Out[4]: 46794384
In [5]: import struct
In [6]: struct.pack('>L', x)
---------------------------------------------------------------------------
error Traceback (most recent call last)
<ipython-input-6-80b596231688> in <module>()
----> 1 struct.pack('>L', x)
error: 'L' format requires 0 <= number <= 4294967295
Original comment by bryanbu...@gmail.com
on 10 Sep 2012 at 5:29
Great...
Yep.. your fix indeed solves the problem.. but only if the definition of the
structure field is '<L' (otherwise the mask should be changed).. stick to that
fix.. and let me review the other parts of the library when id() is used and
see if I can come up with something more general, that can check the
structure's definition as well.
We had a similar issue in the past in structure (it uses id() for some stuff
too..)...
graciass!
bto
Original comment by bet...@gmail.com
on 10 Sep 2012 at 5:33
Okey..
There weren't many other instances of the same problem.. (just a few in
svcctl). Fixed in http://code.google.com/p/impacket/source/detail?r=715
Let me know if it works...
thanks bryan!
Original comment by bet...@gmail.com
on 10 Sep 2012 at 7:41
Original issue reported on code.google.com by
bryanbu...@gmail.com
on 10 Sep 2012 at 5:14