Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
coco
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
coco
Commits
6f4273c6
Unverified
Commit
6f4273c6
authored
Nov 11, 2018
by
老广
Committed by
GitHub
Nov 11, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #124 from jumpserver/dev
Dev
parents
5f8d1227
88a9e2d3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
128 additions
and
69 deletions
+128
-69
connection.py
coco/connection.py
+3
-3
connector.py
coco/httpd/elfinder/connector.py
+0
-1
interactive.py
coco/interactive.py
+0
-0
coco.mo
locale/en/LC_MESSAGES/coco.mo
+0
-0
coco.po
locale/en/LC_MESSAGES/coco.po
+58
-30
coco.mo
locale/zh_CN/LC_MESSAGES/coco.mo
+0
-0
coco.po
locale/zh_CN/LC_MESSAGES/coco.po
+63
-33
requirements.txt
requirements/requirements.txt
+4
-2
No files found.
coco/connection.py
View file @
6f4273c6
...
...
@@ -183,13 +183,13 @@ class TelnetConnection:
r'incorrect|failed|失败|错误'
,
re
.
I
)
self
.
username_pattern
=
re
.
compile
(
r'login:
\s*$|username:\s*$|用户名:\s*$|账\s*号:
\s*$'
,
re
.
I
r'login:
?\s*$|username:?\s*$|用户名:?\s*$|账\s*号:?
\s*$'
,
re
.
I
)
self
.
password_pattern
=
re
.
compile
(
r'
password:\s*$|passwd:\s*$|密\s*码:
\s*$'
,
re
.
I
r'
Password:?\s*$|passwd:?\s*$|密\s*码:?
\s*$'
,
re
.
I
)
self
.
success_pattern
=
re
.
compile
(
r'Last\s*login|success|成功'
,
re
.
I
r'Last\s*login|success|成功
|#|\$
'
,
re
.
I
)
def
get_socket
(
self
):
...
...
coco/httpd/elfinder/connector.py
View file @
6f4273c6
...
...
@@ -40,7 +40,6 @@ class ElFinderConnector:
'uplMaxSize'
:
'10M'
,
'options'
:
{
'separator'
:
'/'
,
'disabled'
:
[],
'archivers'
:
{
'create'
:
[],
'extract'
:
[]
...
...
coco/interactive.py
View file @
6f4273c6
This diff is collapsed.
Click to expand it.
locale/en/LC_MESSAGES/coco.mo
View file @
6f4273c6
No preview for this file type
locale/en/LC_MESSAGES/coco.po
View file @
6f4273c6
...
...
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-10-
10 15:22
+0800\n"
"POT-Creation-Date: 2018-10-
31 11:49
+0800\n"
"PO-Revision-Date: 2018-08-10 10:42+0800\n"
"Last-Translator: BaiJiangjie <bugatti_it@163.com>\n"
"Language-Team: Language locale/en/LC\n"
...
...
@@ -16,11 +16,11 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: coco/app.py:1
41
#: coco/app.py:1
35
msgid "Connect idle more than {} minutes, disconnect"
msgstr ""
#: coco/interactive.py:
61
#: coco/interactive.py:
80
#, python-brace-format
msgid ""
"\n"
...
...
@@ -28,115 +28,143 @@ msgid ""
"{end}{R}{R}"
msgstr ""
#: coco/interactive.py:
63
#: coco/interactive.py:
82
#, python-brace-format
msgid ""
"{T}1) Enter {green}ID{end} directly login or enter {green}part IP, Hostname, "
"Comment{end} to search login(if unique).{R}"
msgstr ""
#: coco/interactive.py:
64
#: coco/interactive.py:
83
#, python-brace-format
msgid ""
"{T}2) Enter {green}/{end} + {green}IP, Hostname{end} or {green}Comment {end} "
"search, such as: /ip.{R}"
msgstr ""
#: coco/interactive.py:
65
#: coco/interactive.py:
84
#, python-brace-format
msgid "{T}3) Enter {green}p{end} to display the host you have permission.{R}"
msgstr ""
#: coco/interactive.py:
66
#: coco/interactive.py:
85
#, python-brace-format
msgid ""
"{T}4) Enter {green}g{end} to display the node that you have permission.{R}"
msgstr ""
#: coco/interactive.py:
67
#: coco/interactive.py:
86
#, python-brace-format
msgid ""
"{T}5) Enter {green}g{end} + {green}
Group ID{end} to display the host under
"
"
the
node, such as g1.{R}"
"{T}5) Enter {green}g{end} + {green}
NodeID{end} to display the host under the
"
"node, such as g1.{R}"
msgstr ""
#: coco/interactive.py:
68
#: coco/interactive.py:
87
#, python-brace-format
msgid "{T}6) Enter {green}s{end} Chinese-english switch.{R}"
msgstr ""
#: coco/interactive.py:
69
#: coco/interactive.py:
88
#, python-brace-format
msgid "{T}7) Enter {green}h{end} help.{R}"
msgstr ""
#: coco/interactive.py:
70
#: coco/interactive.py:
89
#, python-brace-format
msgid "{T}0) Enter {green}q{end} exit.{R}"
msgstr ""
#: coco/interactive.py:1
42
#: coco/interactive.py:1
59
msgid "No"
msgstr ""
#: coco/interactive.py:1
49
#: coco/interactive.py:1
66
msgid "Name"
msgstr ""
#: coco/interactive.py:1
49
#: coco/interactive.py:1
66
msgid "Assets"
msgstr ""
#: coco/interactive.py:1
55
#: coco/interactive.py:1
72
msgid "Total: {}"
msgstr ""
#: coco/interactive.py:161
#: coco/interactive.py:177
msgid "Node [ ID.Name(Asset) ]"
msgstr ""
#: coco/interactive.py:179
msgid "Enter g+NodeID to display the host under the node, such as g1."
msgstr ""
#: coco/interactive.py:186
msgid "There is no matched node, please re-enter"
msgstr ""
#: coco/interactive.py:1
72
#: coco/interactive.py:1
97
msgid "ID"
msgstr ""
#: coco/interactive.py:1
72
#: coco/interactive.py:1
97
msgid "Hostname"
msgstr ""
#: coco/interactive.py:1
72
#: coco/interactive.py:1
97
msgid "IP"
msgstr ""
#: coco/interactive.py:1
72
#: coco/interactive.py:1
97
msgid "LoginAs"
msgstr ""
#: coco/interactive.py:
186
#: coco/interactive.py:
211
msgid "Comment"
msgstr ""
#: coco/interactive.py:
194
msgid "
Total: {} Match
: {}"
#: coco/interactive.py:
221
msgid "
Page: {}, Count: {}, Total Page: {}, Total Count
: {}"
msgstr ""
#: coco/interactive.py:2
37
#: coco/interactive.py:2
96
msgid "Select a login:: "
msgstr ""
#: coco/interactive.py:
260
#: coco/interactive.py:
319
msgid ""
"Terminal does not support login Windows, please use web terminal to access"
msgstr ""
#: coco/interactive.py:271
#: coco/interactive.py:401
msgid "Tips: Enter the asset ID and log directly into the asset."
msgstr ""
#: coco/interactive.py:402
msgid "Page up: P/p"
msgstr ""
#: coco/interactive.py:403
msgid "Page down: Enter|N/n"
msgstr ""
#: coco/interactive.py:404
msgid "BACK: B/b"
msgstr ""
#: coco/interactive.py:425
msgid "No system user"
msgstr ""
#: coco/proxy.py:88
#: coco/models.py:247
msgid "Command `{}` is forbidden ........"
msgstr ""
#: coco/proxy.py:89
msgid "No permission"
msgstr ""
#: coco/proxy.py:13
0
#: coco/proxy.py:13
1
msgid "Connecting to {}@{} {:.1f}"
msgstr ""
...
...
locale/zh_CN/LC_MESSAGES/coco.mo
View file @
6f4273c6
No preview for this file type
locale/zh_CN/LC_MESSAGES/coco.po
View file @
6f4273c6
...
...
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-10-
10 15:22
+0800\n"
"POT-Creation-Date: 2018-10-
31 11:49
+0800\n"
"PO-Revision-Date: 2018-08-10 10:42+0800\n"
"Last-Translator: BaiJiangjie <bugatti_it@163.com>\n"
"Language-Team: Language locale/zh\n"
...
...
@@ -16,11 +16,11 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: coco/app.py:1
41
#: coco/app.py:1
35
msgid "Connect idle more than {} minutes, disconnect"
msgstr "空闲时间超过 {} 分钟,断开连接"
#: coco/interactive.py:
61
#: coco/interactive.py:
80
#, python-brace-format
msgid ""
"\n"
...
...
@@ -30,7 +30,7 @@ msgstr ""
"\n"
"{T}{T}{title} {user}, 欢迎使用Jumpserver开源跳板机系统 {end}{R}{R}"
#: coco/interactive.py:
63
#: coco/interactive.py:
82
#, python-brace-format
msgid ""
"{T}1) Enter {green}ID{end} directly login or enter {green}part IP, Hostname, "
...
...
@@ -39,7 +39,7 @@ msgstr ""
"{T}1) 输入 {green}ID{end} 直接登录 或 输入{green}部分 IP,主机名,备注{end} 进"
"行搜索登录(如果唯一).{R}"
#: coco/interactive.py:
64
#: coco/interactive.py:
83
#, python-brace-format
msgid ""
"{T}2) Enter {green}/{end} + {green}IP, Hostname{end} or {green}Comment {end} "
...
...
@@ -48,104 +48,134 @@ msgstr ""
"{T}2) 输入 {green}/{end} + {green}IP, 主机名{end} or {green}备注 {end}搜索. "
"如: /ip{R}"
#: coco/interactive.py:
65
#: coco/interactive.py:
84
#, python-brace-format
msgid "{T}3) Enter {green}p{end} to display the host you have permission.{R}"
msgstr "{T}3) 输入 {green}p{end} 显示您有权限的主机.{R}"
#: coco/interactive.py:
66
#: coco/interactive.py:
85
#, python-brace-format
msgid ""
"{T}4) Enter {green}g{end} to display the node that you have permission.{R}"
msgstr "{T}4) 输入 {green}g{end} 显示您有权限的节点.{R}"
#: coco/interactive.py:67
#, python-brace-format
#: coco/interactive.py:86
msgid ""
"{T}5) Enter {green}g{end} + {green}
Group ID{end} to display the host under
"
"
the
node, such as g1.{R}"
msgstr "{T}5) 输入 {green}g{end} + {green}
组
ID{end} 显示节点下主机. 如: g1{R}"
"{T}5) Enter {green}g{end} + {green}
NodeID{end} to display the host under the
"
"node, such as g1.{R}"
msgstr "{T}5) 输入 {green}g{end} + {green}
节点
ID{end} 显示节点下主机. 如: g1{R}"
#: coco/interactive.py:
68
#: coco/interactive.py:
87
#, python-brace-format
msgid "{T}6) Enter {green}s{end} Chinese-english switch.{R}"
msgstr "{T}6) 输入 {green}s{end} 中/英文切换.{R}"
#: coco/interactive.py:
69
#: coco/interactive.py:
88
#, python-brace-format
msgid "{T}7) Enter {green}h{end} help.{R}"
msgstr "{T}7) 输入 {green}h{end} 帮助.{R}"
#: coco/interactive.py:
70
#: coco/interactive.py:
89
#, python-brace-format
msgid "{T}0) Enter {green}q{end} exit.{R}"
msgstr "{T}0) 输入 {green}q{end} 退出.{R}"
#: coco/interactive.py:1
42
#: coco/interactive.py:1
59
msgid "No"
msgstr "无"
#: coco/interactive.py:1
49
#: coco/interactive.py:1
66
msgid "Name"
msgstr "名称"
#: coco/interactive.py:1
49
#: coco/interactive.py:1
66
msgid "Assets"
msgstr "资产"
#: coco/interactive.py:1
55
#: coco/interactive.py:1
72
msgid "Total: {}"
msgstr "总共: {}"
#: coco/interactive.py:161
#: coco/interactive.py:177
msgid "Node: [ ID.Name(Asset amount) ]"
msgstr "节点: [ ID.名称(资产数量) ]"
#: coco/interactive.py:179
msgid "Tips: Enter g+NodeID to display the host under the node, such as g1"
msgstr "提示: 输入 g+节点ID 显示节点下主机. 如: g1"
#: coco/interactive.py:186
msgid "There is no matched node, please re-enter"
msgstr "没有匹配分组,请重新输入"
#: coco/interactive.py:1
72
#: coco/interactive.py:1
97
msgid "ID"
msgstr ""
#: coco/interactive.py:1
72
#: coco/interactive.py:1
97
msgid "Hostname"
msgstr "主机名"
#: coco/interactive.py:1
72
#: coco/interactive.py:1
97
msgid "IP"
msgstr ""
#: coco/interactive.py:1
72
#: coco/interactive.py:1
97
msgid "LoginAs"
msgstr "登录用户"
#: coco/interactive.py:
186
#: coco/interactive.py:
211
msgid "Comment"
msgstr "备注"
#: coco/interactive.py:
194
msgid "
Total: {} Match
: {}"
msgstr "
总共: {} 匹配
: {}"
#: coco/interactive.py:
221
msgid "
Page: {}, Count: {}, Total Page: {}, Total Count
: {}"
msgstr "
页码: {}, 数量: {}, 总页数: {}, 总数量
: {}"
#: coco/interactive.py:2
37
#: coco/interactive.py:2
96
msgid "Select a login:: "
msgstr "选择一个登录:"
#: coco/interactive.py:
260
#: coco/interactive.py:
319
msgid ""
"Terminal does not support login Windows, please use web terminal to access"
msgstr "终端不支持登录windows, 请使用web terminal访问"
#: coco/interactive.py:271
#: coco/interactive.py:401
msgid "Tips: Enter the asset ID and log directly into the asset."
msgstr "提示: 输入资产ID,直接登录资产."
#: coco/interactive.py:402
msgid "Page up: P/p"
msgstr "上一页: P/p"
#: coco/interactive.py:403
msgid "Page down: Enter|N/n"
msgstr "下一页: Enter|N/n"
#: coco/interactive.py:404
msgid "BACK: B/b"
msgstr "返回: B/b"
#: coco/interactive.py:425
msgid "No system user"
msgstr "没有系统用户"
#: coco/proxy.py:88
#: coco/models.py:247
msgid "Command `{}` is forbidden ........"
msgstr ""
#: coco/proxy.py:89
msgid "No permission"
msgstr "没有权限"
#: coco/proxy.py:13
0
#: coco/proxy.py:13
1
msgid "Connecting to {}@{} {:.1f}"
msgstr "开始连接到 {}@{} {:.1f}"
#: coco/session.py:143
msgid "Terminated by administrator"
msgstr "被管理员中断"
#~ msgid "Total: {} Match: {}"
#~ msgstr "总共: {} 匹配: {}"
requirements/requirements.txt
View file @
6f4273c6
...
...
@@ -18,8 +18,8 @@ idna==2.6
itsdangerous==0.24
Jinja2==2.10
jmespath==0.9.3
jms-storage==0.0.
19
jumpserver-python-sdk==0.0.5
0
jms-storage==0.0.
20
jumpserver-python-sdk==0.0.5
1
MarkupSafe==1.0
oss2==2.4.0
paramiko==2.4.1
...
...
@@ -42,3 +42,5 @@ urllib3==1.22
wcwidth==0.1.7
eventlet==0.24.1
Werkzeug==0.14.1
treelib==1.5.3
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