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
a7904a8d
Commit
a7904a8d
authored
Nov 11, 2014
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改一些bug
parent
a4e6fef2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
views.py
webroot/AutoSa/AutoSa/views.py
+6
-2
log_handler.py
webroot/AutoSa/log_handler.py
+1
-1
runserver
webroot/AutoSa/runserver
+2
-1
No files found.
webroot/AutoSa/AutoSa/views.py
View file @
a7904a8d
...
@@ -290,7 +290,11 @@ def downKey(request):
...
@@ -290,7 +290,11 @@ def downKey(request):
username
=
request
.
GET
.
get
(
'username'
)
username
=
request
.
GET
.
get
(
'username'
)
filename
=
'
%
s/
%
s'
%
(
rsa_dir
,
username
)
filename
=
'
%
s/
%
s'
%
(
rsa_dir
,
username
)
f
=
open
(
filename
)
try
:
f
=
open
(
filename
)
except
IOError
:
error
=
u'密钥文件不存在'
return
render_to_response
(
'info.html'
,
{
'error'
:
error
})
data
=
f
.
read
()
data
=
f
.
read
()
f
.
close
()
f
.
close
()
response
=
HttpResponse
(
data
,
content_type
=
'application/octet-stream'
)
response
=
HttpResponse
(
data
,
content_type
=
'application/octet-stream'
)
...
@@ -1120,7 +1124,7 @@ def killSession(request):
...
@@ -1120,7 +1124,7 @@ def killSession(request):
if
pid
:
if
pid
:
pid
=
pid
[
0
]
pid
=
pid
[
0
]
os
.
kill
(
pid
.
cpid
,
9
)
os
.
kill
(
pid
.
cpid
,
9
)
return
HttpResponse
(
'ok'
)
return
render_to_response
(
'info.html'
,
{
'msg'
:
u'结束会话成功,返回中.'
}
)
...
...
webroot/AutoSa/log_handler.py
View file @
a7904a8d
...
@@ -24,7 +24,7 @@ def log_hanler(logid):
...
@@ -24,7 +24,7 @@ def log_hanler(logid):
ret2
=
os
.
system
(
'cat
%
s | grep "
\
[.*@.*
\
][
\
$
\
#]" >>
%
s.his'
%
(
filename
,
filename
))
ret2
=
os
.
system
(
'cat
%
s | grep "
\
[.*@.*
\
][
\
$
\
#]" >>
%
s.his'
%
(
filename
,
filename
))
ret3
=
os
.
system
(
'cat
%
s | grep "EndTime" >>
%
s.his'
%
(
filename
,
filename
))
ret3
=
os
.
system
(
'cat
%
s | grep "EndTime" >>
%
s.his'
%
(
filename
,
filename
))
if
(
ret1
+
ret2
+
ret3
)
==
0
:
if
(
ret1
+
ret2
+
ret3
)
==
0
:
print
'Handler
%
ok.'
%
filename
print
'Handler
%
s
ok.'
%
filename
def
set_finish
(
id
):
def
set_finish
(
id
):
...
...
webroot/AutoSa/runserver
View file @
a7904a8d
#!/bin/bash
#!/bin/bash
./manage.py runserver 0.0.0.0:80
./manage.py runserver 0.0.0.0:80 &> access.log &
./log_handler.py &> handler.log &
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