Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
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
gevent
Commits
08843170
Commit
08843170
authored
Jul 09, 2009
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gevent.backdoor: when executed as a script don't do anything unless port is provided
parent
ece40a19
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
gevent/backdoor.py
gevent/backdoor.py
+5
-2
No files found.
gevent/backdoor.py
View file @
08843170
...
...
@@ -122,6 +122,9 @@ def backdoor((conn, addr), locals=None):
if
__name__
==
'__main__'
:
from
gevent.socket
import
tcp_server
,
tcp_listener
tcp_server
(
tcp_listener
((
'127.0.0.1'
,
9000
)),
backdoor
,
{})
if
not
sys
.
argv
[
1
:]:
print
'USAGE: %s PORT'
%
sys
.
argv
[
0
]
else
:
from
gevent.socket
import
tcp_server
,
tcp_listener
tcp_server
(
tcp_listener
((
'127.0.0.1'
,
int
(
sys
.
argv
[
1
]))),
backdoor
,
{})
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