All Questions
32 questions
0
votes
0
answers
106
views
How can I make my proxy server intercept and forward https trrafic too and can I block https websites too (like youtube.com)
I am working on a http proxy in Python with blocking websites functionality and logging. It works fine but it works only with http and not with https. I try it to make it work with the ssl library and ...
0
votes
0
answers
74
views
How can I correct the error in HTTPS server python code?
The following command generates the keys needed for HTTPS connection:
openssl req -x509 -newkey rsa:2048 -keyout privkey.pem -out cert.pem -days 365
Below is the code, I use for project found on ...
0
votes
0
answers
328
views
Detect if connection is HTTP or HTTPS and handle it in python
I have a socket listening on a port and I don't know what kind of connections I'm getting on it. It can be HTTP, HTTPS or something different. I would like that my server will handle at least HTTP and ...
1
vote
0
answers
379
views
I cant connect with my socketio client to socketio server(both python) when executing with double click on file but in vs code i can connect
Server
sio = socketio.Server(async_mode='eventlet' ) # ping_timeout=60
app = socketio.WSGIApp(sio)
eventlet.wsgi.server(eventlet.listen((local ip of other device, 5050)), app)
"just a small ...
0
votes
0
answers
22
views
why does this code work with just an individual image URL?
I have this little code from the book "python for every body" and it works completely fine with the given image URL.
The issue is when I change the URL in the socket command , the connection ...
0
votes
1
answer
95
views
browser doesn't response well to https proxy
I'v built my own https proxy and when ever I send some data to a browser the browser responses with nothing and also after a lot of time.
basically all the proxy should do is just forward the message ...
1
vote
1
answer
415
views
Socket error (An operation was attempted on something that is not a socket) on aiohttp function
async def simultaneous_chunked_download(urls_paths, label):
timeout = ClientTimeout(total=60000)
sem = asyncio.Semaphore(5)
async with aiohttp.ClientSession(timeout=timeout, connector=...
0
votes
1
answer
731
views
How can I fix 301 error using python sockets
I am just beginning to learn how to use sockets in python. I am trying to create a get request to "python.org" but I keep on getting "301" error. If anyone knows why please help.
...
0
votes
0
answers
257
views
HTTPS - How to actually decrypt client request
I am using the socket library for handling http requests waiting on port 80 for connections (does not really matter right now), which works fine as all responses follow the following format
b"&...
0
votes
0
answers
1k
views
My HTTP Request to the Discord API Only Returns Forbidden (403)
I have tried changing my token, rechecking the url, rechecking my User-Agent, and re-formatting my HTTP. I do not know what else to do. I am following the documentation here: https://discord.com/...
-2
votes
1
answer
1k
views
How to format HTTP request to discord API?
While this code works, it sends "Bad Request".
import socket, ssl
token = 'NzMyMzQ1MTcwNjK2MTR5OEU3.XrzQug.BQzbrckR-THB9eRwZi3Dn08BWrM'
HOST = "discord.com"
PORT = 443
t = 'POST / ...
0
votes
0
answers
194
views
How to make https server on sockets
I am trying to make a web server on sockets in python. I saw how to make https support for server from module http.server in python by wrapping its socket with a .pem certificate. I would like to make ...
0
votes
1
answer
965
views
Python proxy server that handles CONNECT requests
I'm trying to build a proxy that can handle both HTTP and HTTPS requests and it works fine for HTTP requests like GET and POST but for the CONNECT request I get no response from the web server.
This ...
1
vote
1
answer
647
views
How to handle https clients with sockets in python? Making proxy server
Im creating proxy server using sockets in python. I know how to handle http clients. But with https it doesnt work. I send to client message that everything is ok. Then i try to wrap client socket as ...
0
votes
1
answer
100
views
how do I handle sockets which is readable but recv nothing?
Recently I've been writing a http/https proxy using socket on python, and I use select to decide whether a socket is ready to recv or send, something like this:
inputs = [sock1, sock2...]
outputs = [...