From d8b492b5c7022b050421675c57682e96f8eb39c3 Mon Sep 17 00:00:00 2001 From: Oleksii Shevchuk Date: Fri, 19 Aug 2016 20:16:38 +0300 Subject: [PATCH] Remove check for root. Try or fail. --- pupy/pupylib/PupyServer.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/pupy/pupylib/PupyServer.py b/pupy/pupylib/PupyServer.py index 2c0204f2..becb0071 100644 --- a/pupy/pupylib/PupyServer.py +++ b/pupy/pupylib/PupyServer.py @@ -494,13 +494,10 @@ class PupyServer(threading.Thread): except Exception as e: logging.exception(e) - if self.port < 1024 and os.getuid() != 0: - logging.error('[-] Failed to start the server on port %s, you need admin rights !' % str(self.port)) - else: - try: - self.server = t.server(PupyService.PupyService, port = self.port, hostname=self.address, authenticator=authenticator, stream=t.stream, transport=t.server_transport, transport_kwargs=t.server_transport_kwargs, ipv6=self.ipv6) - self.server.start() - except Exception as e: - logging.exception(e) + try: + self.server = t.server(PupyService.PupyService, port = self.port, hostname=self.address, authenticator=authenticator, stream=t.stream, transport=t.server_transport, transport_kwargs=t.server_transport_kwargs, ipv6=self.ipv6) + self.server.start() + except Exception as e: + logging.exception(e)