Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
c359d1e2
Commit
c359d1e2
authored
Nov 22, 2015
by
kelianchun_miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update connect.py
parent
0c42d039
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
connect.py
connect.py
+3
-3
No files found.
connect.py
View file @
c359d1e2
...
@@ -96,7 +96,7 @@ class Tty(object):
...
@@ -96,7 +96,7 @@ class Tty(object):
return
False
return
False
@staticmethod
@staticmethod
def
deal_command
(
str_r
,
ssh
):
def
deal_command
(
str_r
):
"""
"""
处理命令中特殊字符
处理命令中特殊字符
"""
"""
...
@@ -384,11 +384,11 @@ class SshTty(Tty):
...
@@ -384,11 +384,11 @@ class SshTty(Tty):
match
=
pattern
.
search
(
chan_str
)
match
=
pattern
.
search
(
chan_str
)
if
match
:
if
match
:
VIM_FLAG
=
False
VIM_FLAG
=
False
data
=
self
.
deal_command
(
data
,
self
.
ssh
)
data
=
self
.
deal_command
(
data
)
if
len
(
data
)
>
0
:
if
len
(
data
)
>
0
:
TtyLog
(
log
=
log
,
datetime
=
datetime
.
datetime
.
now
(),
cmd
=
data
)
.
save
()
TtyLog
(
log
=
log
,
datetime
=
datetime
.
datetime
.
now
(),
cmd
=
data
)
.
save
()
else
:
else
:
data
=
self
.
deal_command
(
data
,
self
.
ssh
)
data
=
self
.
deal_command
(
data
)
if
len
(
data
)
>
0
:
if
len
(
data
)
>
0
:
TtyLog
(
log
=
log
,
datetime
=
datetime
.
datetime
.
now
(),
cmd
=
data
)
.
save
()
TtyLog
(
log
=
log
,
datetime
=
datetime
.
datetime
.
now
(),
cmd
=
data
)
.
save
()
data
=
''
data
=
''
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment