Skip to content

Commit 84ec989

Browse files
authored
Merge pull request VaradLanke#2 from VaradLanke/finalVersionforAllOS
<Finalize> : Linux & Windows Supported File Server
2 parents 9672b1a + 592c1b5 commit 84ec989

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

fileServer.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# absolute path of pyServer.py
44
thisScriptPath=os.path.dirname(os.path.abspath(__file__))+'/'
55

6-
# generated seld signed certificate usin openssl command
6+
# generate self signed certificate using openssl command
77
def generate_selfsigned_cert():
88
try:
99
OpenSslCommand = 'openssl req -newkey rsa:4096 -x509 -sha256 -days 3650 -nodes -out '+thisScriptPath+'cert.pem -keyout '+thisScriptPath+'key.pem -subj "/C=IN/ST=Maharashtra/L=Satara/O=Wannabees/OU=KahiHiHa Department/CN=www.iamselfdepartment.com"'
@@ -24,16 +24,17 @@ def startServer(host,port):
2424
)
2525
print("File Server started at https://" + server_address[0]+":"+str(server_address[1]))
2626
httpd.serve_forever()
27-
27+
28+
# entry point of script
2829
def main():
2930
try:
3031
generate_selfsigned_cert()
3132
# you can change the host and port
3233
startServer('localhost',8000)
3334
except KeyboardInterrupt:
3435
print("\nFile Server Stopped!")
35-
36-
# entry point of script
36+
37+
# call to main function
3738
main()
3839

3940
'''

0 commit comments

Comments
 (0)