A delightfully unhinged socket library with SSL support and caveman energy
Project description
update: 1.0.6
added requesttobyte
to install
pip install floofyredpanda
to use
from floofyredpanda import start_floofy_server
def handle(conn, addr):
conn.send(b"bonk\n")
conn.close()
start_floofy_server(9000, handle)
ssl
from floofyredpanda import ParanoidPanda
def handle_secure(conn, addr):
conn.send(b"secure bonk\n")
conn.close()
server = Paranoid_Panda(port=4443, handler=handle_secure, cert="cert.pem", key="key.pem")
server.start_paranoid_server()
client side
from floofyredpanda import tell_the_server
response = tell_the_server("localhost", 9000, "bonk")
print(response)
ssl
from floofyredpanda import secretly_tell_the_server
response = secretly_tell_the_server("localhost", 9000, "secret bonk") # ca is required to load selfsigned stuff response = secretly_tell_the_server("localhost", 9000, "secret bonk" ca = "the content of the ca.pem here")
print(response)
requesttobyte
from floofyredpanda import RedPandaClient, requesttobyte
castr = """the base64 of your ca pem here unfortunately it is
required for https even if you dont need a ca since
its a public site but its required to use ssl i will add just a tls = True or False in the future"""
s = RedPandaClient("www.example.com",443,ca = castr)
x = requesttobyte("/",host = "www.example.com",method = "get")
s.send(x.decode()) # you need to decode again because im stupid and encode everything that is in that queue
print(next(s.recv()))
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
floofyredpanda-1.0.6.tar.gz
(4.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file floofyredpanda-1.0.6.tar.gz.
File metadata
- Download URL: floofyredpanda-1.0.6.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5df9a53edc6809629844c2431be751a29548f0b69a775f7df63216c633593d0d
|
|
| MD5 |
251b6f05ad53298fa3fe4df0ceb7ec88
|
|
| BLAKE2b-256 |
63577913f5097931bbd9fd6e79fef228aeb336e463e260d96bfe32202d0b1810
|
File details
Details for the file floofyredpanda-1.0.6-py3-none-any.whl.
File metadata
- Download URL: floofyredpanda-1.0.6-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11e9b92a9d5f2b3fbcd2b4a0518b8e121b87beed75e93d0a5d42a87f32e64559
|
|
| MD5 |
d9994167b26447e97298fc3bf7d52095
|
|
| BLAKE2b-256 |
fe96c24552c720e41faf64b3a0c209956f2f019ef4a24a98e0233e5ea5a912a2
|