Show More
@@ -189,7 +189,7 b' def magic_kill(self,line):' | |||||
189 | magic_tasks(self,line) |
|
189 | magic_tasks(self,line) | |
190 |
|
190 | |||
191 | if sys.platform == 'win32': |
|
191 | if sys.platform == 'win32': | |
192 |
shell_internal_commands = 'break chcp cls copy ctty date del erase dir md mkdir path prompt rd rmdir time |
|
192 | shell_internal_commands = 'break chcp cls copy ctty date del erase dir md mkdir path prompt rd rmdir time type ver vol'.split() | |
193 | else: |
|
193 | else: | |
194 | # todo linux commands |
|
194 | # todo linux commands | |
195 | shell_internal_commands = [] |
|
195 | shell_internal_commands = [] | |
@@ -199,7 +199,7 b' def jobctrl_shellcmd(ip,cmd):' | |||||
199 | """ os.system replacement that stores process info to db['tasks/t1234'] """ |
|
199 | """ os.system replacement that stores process info to db['tasks/t1234'] """ | |
200 | cmd = cmd.strip() |
|
200 | cmd = cmd.strip() | |
201 | cmdname = cmd.split(None,1)[0] |
|
201 | cmdname = cmd.split(None,1)[0] | |
202 | if cmdname in shell_internal_commands: |
|
202 | if cmdname in shell_internal_commands or '|' in cmd or '>' in cmd or '<' in cmd: | |
203 | use_shell = True |
|
203 | use_shell = True | |
204 | else: |
|
204 | else: | |
205 | use_shell = False |
|
205 | use_shell = False |
General Comments 0
You need to be logged in to leave comments.
Login now