LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   winexe (https://www.linuxquestions.org/questions/linux-software-2/winexe-780343/)

listener 01-06-2010 01:49 PM

winexe
 
Has anyone messed with winexe? It's a very cool program. Let's you get into Windows from Linux.

http://eol.ovh.org/winexe/


[]# ./winexe -U domain/username%*****//my.site.com 'cmd'

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\WINDOWS\system32>


However it seems to have some limits. For example, I can't get it to work with "wmic" commands. For example:

[]# ./winexe -U domain/username%***** //mysite.com 'wmic share get caption,name,path'

it hangs...

mostlyharmless 01-06-2010 02:25 PM

Interesting. Anyone tried it for virtual guests on the same machine, kind of as a cli version of vmware?

yuletak 02-26-2014 07:17 PM

If this still hangs, it could be due to winexe's dealings with pipes.

My version of winexe:
[Wed Feb 26, 12:12:54 in ~]=> ./winexe --version
Version 4.0.0alpha11-GIT-UNKNOWN

I can run your command via the CLI with no problems. I also do this in non-interactive mode. If you run it from the background like in Nagios (via a Python script for example), you'll have problems if you don't do something w/ stdin, e.g. cat < /dev/null | /path-to/winexe

Note that Python's subprocess module has a minor note regarding the limits of reading from stdout, which is 65k. Anymore than that and it will hang. There are some solutions out in the web. Search on "subprocess pipe enemy".


All times are GMT -5. The time now is 03:16 PM.