oulan / impacket

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

Python 2.6 support for OrderedDict #42

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try to run wmiexec.py w/ Python 2.6 using ordereddict installed via pip on 
Debian 7 x64

# pip install ordereddict
Downloading/unpacking ordereddict
  Downloading ordereddict-1.1.tar.gz
  Running setup.py egg_info for package ordereddict
Installing collected packages: ordereddict
  Running setup.py install for ordereddict
Successfully installed ordereddict
Cleaning up...

What is the expected output? What do you see instead?

Expected:

Impacket v0.9.12-dev - Copyright 2002-2014 Core Security Technologies

Password:
SMBv2.1 dialect used
[!] Launching semi-interactive shell - Careful what you execute
C:\>

Saw:

./wmiexec.py administrator@172.16.102.216
Traceback (most recent call last):
  File "./wmiexec.py", line 34, in <module>
    from impacket.dcerpc.v5.dcom import wmi
  File "/usr/local/lib/python2.6/dist-packages/impacket/dcerpc/v5/dcom/wmi.py", line 51, in <module>
    from ordereddict.ordereddict import OrderedDict
ImportError: No module named ordereddict

What version of the product are you using? On what operating system?

Trunk

Please provide any additional information below.

Fix was to change:
   python2.6/dist-packages/impacket/dcerpc/v5/dcom/wmi.py

Line: 51
from:
    from ordereddict.ordereddict import OrderedDict
to:
    from ordereddict import OrderedDict

Original issue reported on code.google.com by jd.mu...@gmail.com on 16 Apr 2014 at 7:54

GoogleCodeExporter commented 9 years ago
Thanks for the report.. 

I need to leave ordereddict.ordereddict for Impact.. but I will add the import 
you mentioned as another try/except clause.. I don't like it but for the 
moment, until I figured it out, solve the problem. 

I thought, under standalone python OrderedDict was located under collections.

thanks again!
beto

Original comment by bet...@gmail.com on 16 Apr 2014 at 8:22

GoogleCodeExporter commented 9 years ago
Fixed in https://code.google.com/p/impacket/source/detail?r=1217

Let me know if it works.

thanks dude!
bto

Original comment by bet...@gmail.com on 16 Apr 2014 at 8:33