This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Python 3 multi-threaded HTTP server implementing GET & POST on port 8080 | |
| # Tested using Python 3.10.1 | |
| # run using below run.sh bash script: | |
| ''' | |
| #!/bin/bash | |
| nohup /usr/bin/python -u http_server.py > server.log 2>&1 & | |
| echo $! > pid | |
| ''' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Python 3 multi-threaded HTTPS server implementing GET & POST on port 443 | |
| # Tested using Python 3.10.1 | |
| # can be used with a generated self-signed certificate using bash command: | |
| # openssl req -x509 -nodes -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 365 | |
| # run using below run.sh bash script: | |
| ''' | |
| #!/bin/bash | |
| nohup /usr/bin/python -u http_ssl_server.py > server.log 2>&1 & |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Script detects duplicate Java classes after scanning all JAR/WAR files in provided directory. | |
| # usage: python script <dir> | |
| import zipfile | |
| import sys | |
| import os | |
| if len(sys.argv) < 2: | |
| print("usage: python %s <dir>"%(sys.argv[0])) | |
| sys.exit(1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Python 2 HTTP GET/POST multi-threaded server | |
| from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler | |
| from SocketServer import ThreadingMixIn | |
| import threading | |
| hostName = "0.0.0.0" | |
| serverPort = 8080 | |
| class Handler(BaseHTTPRequestHandler): |
OlderNewer