mirror of
https://github.com/mtrojnar/osslsigncode.git
synced 2025-04-05 01:00:11 -05:00
parent
98b004edda
commit
4d08fbb2c1
@ -15,7 +15,7 @@ def main() -> None:
|
|||||||
try:
|
try:
|
||||||
with open(PORT_LOG, 'r') as file:
|
with open(PORT_LOG, 'r') as file:
|
||||||
port = file.readline()
|
port = file.readline()
|
||||||
conn = http.client.HTTPConnection('localhost', port)
|
conn = http.client.HTTPConnection('127.0.0.1', port)
|
||||||
conn.request('POST', '/kill_server')
|
conn.request('POST', '/kill_server')
|
||||||
response = conn.getresponse()
|
response = conn.getresponse()
|
||||||
print("HTTP status code:", response.getcode(), end=', ')
|
print("HTTP status code:", response.getcode(), end=', ')
|
||||||
|
@ -95,8 +95,8 @@ class HttpServerThread():
|
|||||||
self.server_thread = None
|
self.server_thread = None
|
||||||
|
|
||||||
def start_server(self, port) -> (int):
|
def start_server(self, port) -> (int):
|
||||||
"""Starting HTTP server on localhost and a random available port for binding"""
|
"""Starting HTTP server on 127.0.0.1 and a random available port for binding"""
|
||||||
self.server = ThreadingHTTPServer(('localhost', port), RequestHandler)
|
self.server = ThreadingHTTPServer(('127.0.0.1', port), RequestHandler)
|
||||||
self.server_thread = threading.Thread(target=self.server.serve_forever)
|
self.server_thread = threading.Thread(target=self.server.serve_forever)
|
||||||
self.server_thread.start()
|
self.server_thread.start()
|
||||||
hostname, port = self.server.server_address[:2]
|
hostname, port = self.server.server_address[:2]
|
||||||
|
@ -95,8 +95,8 @@ class HttpServerThread():
|
|||||||
self.server_thread = None
|
self.server_thread = None
|
||||||
|
|
||||||
def start_server(self) -> (int):
|
def start_server(self) -> (int):
|
||||||
"""Starting HTTP server on localhost and a random available port for binding"""
|
"""Starting HTTP server on 127.0.0.1 and a random available port for binding"""
|
||||||
self.server = ThreadingHTTPServer(('localhost', 19254), RequestHandler)
|
self.server = ThreadingHTTPServer(('127.0.0.1', 19254), RequestHandler)
|
||||||
self.server_thread = threading.Thread(target=self.server.serve_forever)
|
self.server_thread = threading.Thread(target=self.server.serve_forever)
|
||||||
self.server_thread.start()
|
self.server_thread.start()
|
||||||
hostname, port = self.server.server_address[:2]
|
hostname, port = self.server.server_address[:2]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user