Twi1ight / impacket

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

svcctl.py StartServiceW does not work at the moment #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I found your TODO note in line 760 of svcctl.py and indeed I confirm 
StartServiceW() method does not work as per definition the arguments must be 
provided, therefore I had to leave the start service to still use the old 
method:
data = self.__svc.start_service(self.__svc_handle, srvargs)

From 
http://msdn.microsoft.com/en-us/library/windows/desktop/ms686321(v=vs.85).aspx:

"[...] the first argument (lpServiceArgVectors[0]) is the name of the service, 
followed by any additional arguments (lpServiceArgVectors[1] through 
lpServiceArgVectors[dwNumServiceArgs-1])."

Original issue reported on code.google.com by bernardo.damele on 18 Jan 2012 at 2:27

GoogleCodeExporter commented 9 years ago
Hey Bernardo:

Check http://code.google.com/p/impacket/source/detail?r=492

I haven't tested it much, so let me know if it works. Don't forget to pass the 
arguments Unicode encoded, like:

rpc.StartServiceW(serviceHandle, 
['hola'.encode('utf-16le'),'beto'.encode('utf-16le'),'como 
andas'.encode('utf-16le')])

Original comment by bet...@gmail.com on 27 Feb 2012 at 9:01

GoogleCodeExporter commented 9 years ago
It works, thank you.

Original comment by bernardo.damele on 28 Feb 2012 at 1:35