3,699
edits
No edit summary |
m (→Source) |
||
Line 110: | Line 110: | ||
#self.child.info(('%s%s -ac:%s:%s %s') %(self.__options['avdump'], self.__options['param'], self.__options['user'], self.__options['pass'], self.__options['scanpath'])) | #self.child.info(('%s%s -ac:%s:%s %s') %(self.__options['avdump'], self.__options['param'], self.__options['user'], self.__options['pass'], self.__options['scanpath'])) | ||
arg = (u'%s%s -ac:%s:%s %s') %(self.__options['avdump'], self.__options['param'], self.__options['user'], self.__options['pass'], self.__options['scanpath']) | arg = (u'%s%s -ac:%s:%s %s') %(self.__options['avdump'], self.__options['param'], self.__options['user'], self.__options['pass'], self.__options['scanpath']) | ||
subprocessw.Popen(arg) | subprocessw.Popen(arg) | ||
Line 372: | Line 371: | ||
</pre> | </pre> | ||
===wrapper module for subprocess by rar=== | |||
<pre style="font-size: 60%;"> | <pre style="font-size: 60%;"> | ||
import subprocess | import subprocess | ||
from subprocess import call, PIPE, STDOUT, list2cmdline, mswindows | from subprocess import call, PIPE, STDOUT, list2cmdline, mswindows | ||
import ctypes | import ctypes | ||
import ctypes.wintypes | import ctypes.wintypes | ||
Line 408: | Line 408: | ||
("dwThreadId", ctypes.wintypes.DWORD)) | ("dwThreadId", ctypes.wintypes.DWORD)) | ||
if mswindows: | |||
class Popen(subprocess.Popen): | |||
def _execute_child(self, args, executable, preexec_fn, close_fds, | def _execute_child(self, args, executable, preexec_fn, close_fds, | ||
cwd, env, universal_newlines, | cwd, env, universal_newlines, | ||
Line 436: | Line 427: | ||
return | return | ||
if startupinfo == None: | if startupinfo == None: | ||
startupinfo = | startupinfo = STARTUPINFOW() | ||
else: | else: | ||
raise NotImplementedError("Can't pass startup stuff") | raise NotImplementedError("Can't pass startup stuff") | ||
Line 444: | Line 434: | ||
if not None in (p2cread, c2pwrite, errwrite): | if not None in (p2cread, c2pwrite, errwrite): | ||
raise NotImplementedError("Can't pass file object bits") | raise NotImplementedError("Can't pass file object bits") | ||
if shell: | if shell: | ||
Line 469: | Line 455: | ||
self.pid = pid | self.pid = pid | ||
CloseHandle(ht) # ht.Close() | CloseHandle(ht) # ht.Close() | ||
else: | |||
Popen = subprocess.Popen | |||
</pre> | </pre> | ||
[[Category:Avdump]] | [[Category:Avdump]] |