Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
shrapnel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
shrapnel
Commits
dcb86aae
Commit
dcb86aae
authored
May 09, 2013
by
Sam Rushing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed dead code & some debug cruft
parent
03801ed4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
21 deletions
+0
-21
coro/ssh/test/test_coro_server.py
coro/ssh/test/test_coro_server.py
+0
-21
No files found.
coro/ssh/test/test_coro_server.py
View file @
dcb86aae
...
@@ -41,24 +41,6 @@ user_key_ob = ks.parse_public_key (user_key_pub)
...
@@ -41,24 +41,6 @@ user_key_ob = ks.parse_public_key (user_key_pub)
def
usage
():
def
usage
():
print
'test_coro_server [-p port]'
print
'test_coro_server [-p port]'
def
input_thread
(
channel
):
stdin
=
coro
.
fd_sock
(
0
)
while
1
:
data
=
stdin
.
recv
(
100
)
channel
.
send
(
data
)
def
transport_thread
(
channel
):
stdout
=
coro
.
fd_sock
(
1
)
while
not
channel
.
eof
and
not
channel
.
closed
:
try
:
data
=
channel
.
read
(
1024
)
if
data
:
stdout
.
send
(
data
)
#os.write(1, data)
except
EOFError
:
break
coro
.
set_exit
()
def
serve
(
port
):
def
serve
(
port
):
s
=
coro
.
tcp_sock
()
s
=
coro
.
tcp_sock
()
s
.
bind
((
''
,
port
))
s
.
bind
((
''
,
port
))
...
@@ -81,7 +63,6 @@ class echo_server (coro.ssh.connection.interactive_session.Interactive_Session_S
...
@@ -81,7 +63,6 @@ class echo_server (coro.ssh.connection.interactive_session.Interactive_Session_S
self
.
close
()
self
.
close
()
def
go
(
conn
,
addr
):
def
go
(
conn
,
addr
):
global
service
,
transport
debug
=
coro
.
ssh
.
util
.
debug
.
Debug
()
debug
=
coro
.
ssh
.
util
.
debug
.
Debug
()
debug
.
level
=
coro
.
ssh
.
util
.
debug
.
DEBUG_3
debug
.
level
=
coro
.
ssh
.
util
.
debug
.
DEBUG_3
transport
=
coro
.
ssh
.
l4_transport
.
coro_socket_transport
.
coro_socket_transport
(
sock
=
conn
)
transport
=
coro
.
ssh
.
l4_transport
.
coro_socket_transport
.
coro_socket_transport
(
sock
=
conn
)
...
@@ -90,8 +71,6 @@ def go (conn, addr):
...
@@ -90,8 +71,6 @@ def go (conn, addr):
authenticator
=
coro
.
ssh
.
auth
.
userauth
.
Authenticator
(
server
,
[
pubkey_auth
])
authenticator
=
coro
.
ssh
.
auth
.
userauth
.
Authenticator
(
server
,
[
pubkey_auth
])
server
.
connect
(
transport
,
authenticator
)
server
.
connect
(
transport
,
authenticator
)
service
=
coro
.
ssh
.
connection
.
connect
.
Connection_Service
(
server
,
echo_server
)
service
=
coro
.
ssh
.
connection
.
connect
.
Connection_Service
(
server
,
echo_server
)
W
(
'sleeping...
\
n
'
)
coro
.
sleep_relative
(
1000
)
def
main
():
def
main
():
...
...
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