wootski / impacket

Automatically exported from code.google.com/p/impacket
Other
0 stars 0 forks source link

Error on function set_bytes_from_string in ImpactPacket.py #40

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm trying to run one simple ICMP Spoofing (attached) but i'm getting:

Traceback (most recent call last):
  File "main.py", line 26, in <module>
    icmp.contains(ImpactPacket.Data("a"*100))
  File "/usr/local/lib/python2.7/dist-packages/impacket/ImpactPacket.py", line 485, in __init__
    self.set_data(aBuffer)
  File "/usr/local/lib/python2.7/dist-packages/impacket/ImpactPacket.py", line 488, in set_data
    self.set_bytes_from_string(data)
  File "/usr/local/lib/python2.7/dist-packages/impacket/ImpactPacket.py", line 59, in set_bytes_from_string
    self.__bytes = array.array('B', data)
TypeError: an integer is required

Thank you.

Original issue reported on code.google.com by rafael.c...@gmail.com on 26 Mar 2014 at 1:02

Attachments:

GoogleCodeExporter commented 9 years ago
Env (Mint 16):
Linux nebula 3.11.0-12-generic #19-Ubuntu SMP Wed Oct 9 16:20:46 UTC 2013 
x86_64 x86_64 x86_64 GNU/Linux

Python:
Python 2.7.5+

Impacket Version:
0.9.11 installed with setup.py

Original comment by rafael.c...@gmail.com on 26 Mar 2014 at 1:06

GoogleCodeExporter commented 9 years ago
The error is because in my ran I added:

from __future__ import unicode_literals

and it appears to doesn't work with it...

Thanks.

Original comment by rafael.c...@gmail.com on 26 Mar 2014 at 7:16