#networks
1 messages · Page 6 of 1
</script><script type="application/ld+json">\n[\n\t{\n "@context": "http://www.schema.org",\n "@type": "Event",\n "name": "6:00am - Maybe Mine",\n "startDate": "2023-03-29T05:00:00Z",\n "endDate": "2023-03-29T06:50:00Z",\n "url": "https://tv24.co.uk/p/maybe-mine-w8x8m8",\n "location": {\n "@type": "Place",\n "name": "GREAT! Romance",\n "sameAs": "https://tv24.co.uk/channel/great-romance",\n "address": "GREAT! Romance"\n }\n}\n\t\t, {\n "@context":...
this bit looked like json to me, but idk i'm a noob
it carries on like that for a while, listing all the movies
It says it is (LD) JSON in the tag <script type="application/ld+json">...
You can read about what that is in https://json-ld.org/
It's seems it's just JSON with a set set of keys
I think BeautifulSoup is the industry standard for DOM parsing in python? I might be mistaken though.
nonetheless, it should allow you to parse the html you retrieve and look things up based on things like element ID, class, parents etc.
Well html.parser.HTMLParser is a thing in the standard library, but I have never used it myself
yeah, I think minidom is in too?
iirc beautifulsoup is just more feature rich, lets you manipulate and interact with the data in more ways
Hello. I'm trying to understand in detail the exact use of python in different disciplines. Does anyone have an example of a real-world use case of option in networking? Probably something with a short code snippet/repo link would really help.
most of the times I've used python in the capacity of networking has been for automating configuration tasks and similar, unfortunately don't have any examples to hand as I swapped to ansible for deployments as it was better suited to my needs
Hello
Now I want to scrap this app using pywinauto(0.5.4)
but I can't access to red color part in the image
how can I fetch these data?
I have to use python 2.7(32bit) in xp
so there are a few ways, and i dont know if any of them work in python 2.7
Could you let me know?
check if pytesseract works with py2.7
you can use it to read the text from an image or screenshot
there is also another way to get text from a win32 app, but i dont remember its name, im searching online right now.
can i download this app online?
but its an windows xp exe?
you could probably emulate it, windows is very backward compatible
import win32gui
hwnd = win32gui.GetForegroundWindow()
print win32gui.GetWindowText(hwnd)
win32gui can maybe get the window content, but its hard to guess since i dont have python2 anymore and i dont have your windows app
send me a clean screenshot of your app please, ill test pytesseract with python 3
actually I've tried to get elements structure using swapy but can't find these read color part
I could only see 'edit', 'button'..., not 'static'
anyway thanks for your help
let me try with your suggestion
how do you add parameters to a wave file with the wave module when working with io.bytesio and socket to stream an wave file through a connection?
i could not really find the way to do so
since a data stream is just on memory
Anyone here have experience with Paramiko?
Specifically we doing ssh sockets with it
Hey guys! I am a business guy working in Finance and I'm teaching myself Python! I am in the NYC area
Yes, although, it isn't something I usually use directly unless there is a need to go to a lower level. Fabric is a nice higher level library that I use unless a need arises to go to paramiko directly: https://www.fabfile.org/
Anyone know any good tools to do some labbing?
Hey guys
If you want to learn basics of python I endure you you watch tutorials on YouTube follow ‘freecodecamp’, ‘bro code’ and python tutorials by imran. Take your time and learn and write programs… Continue writing programs….. Sky is your starting points. Good luck.
hi, does anyone know anyone in person coding competions for highschool students in nyc where python can be used?
bit of a rando, but what's a decent RPS, one route is getting average 16ms, min 6ms and max 164ms. its like fluctuating between 55 - 59 RPS. idk if thats bad, cos apparently a good RPS is between 200-300
Hey everyone, my name's Phil im from VT. I'm attempting to learn Python.
hey phil
to learn python i would follow basic tutorials on youtube
Hi Phil! The following embed contains a link to a lot of curated great resources you can check out
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
can I try and catch this exception using
has anyone come across the need for a bulk dns resolver, preferably async
so that you can provide it a list of resolvers' ips and it will balance traffic equally between them
i looked into the implementation of dns resolvers in aiohttp and aiodns and neither seem to be doing any kind of "balancing"
you can provide it 100 resolvers and it will use only a fraction of those ips, and only "awake" the rest when those completely die out
no balancing, no randomization
so wondering if anyone dug into this before, maybe someone else had the need
DNS is light enough that i don‘t think this is a common usecase to be honest
Plus even if you wanted to do that load balancing is typically not the job of the application itself
Load balancers are meant to sit in front of your application
If you're on AWS infrastructure then it's quite easy to set up an Elastic Load Balancer for multiple compute/fargate instances
you're talking about server side, i am talking about sending dns requests in bulk from the client side
in such a way that nameservers/resolvers (1.1.1.1) are spread equally between DNS requests
How can I track QPS , is there a plugin or something for gunicorn, my app doesn't have a proxy , gunicorn is simply serving my flask app.
gunicorn has support for statsd metrics that you can use, but note for multiprocess you may need to sum it together
Is this Networking about Graph theory-network? Or socializing-network?
Network as in how computer systems are interconnected and how it relates to Python
I wanted to work on a networking related project and decided to look into TCP congestion control. Only thing is I don't know how to go about implementing it? Do I build the congestion control mechanism on top of the already existing socket library or is there any way I can simulate packets being sent across devices?
I think network congestion control is usually implemented at a lower level
Frame buffers and automdix/autoduplexing
hey, is it possible to get the https public key from the requests library? id like to use the public key to encrypt data in the body of my request
I want to get into IoT, where should I start? I have an elegoo uno, and also heard of esp32. What is that?
does somebody knows how to facilitate their workflow from pattern creation to garment through python coding? if someone is interested in collaborating to solve some problems hit me up
hi,
I have 2 wirless wifi adopters in windows and they are connected to two diffrent isp, now how can I set 2 diffrent proxy servers for for my network addopters, one of proxy servers ips is 121.0.0.1:10809 and the other is 127.0.0.1:10911 , does anybody have any idea how it should be done?
Hi guys !
I always wondered how some people can get data from games that don't provide a public API.
For example Apex Legends. I've searched the internet and there isn't any official API.
I know that there is in fact an Apex Legends API but it isn't public.
My question is: How did all those unofficial Apex Legends API developpers do to get data from Apex Legends and make an unofficial API out of it?
How can I for example get my data from Apex Legends directly like they do, instead of taking it from them?
EDIT: Same questions stands for many other games, like Leagues of Legends Esports API for example
I figured out that most the API informations can be found using google chrome developer tools. when it comes to the API key, I guess they just cracked it with simple brute force like the following script for example:
import requests as rq
import itertools
characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUV&é~"#\'{([-|è`_\\ç^à@)]=}$¤*ù!:;,°+¨£µ%§/.?'
for i in range(30):
combinaisions = itertools.combinations_with_replacement(characters, i)
for key in combinaisions:
request = rq.get(url='https://esports-api.lolesports.com/persisted/gw/getLive?hl=en-GB', headers={'x-api-key' : str(''.join(key))})
if '200' in str(request):
print(f'The auth key is {key}')
Although I doubt they "cracked" it because then those game would have made a move to block them (like just changing the key or reinforcing the API security or whatever?)
Also sometimes the API isn't on the website so how do they even figure the API endpoint?
I doubt it's cracking i don't know, please help me anyone who has a clue
Actually LOL have an API !
what is LoRa?
usually something like a http proxy like burpsuite. lets you see the exact requests you are making to their api, then you can try to recreate them
LOL does, but LOL Esports does not
but are unofficial apis from these games illegal?
That is a complicated question that depends on your jurisdiction
For example the 9th circuit court in the US has long held that merely breaking a websites terms of service does not constitute a crime ("unauthorized access or exceeding authorized access") under the CFAA.
Other jurisdictions or countries may have different interpretations or rules in general
Oh I see, and why does games close their eyes on these? It adds so much load to their servers since most those APIs are used a lot by players !
Unsure, it may not add that much load. They may be changing their useragent to appear as it does when the game makes the requests making it difficult to identify
oh I see, thanks for all these informations !
no prob
Hello i have question how can i get ip in python?
all websites you visit know your IP
Well, at least the source IP (which may or may not be your IP)
Oh got it
GET to ifconfig.me will give your IP back w/o any scraping
I am trying to connect to my PC (server) from my phone (client) using python sockets but my phone (client ) is using localhost instead of using its local ip in the LAN network ?
Thus I can't connect. How can I fix this ?
It sometimes shows no route to host
whats the easiest way to set up http requests between two programs on my own computer?
Also, does the URL encompass the entire htttp header? That is can the full http header be discerned from the URL?
Flask for the server, if it's Python and if you just want something simple
Something like requests on the client
ty
No. You can see all the parameters in the header by going to debug tool of your browser, network requests, find the http one at top, then see its header details section
how do i set my dns using python?
Dns is set by the network manager
On windows and mac its handled by the operating system
On linux its most probably /etc/resolv.conf
there is netsh in windows from the command prompt but how do i send a command to the command prompt?
import requests as rq
import itertools
characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUV&é~"#'{([-|è`_\ç^à@)]=}$¤*ù!:;,°+¨£µ%§/.?'
for i in range(30):
combinaisions = itertools.combinations_with_replacement(characters, i)
for key in combinaisions:
request = rq.get(url='https://esports-api.lolesports.com/persisted/gw/getLive?hl=en-GB', headers={'x-api-key' : str(''.join(key))})
if '200' in str(request):
print(f'The auth key is {key}')
you guys know how to connect command propmt with telehack ?
import os
os.system(cmd_here)
should workv
also how would i resolve a bunch of dnss and then see which one has the lowest latency
import dns.resolver
import time
my_resolver = dns.resolver.Resolver()
# Whatever you want here
my_resolver.nameservers = ['8.8.8.8']
before = time.time()
answer = my_resolver.query('google.com')
after = time.time()
print(f"That query took {after-before}")
You can further modify this code to include the other bunch of dns servers and sort by latency
then you can use the command for netsh to change it to the one with the lowest latency
if i had multiple dnss wouldnt it just return the accumulated time all of them took to ping
you would go in a for loop for all the dns resolves and my_resolver.nameservers = [the_current_dns_in_for_loop]
something like this
dns_servers_test = ["1.1.1.1","8.8.8.8"]
for resolver in dns_servers_test:
my_resolver.nameservers=[resolver]
## And then you can query the server here
also to test the latency you can also use icmp pings
tnx
it works fine but i get this DeprecationWarning: please use dns.resolver.Resolver.resolve()
Hey guys
yo
then ig do that
hellloooo my python buddies
Lmfao
hello
Hi, can someone here help me with an API? I have a feeling it's going to be a long journey because the api has very little documentation and examples
I have configured my Raspberry Pi as an access point using Network Manager and attempted to run a server on it using the command python3 -m http.server . However, I'm having trouble connecting to the server from another computer. Do you have any tips or advice on how to resolve this issue?
Is the computer in the same network
Yes
What is the error that you're getting
It simply can't find the server
I can open the website on the raspberry pi
But any other device can't find it
On what address and port does it say it's listening
127.0.0.1 port 8080
Also how are you connecting to it
through wifi. We connect to the wifi accesss point we setup on the raspberry pi
Have you tried the local IP address of the raspberry pi
So like regularly through a web browser?
yes
we tried. doesn't work
yup
Hold on I will self test
Yeah you got to put the address
python3 -m http.server -b ADDRESS
The local address of the server
You're also connecting using this address in the web browser, both in the server's machine and in any other entity in the network
Thank you that worked 🙂
👍
Yes i can help you with API's what help do you need please be specific
I would like to know for fastapi does it make sense to do pip install -e . at the root folder, so you can import any file at any folder with src.xxx.xxx or does it make sense to call the fastapi app at with your current working directory at the root directory of the app and call uvicorn src.xxx.xxx:app --reload there?
FastAPI apps should be run with uvicorn or similar
the content i receive from requests.get.text doesn't include the hidden elements, but the information i need is included in those hidden elements.
So my question is, how do i extract those hidden elements?
</div>
<div id="content-download" class="clr">
</div>
This is what I get from my requests.get.text, but when I inspect the actual website, inside it resides:
I am trying to connect two windows devices over a socket connection using localhost. Both devices are connected to the same network, and I have tried several different methods of fixing my issue.
the relevant client code:
import socket, capture, pickle, time, pydirectinput
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("localhost", 5050))
the relevant server code:
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind(("localhost", 5050))
ive tried changing "localhost" to several different things including my devices local ip adress
I cannot connect them, but it always works fine on my one machine.
hey, I am trying to develop a python torrent client. I am using ubuntus torrent service to test my code.
I have calculated the correct info_hash, but when I try to connect to the tracker, it returns d14:failure reason63:Requested download is not authorized for use with this tracker.e
When I send some incorrect hash, I get the same response.
here's the request I am sending:
share src
I am building a p2p system, is it better to use multithreading, threading or asynchronous I/O to manage different connections between peers ? And how can I reduce the amount of threads I start ? Because currently I am starting two threads for each peer connection
i prefer asyncio
Try using what you get from socket.gethostbyname(socket.gethostname()) on your server
You can do it with asyncio
I have a service running , internally in a network,
wanted to know how can i run that in https( tried self signed https)
but if we want to run it a cert signed by a valid provider how will it work internally.
Are there any resources for learning optimal socket programming in python?
cuz tutorials I've seen so far are buggy/very basic
I like sensors that's can be a pet project
Wdym
Can anyone verify if this is correct?
You might also want to check out https://docs.python.org/3/library/asyncio-stream.html#asyncio-streams for neat asynchronous stream (TCP) sockets. You can configure a UDP socket by setting this up with a datagram protocol: https://docs.python.org/3/library/asyncio-protocol.html#datagram-protocols
Source code: Lib/asyncio/streams.py Streams are high-level async/await-ready primitives to work with network connections. Streams allow sending and receiving data without using callbacks or low-lev...
Thank you this is really golden
is that possible after 18hrs of tests, i still can't download a file from an ftp server in async way, since aioftp library seems to not fully support passive mode, so the ftp server tries to connect to my machine? :\ i should set it in passive mode..any help?
Hi. so im using payload write in javascript and send request to site A
in payload i have another request to site B and fetch command to send response from site B to localhost
i want catch this response, interpret this and set cause for loop. ATM use python3 -m http.server 8000 but request from script doesn't show (when i use it manually i see response).
Next my loop should stop when receve right response. Using python. I can do this? Thanks for any tips
Maybe your JavaScript side tries to access port 80 (you're serving on port 8000 which is unconventional for HTTP)
I tried on 80 too.
is here anyone writing the geeks for geeks jobathon?
answer this question
this is not a code monkey do your homework server....
if you have a concrete question feel free to ask it, although this may be the wrong channel for it
really, what's that got to do with networking?
:incoming_envelope: :ok_hand: applied timeout to @pulsar spruce until <t:1682189671:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).
The <@&831776746206265384> have been alerted for review.
I had, and for some reason this seems broken to me. It generated the wrong IP address and I ended up doing it with ipconfig. thanks for the response, though
very simple program to login into cisco fmc but getting access token error what wrong am i doing here , new bie here
import json
import requests
import configparser
import urllib3
fmc_url = "https://1.1.1.1/api"
username = "admin"
password = "admin123"
Log in to the FMC and get the session token
login_url = fmc_url + "/fmc_platform/v1/auth/generatetoken"
headers = {"Content-Type": "application/json"}
data = {"grant_type": "password", "username": username, "password": password}
response = requests.post(login_url, headers=headers, data=json.dumps(data), verify=False)
response_json = json.loads(response.text)
token = response_json["access_token"]
does anyone know solution i searched on everywhere but there is no related to this
So with networkx, say I have a bunch of nodes with either attribute "member" or attribute "caucus". Is there any way to replace all members with edges, such that:
caucus1 -> member1 -> member2 -> caucus2
Becomes
caucus1 -> caucus2
Haven't used websockets myself but I googled it for you and this came right up... it seems like you should try an IP instead of localhost: https://stackoverflow.com/questions/44575978/websocket-connection-failed-error-in-connection-establishment-neterr-connect
I need a free to use server
heroku used to free but they removed that tier
amazon ec2 is only free for like month i think
I might just buy a cheap machine and install linux if i can find one
Last I checked it was free for 12 months
still
i need somthing sustanable
i will forget its gonna be charged to my card
which simulation software is best for simulating IoT devices, I need to simulate IoT devices with Intrusion detection System
is there a way to egt the entire HTML code of te page using lxml . when i use lxml i dont get the entire thing as i would get using Inspect tool but when i use selenium i do get the entire thing, however i want to avoid using selenium if possible
(or even better aiohttp im using it in async function)
(feel free to ping)
It would be a bit of a hassle but you can work with html.parser.HTMLParser
It's not using async/await but it does use callback functions so I think it shouldn't block
chatGPT reveals everything abt htmlparser
I will check it out tnx
Hi, any idea how to keep websocket/socketio connection alive when restarting backend server ? I am using python-socketio
@ember ledge you could run it in a container??? does the connection drop?? know theres a way to bypass any errors and just continue but not 100% sure
set container to always restart
It’s got some args you can pass like reconnection attempts and the interval in between the attempts.
For obvious reasons you just wait until reconnected
Anyone here has any idea about how I can capture the announce request sent by a torrent program using Wireshark? Need to verify the announce request being sent by a torrent client I am building
I'm not sure how to spot announce requests specifically, but I'd look at https://wiki.wireshark.org/BitTorrent
I have a desktop application client using pyqt and I want to create a backend server that handles some calculations and has a database (in python). Can anyone recommend me some lightweight modules/framework that I can use to achieve this?
I can just use sockets of course and then send jsons or byte arrays around but it seems like there might be some existing modules to make this easier
like some kind of routing system would be nice
You can use an existing internet protocol like HTTP/S or WS/S
They don't have to use the standard web ports
I want to create a mesh network that can transfer data between the connected nodes, using hotspot. I have been researching for a few days and im stuck. Please help🥲
I'm not sure if "mesh" and "hotspot" mean what you think they mean. A mesh network requires multiple access points. Whatever you mean by hotspot, the hardware may not allow routing of traffic between endpoints
Maybe what you have in mind is more like this? https://en.wikipedia.org/wiki/Wireless_ad_hoc_network
A wireless ad hoc network (WANET) or mobile ad hoc network (MANET) is a decentralized type of wireless network. The network is ad hoc because it does not rely on a pre-existing infrastructure, such as routers or wireless access points. Instead, each node participates in routing by forwarding data for other nodes. The determination of which node...
Yeah sorry bad phrasing on my part, but i understand exactly what you are saying. Assume that i do i have that kind of hardware on each device, uses different traffic forwarding algorithms to achieve that.
but yes MANETS
My main objective is to analyse traffic that is sent using protocols like BATMAN, OLSR [13], Dynamic Source Routing (DSR), and Ad-hoc On-demand Distance
Vector Routing (AODV) that is mostly used in these types of networks to route data.
So as a proof of concept i wanna make a basic p2p chat that uses same protocols
im trying to follow this https://docs.python.org/3/library/ssl.html to establish a wss connection. my client looks like this:
context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
context.load_verify_locations('path/to/key.pem')
with socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0) as sock:
with context.wrap_socket(sock, server_hostname="wss://localhost:port") as ssock:
ssock.send("Hello world!".encode())
But I get an error:
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
whats going on?
Make sure the server is running and listening on the correct port. Check if there are any firewalls or network restrictions in place that could be preventing the connection.
Check that you have specified the correct hostname and port number in the server_hostname parameter. Make sure that the server is actually listening on that port.
Check that the SSL certificate you're using is valid and trusted by the server. You can try connecting to the server without SSL to see if that's the issue.
Try connecting to the server from another machine to see if the issue is specific to your local setup.
I think its running but the certificate might be the problem. For the server I created a public and private key with something like this: openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365
And for the client I did this: openssl req -x509 -newkey rsa:4096 -keyout key.pem
yeah change the sslc.
Wdym?
change the certificate ur using.
What would I need to change it to?
Just generating a new one doesn't sound like it would help
To change the SSL certificate, you need to get a new one. You can either ask a special company to give you one, or you can make one yourself using some special tools. But if you make it yourself, people might get scared and not trust it, so you might need to tell them it's okay. Once you have the new certificate, you just have to put it where the old one was and turn everything off and on again.
but
idk how to obtain a CA
i just know that
let me switch that to make it more understandable
I'd like to make an automated election system from scratch (I'm quite new to networking and web).
My first question is;
Can I use fastapi for serving pages?
I'd like to use fastapi cause I found it easy to query data from, in the frontend, if not.
Can I use it with flask?
Using flask to serve the pages and fastapi for handling dynamic functions.
Or use just flask entirely?
help me pls
what do you mean by election? Like in distributed systems?
it depends on the question
In a brand new architecture/app it doesn't really make any sense to mix fastapi/flask, pick one and stay consistent until you have good reasons to migrate to something else, both can offer the same functionalities really
any good free courses for basic network?
whats the easiest webserver library
I dont need anything special, just displaying websites, sending and receiving requests
Hello guys,
I can't make an AF_LLC socket, anyone have an idea? I can't find any documentation.
I think that the family is supported since it appears in dir(socket)
Thanks
In my project folder I have a basic index.html file plus static files (js, css) as well as my main.py:
from fastapi.staticfiles import StaticFiles
from fastapi.templating import Jinja2Templates
from
thank you
I've been planning a UDP protocol which, on either side (client-server, specifically two clients and a server), on receiving, they first receive a message type which is one byte long worth of data and depending on the message type, they receive different lengths of payloads.
These are two recvfrom calls and I've been wondering whether there is a reliable way to know for sure that a payload, if it even is one, belongs to a message type?
client_socket.recvfrom(1) followed by client_socket.recvfrom(message_size) does not need to correspond to the exact pair of calls that the server makes: server_socket.sendto(message_type, client_address) followed by server_socket.sendto(message_type, client_address), only that the client_socket.recvfrom(message_size) returns a message of the structure that fits the message type returned by client_socket.recvfrom(1).
I'm having some trouble with a POST call using request
request_headers = {'Content-Type': 'application/json'}
request_data = '{"description": "AWX CLI Token"}'
targeturl =(f"{awx_url}/api/v2/users/{user_id}/personal_tokens")
request = requests.post(targeturl, headers=request_headers, verify=False, data=request_data, auth=(awx_user,awx_pass ))
I don't get error, request return 200, however there is no output from the API with the Token
Hello , i'm trying to make a simple online (not LAN , already did that ) chat without any server , any ideas how this could be done ?
any good free courses for basic network?
Hello community! I'm looking for a Phyton developer who speaks spanish. Preferably living in Spain. Is there any channel where I can advertise this search? Thanks in advance and good day to all of you!
Hey everyone!
I'm forming a team for the TechGig Microsoft Hackathon and I'd love for you to join! We're looking for tech enthusiasts to collaborate on an exciting project. It's a chance to showcase your skills, learn from experts, and win cool prizes. If interested, let me know ASAP!
Thanks!!
Watch YouTube videos on the socket module, id advice you to learn about protocols, TCP/IP, UDP, packets, virtual connections and maybe look at some of the code for similar projects you’re trying to make.
There may be more stuff that I’m sure you’ll find along the way of ur research, Idk much about networking besides basics, I’m gonna start learning socket soon too
hello everybody , I wish to make a socket SOCK_DGRAM and I wish receive SOCKERR , but I make this with setsockopt but I d'ont know to make this.
I use linux and I have python 3.9.2. Thanks.
Hi everyone I have interesting question someone might be able to help me with! I have an application from a company that you can interact with via a TCPIP or hiSLIP socket server. Through this server SCPI commands are used to basically query data and send setup commands to the software that then controls an instrument. The goal is to have this on a serer pc essentially and a client PC that will get the data and implement it into a GUI. This is done fairly simply through a LAN connection and pyVisa which I am mostly familiar with. But, I also need the option to do this through a Bluetooth connection. Speed is of the essence and for now I have been pulling the data on a server side script then transferring it back to the client side script. This works but adds some noticeable overhead. Where as with the LAN connection no server side script is needed whatsoever. So, does anyone have any ideas as the best way to approach this? I am open to any suggestions! Thanks a million
Is there a way to send a get request and store the response in a file without that response going into the RAM first? response = request.get(api_endpoint) throws an out of memory exception.
The API cannot be tweaked to include less data. Increasing the available RAM is out of the question as well.
What routers would you recommend for self hosting?
Try using a different package
Can someone help me?
Following basic tutorial
Set a server up
But theres an error I can't google the answer for
s.listen(2)
OSError: [WinError 10022] An invalid argument was supplied
its on line 28
'import socket, sys
from _thread import *
#Basic server info
#5555 is generally a safe port that is left un-used/untouched
server = "192.168.1.162"
port = 5555
#Setting up socket
#Socket parameters are types of connection
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
#Binding server and port to socket to make sure port can be used just in case
try:
#Binding given IP address to port
s.bind((server, port))
print(f"Server started under port {port}")
except socket.error as e:
#Print out socket error
str(e)
#Listening for connections
#Opens up the port to allow multiple clients to connect
#Paramater within is the ammount of connections allowed. Optional but probally wanted
s.listen(2)
print("Waiting for connection, server active")
#Defining threader function that allows program to handle multiple clients
def threaded_client(connection):
#Tell the client that they have connected
connection.send(str.encode("Connected"))
reply = ""
while True:
try:
#Try to recieve data from the conncetion. Paramater is ammount of bits (information) we are trying to recieve. If error multiply size but the bigger the size the more time it takes to recieve
data = connection.recieve(2048)
#Decode data to string data that we can use
reply = data.decode("utf-8")
#Check if client disconnected and if so stop client from being running
if not data:
print("Disconnected")
break
#Otherwise if we get info print it out and handle stuff
else:
print(f"Recieved: {reply}")
print(f"Sending: {reply}")'
''' #Just send back the stuff we recieved to the client and encode it so it can be sent over the server
connection.sendall(str.encode(reply))
#If something bad happens just break and stop the loop
except:
break
#Close connection when done
print("Lost connection")
connection.close()
#Server continuesly listening for connections and handle stuff with connecting and connected clients
while True:
#Accept any incoming connections and store connection and ip address of connection and show IP address that connected
connection, address = s.accept()
print(f"Connected to: {address}")
start_new_thread((threaded_client, (connection)))'''
sorry, i don't know how to post code properly
You're not actually printing your error from
try:
#Binding given IP address to port
s.bind((server, port))
print(f"Server started under port {port}")
except socket.error as e:
#Print out socket error
str(e)
because there is no print there.
I know socket methods raise the exception that you are getting when the socket is unbound, therefore I know you did get an exception when trying to bind, and it's most likely that a stream socket is already bound to that host & port pair.
Here is a better tutorial than the one you are following: https://docs.python.org/3/howto/sockets.html
The tutorial I'm following is very specific to something I'm trying to do
But it's old so I'll use that for a referance
Good night everybody , why my code isn't working
sock.setsockopt(socket.SOL_IP, socket.IP_RECVERR,1)```
I use linux and python 3.9.
My socket is SOCK_DGRAM
Can someone tell me what they think of my server so far? I plan on adding a GUI in a few weeks. https://github.com/TheRealRedRiver559/Asyncio-TCP/tree/test-1
no UTs, so 👎
who knows how to craft enet packets in python? am thinking to make my own module of enet using python
I hope I can help. I keep simple English. What is your language ? What is error saying?
Sorry for my English , I'm French.I use python 3.9.2
The constante IP_RECVERR is unknown.
AttributeError: module 'socket' has no attribute 'IP_RECVERR'
And effectively IP_RECVERR is not in socket constante in module socket.
maybe try
print(hasattr(socket, 'IP_RECVERR'))
to sure that IP_RECVERR is able in ur OS.
Do u know how to work with GUI? What is GUI u will use? I need wrap my project too, need in some advices
I am testing out CustomTkinter at the moment..I tried out Qt but hated it. I'm not sure since whatever I use has to have asyncio
I have a client/server application that may resemble Discord in the future. It includes video streaming and screen sharing features. Can you suggest what I should use?
I just dont like PyQt, and im not sure, I would just try things out
If you plan on doing that type of thing I would move to websockets and use html and whatnot
i have bad engl what is ur native language?
English
Well, thanks a lot man, for ur spent time
Yeah no problem. Do you mind if I could take a look at your project?
Yes ofc. https://github.com/Mentalica/DiplomV2
but file NetworkManger isnt use.
main logic in Client, Server
Looks like its private
oh sorry, just a moment
done.
thats pretty big, cant believe you used sockets
i have 4 sockets for data for every client (user)
i had problem with send multidata via UDP
make a protocol
this is mine
format = {'sender':sender, 'message':message, 'message_type':message_type}
i have custom protocol and for udp, but when i had several connection to udp i had overlap data
its hard to use asyncio 😄 i have several days to complete this
yeah it took me a while to learn asyncio, but it reduced my file size by abour 2/3 'rds and now I enjoy it
I added channels to my server like 80 minutes ago if you want to see how I did those
i saw, ur project looks pretty good if comapre with mine xD
yeah but this is a re write..let me see if I can find my original socket one
yeah I cant find it lol
it was bad though
anyway its fine
now my project need in chat, integration with Telegram, GUI, DB, rooms and base settings for anything (rooms, users)
Yeah all im lacking is a GUI
I have SSL ready whenever, and I can add DB pretty easily
Channel is it mean room?
yup
i should look at ur project again 😄
the only thing changed mostly is Temp.py and Commands.py
Temp.py has the Channel portion, and the Commands.py ..well it has the channel commands
and I had to change some things like broadcasting in the Server
this terrible double portion...I just slapped this in
is it all on TCP?
Yes
i have the same, but havent time to do pretty code
I dont know if ill ever add VoiP or anything like that
is it project for improve ur skills or whatever?
It was at first yeah...im still not sure what it is tbh...i just keep adding on to it
@steady horizon so yeah, I believe I’m using IPv4, and I’m using the localhost yes
(By that you mean that the server is on the same computer right?)
localhost may be using a shortcut
So it may not be sending packets out the server computer
Ah ok, I have a school server I can connect to, maybe that would make it easier to detect the packets?
Definitely but you could also host on 127.0.0.1 or (for other entities on the same network:) socket.gethostbyname(socket.gethostname())
I think 127.0.0.1 should be noticeable by your router
If it isn't, socket.gethostbyname(socket.gethostname()) will be
I add socket.gethostbyname… to the chat client right?
Just for there to be no confusion
If your server is on Windows, run ipconfig in a terminal window and simply use what's set for IPv4
It should be what you get from socket.gethostbyname(socket.gethostname())
You bind the server on socket.gethostbyname(socket.gethostname()) and whatever port, and the clients connect to the same address
ok, so I'm already running on 127.0.0.1
the server that is
and I should run the chat client with the server host IP right? which would be my computers IP right?
Ye
Ok
so I ran ipconfig right, and I got an IPv4 adress for a WSL ethernet and one for just Ethernet, which should I use?
Actually, thinking about it, my Ethernet adapter doesn't list any IPs
I guess what I'm trying to say is that what IP address should I use for the chat client to config to the server host
huh, thats interesting
The address the client connects to should be the same address the server binds to
If they're both on the same machine, localhost would work but you may not be sending packets out your machine's networking interface component
127.0.0.1 is the loopback IP, which I think the machine works with by sending such a packet to the router and the router sending back to you (goes through your NIC so you should be able to sniff it)
so the server host would be 127.0.0.1?
If neither works, you should use your machine's IP. From running ipconfig on my machine, I don't see any IP on my Ethernet adapter, only on my Wireless LAN adapters
Yes
i'd show you a photo but considering it has all the ip addresses on it I probably shouldn't
XD
If your client and server are on different networks, your server needs to host on its machine's IP and forward its port (read on that online, it's different for every router) and your client needs to connect to your public IP and port
Don't, you may expose a VPN's IP or something
You know what, I'm just gonna use the schools servers, I believe it's easier that way
yeah, true
Thanks
with this code I obtains False, IP_RECVERR is not supported on linux.
The define can be found under Linux though. It's in /usr/src/kernals/..../include/uapi/linux/in.h and has a value of 11. So you can try using 11 instead of the enum IP_RECVERR.
It's IPV4 IPV6_RECVERR is 25
I keep having an issue where if a client joins, then changes network connections the client connection stays open
I have it documented in Server.py
its a tedious process to setup to replicate the error but I explain it more in the file
does anyone have any recommendations of resources to learn sockets?
Thanks you so much.
when a client changes network, they don't send a FIN packet which closes the connection with the server. the server will only realise that the connection is closed if they send a message and it fails to get an acknowledgement. it's the servers job to handle this correctly (catch the error when a send call fails)
ah dang...so I would either have to make some sort of keep alive system or rely on the timeout for receiving messages?
what should the interval for thr messages be?
yes, either implementation would work. discord uses a "heartbeat" message for example which is sent every x amount of time (I cant remember the exact number)
I think like 5 seconds or something is fine
it's not something like discord so it should be good
and it gives the client time to reconnect or re establish connections
you should bear in mind that if the client reconnects, your code will handle it as a completely new client (they will have to login etc)
also, if you send a heartbeat message every 5 seconds, the receiving end should tolerate a gap of a bit more then 5 seconds
this is because of scheduling delay and network delay
got it @normal gazelle ?
yup! Also did you check it out? If you did let me know what you think
hello, i am writing a tool similar to netcat/nc structure with python. after the tool runs, it will act as a server and work without a client. and the command i enter in my terminal on the device connected to me will run on the opposite computer and display it on my screen. if you have used the Netcat tool before, you will understand what i am saying very easily.
can anyone tell me where can i learn networking in order to start devops and automation
maybe too low level, but: https://beej.us/guide/bgnet/html/
or gooble "learn tcp/ip" an follow your nose
i wanna talk
about what
I am planning to write a vtuber program for my personal use. I am looking for someone who is willing to work on it with me. This project includes image distortion, face tracking and obs interactivity. Please dm me if you want to work on it with me. I plan to be very involved with the production of the code. I feel like it would take me a long time to do by myself. Thank you very much.
Hi!
We don't do recruitment on this server
Sorry.
Guys has anyone applied for graduate software engineering role at Samsung? If yess , may I know what type of questions I can expect in the coding test ?
Has anyone? Probably. But it's unlikely they're reading this channel. Try Glassdoor, LinkedIn, etc.
Thanks 👍

Hi, I have a Python application that uses sockets to communicate using SCTP and I would like to be able to tap on that communication with scapy to generate a PCAP. Would that be possible? Is it something that could be done using pipes?
yes
it is possible
scapy can be used for generation of pcaps with network configured data
you could look for scapy documentation
there is this interesting one by phillippe biondi
I think it answers some networking related specifications
although I am not so sure about pipes
hello anyone from the uk here?
Probably but this channel isn't for that kind of networking 😉
lol
aye
What's good Python crew. Today marks day one of Python mastery. I am already at an intermediate level but we are mastering it. I am from SoCal so I am here to make aquaintances.
Lol I really think we need to rename this channel because people don't read the description 😉
#networks-computers-not-people
lol yep, could you bring that up in #community-meta?
#network-sockets
https://github.com/TheRealRedRiver559/Asyncio-TCP/tree/Asyncio-TCP
Can someone take a look at this and tell me what you think? Suggestions etc.
Thanks. There are some visual bugs with the command line sometimes, but that will be fixed with a GUI
make sure its the Asyncio-TCP branch
!f
I am working on adding a functionality to send email in exiting python application. This application collecting data from various cloud platform and generating a report. The mail should be going to Microsoft 365 inbox. I am confused as if gmail smtp server can be used for sending mails in production. If use gmail smtp server we should be providing password in plain text. And in past I found sometime this server stops working after somedays. Please help if you can point me to any guide on internet that can help me creating function for sending mail. Or else what you guys do if you have to send mail from python. If we can write a tcp server from scratch than we should do a mail server also in python. Help appreciated
Gmail stopped supporting that, maybe a year ago. We switched to DuoCircle, there are probably other options
Day 8 of Magic:
Making Cookies with the reference of OSI Layers
Hi! Would someone be able to help me out here?
At work we use httpx.AsyncSession for each internal host. I.e. service "dogs" makes requests to service "cats". Hence service "dogs" defines a single session for communications with service "cats".
We open the session at the beginning of a fastapi process and never close it.
We work in kubernetes which means that service instances do not usually live for too long (correct me if I'm wrong).
Would our approach with sessions result in any unwanted behavior?
anyone have recommendations for good rotating residential proxies?
and not insanely expensive
So I am essentially trying to make a function that takes input, given input from a server file. Like commands that respond and you can send data back.
I originally decided to do something like a control variable, however I cant interupt the previous await function from the server. I made an image as well since I am bad at explaiing. Not sure how to do this
https://github.com/TheRealRedRiver559/Asyncio-TCP/tree/Asyncio-TCP
Here is the full project link
I made an example in the Commands.py file on line 423
You dont have to look at the code really, you can probably tell just from the behavior / output
I am essentially trying to listen from 2 different places at once (not on purpose, something I am trying to prevent)), and what I want to do it disable one of those locations when I call a certain function, and receive it only from that function
Hi everyone,
I hope a help regarding the building a Qt chat application.
I'm going to use aiortc for peer-to-peer communication.
My concern is to user several data channel by asyncio and implement status management.
I'm encountering how to configure my application correctly with several async io modules and channels, but there is only one event-loop.
If there is anyone has experience in such implementation, please help me.
So do you need help with the Channel portion, or the Qt GUI?
For channel portion.
How can I deal with event-loop in multi processing and multi threading?
can you send me a link to your code
@ember ledge
you should only need asyncio
not threading or anything like that
Day 11 of Magic:
How do we communicate in multiplayer games using Sockets?
Hello this is Ben Lopez, feel free to follow and connect at:
Consider a scenario where four different servers are connected to four different clients over four three-hop paths. The four pairs share a common middle hop with a transmission capacity of R = 200 Mbps. The four links from the servers to the shared link have a transmission capacity of RS = 10 Mbps. Each of the four links from the shared middle link to a client has a transmission capacity of RC = 30 Mbps.
What is the maximum achievable end to end throughput (in Mbps) for each of the four client-to-server pairs, assuming that the middle link is fairly shared?
What's the formula here?
the sum of the server max capacity divided by the number of clients?
it's a weird question though
Hmm, I'm not sure about that
The server cannot pump bits through its link at a rate faster than Rs bps; and the router cannot forward bits at a rate faster than Rc bps. If Rs < Rc, then the bits pumped by the server will “flow” right through the router and arrive at the client at a rate of Rs bps, giving a throughput of Rs bps. If, on the other hand, Rc < Rs, then the router will not be able to forward bits as quickly as it receives them. In this case, bits will only leave the router at rate Rc, giving an end-to-end throughput of Rc.
it all depends on what's meant by the four pairs
does each server have a 10 mbit link to each client?
or is a single 10 mbit link shared between all clients
Rs and Rc apply to each server and client respectively
if it's a separate link per client, it's the minimum of server maximum throughput * number of clients * number of servers, and 200 Mbps (the shared link speed)
you can't have an end to end throughput larger than what a single server can cover between a client and a server, even if the client can theoretically push more bits.. the question is odd to me 🙂
so you only really have to consider the throughput on the server side, as long as the total bandwidth going over the shared link is below the full capacity
yes
one server and one client isn't shown though, but I think you understand now
the maximum throughput in your specific case would be 4 servers * 4 clients * 10 mbit (the maximum a single server can transfer to a single client) which is 160
I'm a bit confused since this is different than what my textbook seems to say
what does your textbook say?
I'm trying to search for an explanation similar to yours, but so far, I don't see it yet
it might be that the scenario that's explained isn't complete - I'm giving an answer based on the real world, where the clients can't communicate at a rate higher than the server on the other side or vice versa (end to end throughput is defined by the lowest of the rates possible on either side)
..as long as the throughput between all clients/servers doesn't exceed the shared link size
You can just skim it since you're proficient in this area
It's from "Computer Networking. A Top-Down Approach (2021)" section 1.4.4
oh! I must have misunderstood the text?
as long as the total traffic isn't constrained by the middle/shared link, the max throughput between any two hosts is equal to the lowest max rate of either side
so in your case the clients can transfer at a rate of 30 mbps, but the servers can only do 10 mbps
so the throughput between any single client and server is kneecapped at 10 mbps
Since you're familiar with this textbook, can we go over what I should be looking at in the textbook for this problem?
I read Chapter 1 but this section with the math confused me alot
familiar is a stretch, I've read it like 8 years ago
let me explain my thought process
but the text you linked explains it pretty well
so, first, after looking at the problem, I went to section 1.4.4
and I searched for the throughput formula
yes
ahh, I think it will make more sense to you to actually use the figure 1.20 scenario
because in that case the shared link is constrained
with your scenario of 4 servers/clients the combined throughput is 160 mbits, which is lower than 200
well, I just want to figure out all the formulas first so I can just plug in numbers
this way I should be able to solve any problem I find, hopefully
so back to the throughput formula
it isn't clearly listed so I went searching for it
the first thing I see is this:
with the 10 server/clients scenario, if the shared link is 200 mbps, and each server is still 10mbit, each server would transfer at a rate of 10 mbits to 10 clients (10*10 = 100)
since there are 10 servers, that's 1000 mbit/s
Thus, for this simple two-link network, the throughput is min{Rc, Rs}, that is, it is the transmission rate of the bottleneck link
but I don't understand that
Rc is defined as the transmission Rate of the client
here is the exact definition:
Let Rs denote the rate of the link between the server and the router; and Rc denote the rate of the link between the router and the client.
R is 200 mbit/s
yes, correct
Rc is 30, Rs is 10
yes
so it's basically
while number of servers * number of clients * (minimum of Rc / Rs) is below R, that's your max end-to-end throughput between all servers and clients (divide by number of servers/clients to get individual max throughput)
if number of servers * number of clients * (minimum of Rc / Rs) is above R, then you have to calculate the value to put in instead of the minimum of Rc/Rs - you do that by (R / servers * number of clients)
does that make sense?
not immediately, but let me plug in the numbers for the example from the book for Figure 1.20 (b)
be aware that the figure 1.20 doesn't have a connection between every server and every client
fig. 1.20(b) should be the exact same scenario as the problem here except for 10 servers/clients instead of four
yeah, I just explained it from a perspective where each server was connected to all clients
but in figure 1.20 each server is only connected to 1 client
not 10 clients
I'm running the numbers now, let's see what the result is
you can give it a try and I'll tell you if you did something wrong
Hmm, my numbers don't seem to be matching up with the text.
Can you please show me how the throughput of 500 kbps is acheived in Fig. 1.20(b)?
sure
the numbers for Fig. 1.20 (b) are:
Rs = 2 Mbps, Rc = 1 Mbps, R = 5 Mbps
with 10 clients and 10 servers
the throughput is 500 kbps
so the calculation is
10 * (minimum of Rs or Rc, which is Rc with 1 mbps)
so without any constraints, the throughput is 10 mbits
however, R is 5 Mbps
so, now you use the formula you mentioned earlier, which is R / servers * number of clients ?
since they specify equal sharing, to find the maximum possible rate where every link shares the bandwidth equally, you then do R / 10 (your result from before)
the servers * number of clients was because I misunderstood how the clients/servers were connected
it wasn't clear from the excerpt you had before
ah, ok
R / servers * number of clients <- what should this be changed to, then?
I mean formula wise
also known as 500 kbps
it is what you said
but
R / servers * number of clients connected to each server
or rather
let me write the full one
maybe R / server-client connections ?
R / ((min of Rs, Rc) * number of servers * number of clients connected to each server)
does that make sense?
do you understand why it is like that?
remember that this is when the shared link is constrained
so ((min of Rs, Rc) * number of servers * number of clients connected to each server) > R
otherwise the answer is ((min of Rs, Rc) * number of servers * number of clients connected to each server)
so the answer would be 40
200 / (10 * 4)
no, because 10*4 is below 200
so the shared link is not constraining the throughput
so the full throughput of 40 megabits can be sustained through the shared link (divided by 4 servers, it's 10 mbits per server)
yes
but where does it say that in the text?
Not that I'm saying your analysis is incorrect, but I want to bring this up with my professor
the text should be complete and if it isn't, then, I want to recommend the professor to have us use a different textbook
the same logic is extended for any number of links
except that adding more links means introducing another possible bottleneck link
where is the logic you explained about above or below R?
in the final example
they give an example where R (the shared link speed) is basically so large that it will never be a bottleneck
then the throughput between a single client/server (Rc and Rs) will be the minimum value of the two
it continues on the next page and there they explain that the new bandwidth is dependent on the bottleneck part of the connection
hmm, I don't see anything regarding the alternate formula you provided for when the throughout is above R
But obviously, you are correct
It just seems like the text is not clear in its explanation like you are here
yeah maybe not super clear
but intuitively it's fairly simple
if there's no bottleneck, the throughput can't be larger than the minimum link speed from either the client or the server side
if there is a bottleneck, the bandwidth of the link that is bottlenecking has to be split equally between all users (server/client pairs)
you can't really have a single equation for this, because there's an unknown in whether the bottleneck is active or not - you have to figure out that first 🙂
Let me try to sum this up:
- no bottleneck:
throughput = number of servers * number of clients * (minimum of Rc / Rs)
- bottleneck present
throughput = R / ( number of servers * number of clients * (minimum of Rc / Rs) )
Corrected:
- no bottleneck:
throughput = ( (min of Rs, Rc) * number of servers * number of clients connected to each server)
- bottleneck present
throughput = R / ((min of Rs, Rc) * number of servers * number of clients connected to each server)
correct now?
yep
be aware that the throughput in the first case is the total
if you need per server, divide that by the number of servers
wait, I think I need to update my summary again
the throughput only gets divided by the bottleneck if the "no bottleneck" formula is above the bottleneck speed
yes
but remember that the book says
if there's no bottleneck, the individual speed between client/server is just min(Rs, Rc)
but the way you calculate the full throughput to see if there's a bottleneck is like you listed above
Corrected #2:
- no bottleneck:
# individual speed between client/server = min(Rs, Rc)
# throughput = ( (min of Rs, Rc) * number of servers * number of clients connected to each server)
- bottleneck present AND rate of common link (aka "no bottleneck" formula above) is higher than the bottleneck speed
# throughput = R / ((min of Rs, Rc) * number of servers * number of clients connected to each server)
better?
yep
exactly
the throughput at the end is also individual speed between a single client/server pair
throughput = R / ((min of Rs, Rc) * number of servers * number of clients connected to each server)
yes, it is more clear now how the answer is 40 Mbps
ah, ok. that's the max throughput for each of the 4 client-server pairs
yep
and the bottleneck link is R = 200 Mbps
yes
it's a networking course
with network programming supposedly
yeah but in what kind of setting? computer science / bachelor / programming education / ...?
oh, computer science
you know, I read ahead to chapter 3 already
and it gets confusing quite quickly
😄
I assume you found the book pretty easy to understand?
not at all when I studied
took me a while to really understand networking, but I work with it now (as a software developer)
yeah, I work for one of the largest networks in Europe
kind of useful to know low level networking even as a software dev
definitely, the line is getting more blurry as the days pass, but yeah..
well, i have my CCNA, but i don't remember it going this in-depth during my exam prep
I think CCNA especially is more focused on technologies in SMB type stuff
not really low level details
ie Selective Repeat and Go-Back-N are tough
but network programming like this (from Chapter 3) seem quite interesting:
ah yes.. tcp

or what do they call it in there.. rdt or something simplified
yeah it has it in the image lol
RDT means Reliable Data Transfer
RFC 793 is easier to understand than that honestly
as opposed to UDT meaning Unreliable Data Transfer
You have a need to read the RFCs?
I thought only very experienced professionals use them
not really, I've read some of them to understand a few things
they seem quite dense and difficult to follow
I don't need to for my daily work
it's not that bad to be honest
but you have to be familiar with networking and working with binary data (frames)
i'm having last minute doubts about 40 Mbps as an answer conceptually
Can't an individual server only receive data at max 10 Mbps?
if the combined throughput is not constrained by the shared link, the individual client/server rate is min(Rs, Rc)
which is 10 Mbps in your case.
Yes, I got that incorrect
since I put 40 Mbps
and I think the bottleneck was also incorrect
It's not R
Did I misunderstand you here?
I thought you were saying the answer is 40 Mbps
in your scenario, R is 200, and the combined throughput is 40
since 40 is less than 200, the throughput between any individual client/server pair is 10 - which is min(Rs, Rc) = min(10, 30) = 10
going for my network+ soon, any tips for studying?
How about the bottleneck link?
What have you done? My approach (to that exam and others) was basically to read some books with close attention to the practice questions, especially the ones I got wrong. The official exam objectives are also an important resource. For bits I found difficult, Professor Messer videos on YouTube were helpful
That's who I'm watching rn
#data-science-and-ml this is the right place for your question
anyone know why my code aint working https://paste.pythondiscord.com/owicobiwuz
and my error code : https://paste.pythondiscord.com/ziwahoxara
Hey guys, can someone help me with this subnetting question and provide an explanation? I just started subnetting and it's quite confusing so an explanation would be helpful 👍
You have a 172.16.0.0 network with a subnet mask of 255.255.0.0
If you broke that network up using the subnet mask of 255.255.240.0 then;
- How many subnets do you have?
- How many host IPs per subnet?
Please ping me when you reply, thanks in advance.
16 networks and 15 hosts per.
It's easier to reason about in CIDR notation
Actually...
I confused that for type C :p
I think you still only have 16 networks but a lot more hosts now
How did you reach that answer?
The 15 hosts part is wrong. It'd be true if it was 255.255.255.240
I believe there should be 4094 usable hosts
Actually, I meant that how you got to the 16 networks
255.255.240.0 has 4 bits after /16 that are 1, 2^4 is 16 if that makes sense
So /17 has 2 networks (2^1)
/18 has 4 networks (2^2)
/19 has 8 networks (2^3)
/20 has 16 networks (2^4)
Oh okay, thank you 👍
Quick question (hope this is the right thread) - doing some work with a python api into a firewall device. Do I need to continually write and run scripts or can I generate a cli style session via the api?
you can write your own cli that exposes functionality that the API makes available
Hey everyone, I have an off topic question where do I ask it?
in the off-topic channels
Does anyone know how to send a handshake and login start packet to a minecraft server with a library socket? I am trying to make a library that allows you to send packets to the minecraft server. I have seen some tools, but they are hard to understand. Any ideas or code snippets? I also wanna ask if I need the encryption key request and respond if I want to connect an offline account to an offline server. I understand that I don't need the: client auth, encryption request and responses if I want to connect an offline account to the offline minecraft server, but how then will I get the login success packet from the server? I am confused. I need help. It is obvious that I want it in python. I need the packets and the connection. Mineflayer provides only the connection without giving access to the packets sent and received.
anyone familiar with the bind_layers and split_layers of scapy?
Hello!
anyone can help me with CI/CD deployment?
Try #tools-and-devops but don't ask to ask, just ask your actual question
oh thanks!
This is the link to the project on GitHub: https://github.com/Jonathan-404/NetHawk
I want to get to the point where I can remove the encryption from the information that goes through the https tunnel by using an ssl certificate (because this is the only way to remove the encryption).
The base of my project is the proxy which actually simulates a server and the requests go through it, and this gives me full control over the data that being sent by the client and the server.
I want to remove the encryption to really see the information sent and received and change it as I wish.
My problem here is that the algorithm and how this whole thing works. Right now the proxy is running and everything is fine and works great, but as soon as I print the information that goes through https it prints it in gibberish (because it is encrypted)
A tool for process requests and responses, intercept request and analyze the data. - GitHub - Jonathan-404/NetHawk: A tool for process requests and responses, intercept request and analyze the data.
First result on Google looks good to me: https://pypi.org/project/icmplib/
Does anyone know how to get a subnet mask from an IP address?
192.168.24.210 is the IP
It isn't possible to know what subnet is associated with an IP based on the IP. You might want to explain what problem you are actually trying to solve.
The 192.168 implies maybe this is a Class C subnet though, so 255.255.255.0 would be most logical/standard
Oh I see, I get it, thank you
I need to look at the class and determine the subnet from there
Reupload from #1035199133436354600
I installed pyftpdlib but I always get errors https://pastebin.com/ntVVyeBu. I haven't found any tutorial for that and I'm helpless. Is it even possible with pydroid and does anyone know how?
This is from the quick start guide: https://pastebin.com/vq0jHhGd
Thanks in advance❣️
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Some one can halp with import imaplib on gmail auth? my python bot get error: b'[AUTHENTICATIONFAILED] Invalid credentials (Failure)'. but login and password is ok, goole imap allowed, 2nd pass auth not enabled. what it is can be?
A few other things to try here: https://stackoverflow.com/questions/33119667/reading-gmail-is-failing-with-imap
i am done all thinks on this topic thanks, but
i cant see my device autorisation on google device list, so my python discord bot geting this error but on account its not effected
u need google password
i mean app password
u need to go in settings, turn on 2fa, and generate app password
and use thsat password for log in instead
no such thing
although in reality it's very unlikely 192.168.24.210 would be bigger than a /16 but it could be anything up from that
Dear MaliCrni,
I wanted to express my sincere gratitude for your assistance regarding the Google App Password. With your guidance, I was able to successfully integrate the app password into my Discord bot, and everything is now working perfectly.
Your prompt and helpful support in explaining the process and providing clear instructions made it easy for me to understand and implement the necessary changes. I greatly appreciate your expertise and willingness to assist.
Thanks to your guidance, I can now ensure the security of my Discord bot while using the app password for authentication. Your support has been invaluable, and I am grateful for your prompt response and excellent assistance throughout the process.
Once again, thank you for your outstanding support. I am truly grateful for your help, and I look forward to reaching out if I have any further questions or require additional assistance in the future.
Best regards,
Genabox
ist that a chagpt 😁
np
my bot working very good now. thanks again.
Thank you
you made me all emotional and teary-eyed
Hi guys, I want to simulate poisonous ARP attack, it's possible to make this in python ?
@split moss probably not
Okey
In fact, i would like to développ my skills in networking and python, do you have some projects ? I have CCNA and i am on the CCNP
@split moss look into Kali Linux for network VM
It should have arp tools built in which might useable with python
Ok thanks you
yes, it is. i have it implemented in a private git repo.
When logging into public wifis, you often get a push notification or prompt that you have to open a specific web page in order to log in. What is this feature called and is it possible to implement on a raspberry pi access point?
How do I decode the output from StreamReader.read() and print as plain text?
you need to know the encoding first
Sent you a link in #web-development
I'm getting an invalid start byte does this mean I have to wait for the entire stream to end before I decode?
thank you very much
which is the encoding of the stream?
Yes
tried decoding by saving the chunks of read() concatenated in a byte var but same error 😢
do you know what you're doing?
"which is the encoding of the stream?": Yes
Are you trying to decode as utf-8 ? Can you paste in the exact error ?
Thanks! Yes utf-8. "invalid start byte" is the error. I have moved to another task, I will get back to you
The error "invalid start byte" usually happens when the decode method you use encounters something that it cannot decode. Issue might be that the encoding might not be in utf-8. Are you aware of the encoding used at the source sending the stream ? If not then try to figure out that. Its should solve your issue
https://chardet.readthedocs.io/en/latest/
This python module can come in handy if you want to detect the encoding if you are not unsure.
Hi there ! I'm learning myself to use WebDriver without using the python packages ; i ended up implementing each functions to manipulate the page using this documentation : https://w3c.github.io/webdriver/ ; it works suprinsingly well and i could get it up working in a few hours ; I'd like to implement a network analysis layer ; and to do so i'd need to write up a Proxy ; however trying naive proxy with aiohttp gave me an infinite redirection which made me think i did no handle HTTPS properly ; does anyone know if there are any documentation or website explaining the protocol aspect of proxies, how they should be working in general ? I found some using sockets but i'm specificaly interested in writing it with aiohttp
WebDriver is a remote control interface
that enables introspection and control of user agents.
It provides a platform- and language-neutral wire protocol
as a way for out-of-process programs
to remotely instruct the behavior of web browsers.
Hi, Im building my own proxy server following a tutorial
I have no idea why the pinged IP address is still 172.67.217.104, could anyone please help me with it?
The first pic is from GoDaddy and the second pic is from Cloudflare
what's the problem?
you're asking cloudflare to proxy all traffic towards your origin - which it's doing.
172.67.217.104 is the IP of their server which proxies traffic to your own server
I got it, ty!
Hey all. I'm working on a project that involves dynamically rerouting user internet traffic through a rotating pool of proxies. The catch is, these proxies are not 100% reliable. I'm searching for ideas on algorithms or strategies to:
- Choose and switch proxies intelligently.
- Swiftly handle proxy failures.
- Distribute traffic effectively across the pool.
Any ideas, existing algorithms, or suggestions on performance metrics to consider are welcome.
print("test")
How can i translate long texts
I think there are 4 different source and destination ports as shown in the graph - A, B, C and D
Sending a bunch of requests through python and inspecting one request sent shows me this. I presume this is not how it's suppsoed to look? Are there any solutions or is this intended behavior somehow?
It seems that this is just wireshark notifying that it recognizes the port number from an earlier request, so it shouldn't be a problem
You can scroll horizontally
what does it mean to "distribute traffic effectively across the pool" ?
are you trying to utilize every proxy at the same time because that matters for your use case, or can you make it simpler?
there's not really a perfect way to split proxies for every use case, because in some cases you can share one proxy between many connections, but in other more demanding usecases that may not be the case.
Hi, Can you propose me some networking projets to do ? I have a good level in python and networking but I Never did any python networking project so guys, do you have any Idea of projects ?
@frozen drum For a bit more context. I have written a custom proxy service that takes in incoming traffic from N amount of clients and distributes it to a pool of free proxies that are gathered & filtered (the tool is a single proxy that users connect to, and their traffic is rerouted). The pool is constantly being filtered to ensure the proxies work. As incoming user requests come in, I want to optimize traffic distribution to the proxies. I can gather data on the proxies during filtering stage (latency, fail rates, etc.) My main goal is a good model that minimizes user latency per request. The tool I’m building will allow customization of the pool distribution mechanism, so eventually anyone can expand on it. For the meantime, just want a working (effective, albeit not necessarily perfect) model.
simple is usually great until you have specific needs that require adding more complexity
if you have a regular check of the latency / efficacy of a proxy, simply throwing new clients onto the least loaded (latency/bandwidth wise) is likely a good strategy
@frozen drum I suppose a good strategy is concentrating on specific proxy measurement (latency, as you suggested), and connecting the clients to the most optimal open proxy when their request comes in. That’s a simple & good idea.
It’s gets progressively more difficult when considering these free proxies are constantly going offline, crashing, error’ing out, etc. Nonetheless, concentrating on latency & ‘workability’ might be good enough for v0.1.
for some reason my ethernet is 1/10th the speed of my wifi
i’m using cat 6 cables, but i get abysmal speeds
try new cable
maybe broken
yeah somethings wrong
my subnet just died and took out my entire network with it
i have like 30 meetings today to lol
Can i change the ip address of my router?how?
Do you have a dynamic or static ip?
if it isn't static, unplug the router and wait 5 minutes and plug it in again
should've changed
"Workstations do not typically need client software to use a site-to-site VPN"
What is a site-to-site VPN and what does this sentence mean?
I am learning backend development and found many interesting topics like webhooks, websocket etc..
and i want to implement these into my apps but most of the framework added so much abstraction to it that you don't have any control over it and don't learn anything
and i think it's for good reason due to added complexity of protocols but for beginner like me i want to learn about them how they really work and how can i implement them.
can anyone tell me how can i implement these by myself and integrate in my webapp
for context i use Python with Flask framework for backend applications and have very basics knowledge of networking (concept)
what things i have to learn before even thinking to implement these ?
can we implement all of these using python socket?
suggest me roadmap and how can i implement these protocols with minimum abstraction
Ditch flask and build ur own from ground upp
Can anyone do paid work for me? dms
I'm on the lookout for a talented and passionate technical individual to join me on an exciting entrepreneurial adventure. Together, we'll be building something groundbreaking called Stonfa. 🚀 This project requires expertise in Python, Django, React + likewise relevant tech stacks and knowledge of the latest advancements in AI. If you're proficient in these tech stacks and have a strong desire to create innovative solutions, then you might be the perfect fit! I'm not looking for an employee; I'm seeking someone who is eager to be part of a dynamic team, contribute their skills and ideas, and share in the success of the project. Equity in the venture will be offered to the right person, emphasizing our commitment to long-term collaboration. If you're passionate about technology, excited about the possibilities of AI, and ready to embark on an entrepreneurial journey, let's connect! I come from a business and domain background of this specific field so my expertise combined with your tech enthusiasm will be amazing... Drop me a message, and let's discuss how we can shape the web of tomorrow. PS: “The base of the project has been build, prototypes and everything else just looking for someone to bring it to life as quick as possible :))”
this is not what the "networking" channel is for
its for computer networking, not building the 500th AI startup
need real expert... didnt find any solutions in the internet after about 5-6 hours of searching and trying various scripts, not even the ai could help it https://discord.com/channels/267624335836053506/1121496334172696637
Hi I have questions for my project
I want to create a roomchat
With socket module
I would like to know what IS the role of a server of a chat ?
My Idea IS :
If WE are in the saloon, we send to the server and the server print the message
If WE want to discuss with another user, WE send to the server and the server send to the other user...
IS that ok ?
yes
It's conceptually how platforms like Discord work
Though Discord has a slightly different model - you send over HTTP (with some exceptions) and recieve over websocket
So you make an HTTP request to Discord saying "Hey, I want to send this message"
Discord will process that message and send it out to everyone else involved in that channel/server
Hey anyone interested in hackathon based on web3 can dm me
You can get it through post requests if your bot is verified
Only interactions, you can't get other events, and doesn't need to be verified.
Yup I think interactions over HTTP is useful for relatively small bots that you can host as a serverless function
how many connection pools for caching is optimal before discarding the least recently used pool?
I'm setting up a simulated network using packet tracer. I'm setting up 2 routers, 2 switches and 4 end users (PC's), i was given a network ip address and CIDR but the way the task is worded is confusing.
Using Packet Tracer Version 8; Build the following network topology and assign IP addresses with appropriate subnets;
Make sure to subnet to the 3rd subnet.
HINT: the device requirements will modify the initial CIDR, subnet mask and network increment.
is it a typo and the professor means to subnet to the 3rd "octet"?
the network IP provided to me was 192.168.20.0/26
Private IP depends on the router, for public IP see what Akex said... or use a VPN
Personally, this is so easy to implement in redis though that i would not bother implementing it in sockets.
Unless you had some other constraints like not being able to install and start a service
I would recommend looking at PubSub operations with python in redis. There is a lot of cool stuff here that makes multi client communication dead simple in redis ...https://redis.readthedocs.io/en/stable/index.html
simple pub sub setup is as simple as...
import redis
#publisher
publisher = redis.Redis(host="host", decode_responses=True)
message = "hello world"
publisher.publish('mychannel', message)
import redis
# client
client = redis.Redis(host="host", decode_responses=True)
subscription = client.subscribe('mychannel')
while 1:
message = subscription.get_message(timeout=1)
Is there any webpage or something that explains how connection reuse in http2 works? I read the rfc https://httpwg.org/specs/rfc7540.html#reuse but I can't grok it at all.
huh?
Ok thanks you

@ember ledge wdym "location" ? like country?
I think they mean minecraft location
but not possible still
bruh someone want wallhack for minecraft
can anyone help? https://discord.com/channels/267624335836053506/1123997995524952164
not other player positions
you simply can't get other player position
im afaik the server sends the player position packets
chatgpt can do quick search for you for the spefici kind of firewall commands you are using for linux machines
be it ufw or firewall
or the GUI
try iptables
Does anyone know how to make a anti ddos program in python?
I mean I can make it as a background task that would listen for incoming packets.
But the packets would already be transmited and processed.
Maybe scapy or wireshark can help.
There’s no such thing as an “anti ddos program” due to the nature of how the attack works. A DDOS attack is a flood of traffic, much higher then the usual traffic, with the intent to overload a server. You cannot stop people from doing this however you can take steps to prevent damage being done by integrating load balancing for example.
https://fasterthanli.me/articles/i-won-free-load-testing has some practical details about what to do to survive DDOSes. Not for python, but the same techniques apply.
hi
I once used fail2ban to prevent DDoS of mail (smtp) server by analyzing logs and ban of offenders. Surprisingly fail2ban is written in Python.
However, this is more like exception. Anti DDoS measures often use more complicated setups, low-level methods and even network equipment configuration. Even fail2ban in this case was configuring iptables/ipset
hii
Ok then.
python and perl have ruled the world of automation for decades
This channel isn't for that kind of networking 😛
lol
Is it possible to add jammer to packet tracer?
Hi guys
class server():
HOST = ''
PORT = 5000
address = (HOST,PORT)
def __init__(self):
self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM).bind(self.address)
def listen_connexion(self):
while True:
self.socket.listen()
conn, address = self.socket.accept()
print(f"{address} vient de se connecter")
thread = threading.Thread(target=self.select_username, args=(conn,address))
thread.start```
listen() and accept() not working Cannot access member "listen" for type "None"
Do you know why ?
Your self.socket equals to socket.socket(socket.AF_INET, socket.SOCK_STREAM).bind(self.address) And .bind() has no listen. You need only the socket.socket(socket.AF_INET, socket.SOCK_STREAM) part.
and use for threading thread.start() you forgot the ()
hi everyone, I like to ask a few questions
My company have a virtual network in a private cloud and my admins have access to the firewall (we connect to the network via SSL VPN). Network is powered by the vmware vcenter
There is a server which I use as an ssh jumpbox but since this box is in the same network I am told there is not much thing we can do in terms of restricting access because they are in the same network. The jumpbox should be in another network in order for the firewall rules to work. Why is that? I thought everything went through the firewall router. Why are computers in the same network an exception?
I am also told that to put that box into another network we have to ask private cloud provider to create a network for us. I thought we could simply do that by assigning a new ip address and configuring the firewall to route the traffic. Why do we need the provider in this case?
yeah so the thing to understand here is that unless explicitly configured to do so, hosts on the same network will communicates directly via MAC addressing and bypass the overhead of routing through the firewall. it should be possible to configure the network to change that, but I'm not familiar with vmware sadly
Less python related more a general ask for help with some networking work
I've done basically all my tasks but I am stuck on one question in particular that needs me to Derive the generator and check matrix which can be used to encode the four data bits.
If anyone has the knowledge on how to do this please help
Also please ping if you do respond to this as don't have notifications for all messages enabled within this server
When do entities on the same network, connected by a router, get another entity's MAC address? I thought that never happens unless it's the packet from an entity to the router or from the router to an entity, in which cases the MAC address is of the router and of the sender XOR the recipient respectively, meaning they never get the other entity's MAC address
Yeah this is true when via a router - I should have specified that this is making the assumption that the local network is switched using a vswitch instead of via a router. we need to remember that these hosts are VMs so this assumption is more likely to be the case. It's hard to say for certain without knowing the underlying network but it's rare for a fleet of VMs (or even physical servers tbh) to be routed instead of switched on a local network
Essentially if they used a virtual router instead then each VM/machine wouldn't be on the LAN but rather their own individual little subnets
hello, i am trying to make a program to create a fake wifi network (access point) using python3.9, but i cant find a way to do it easily, and i dont want to install a lot of libraries with pip, since i assume it also would be possible using built in libraries. Does someone know a way of easily creating access points/wifi networks
Don't reinvent the wheel. If you really don't want to use a pip package like PyAccessPoint then just borrow the code
What exactly is "a fake wifi network"? An access point that accepts connections but doesn't provide any network access?
normal wifi networkis give you access to the internet, and right now i dont have two antennas, so i cant give internet access.
so its kind of fake
Nevermind, i just got and answer from a different server
Hi ! i dont know if i can ask but i have an interrogation in the use of selenium : does it need to have a webbrowser installed on server to work ? (i wrote a script for scraping our mantis page)
yes of course
damn i know it XD
how do i semd things that arent bytes with sockets?
how do i send a list of integers that are larger than 256 through sockets?
Everything is turned to bytes when sending stuff through sockets, you need to make a way of de serializing the data
i'm new to sockets. Does anyone know if it's possible to connect to a remote linux server using sockets ?
For example, converting a list to a string and convert it to bytes, then on the other side decode the bytes to a string and use json to load the list, it's the same process but backwards
Via what
Ssh?
ftp
@jade sentinel sockets is just a standard OS facility to work with TCP or UDP network requests. So everytime you interact with remote host by network (via TCP or UDP) you use sockets.
so can I use socket to connect to a remote ip address?
and get directory information from it
You can
Check the ftp protocol and how does it work in order to connect
i can't do it with just socket?
You can
They already told what sockets are, so I won't be explaining that part. Ftp is a protocol (file transfer protocol), every protocol works in a different way for sending, receiving packet format etc
But I would recommend learning morea bout networking before hopping to an ftp client
<@&831776746206265384>
!warn 1101225330938748971 this server isn't an ad board, please refrain from advertising.
:incoming_envelope: :ok_hand: applied warning to @wide viper.
How do i use websocket in python to get cloud variables in turbowarp (Scratch tool)?
Depending on the nature of your question you can ask in #cybersecurity or maybe #career-advice
I have a question about DNS records if anyone might help me out. Im studying for my net+ with practice exams. I got a question saying "What record can be used to track changes on a DNS Zone?"
The options were SOA, SRV, TXT, or NS record. The answer was NS record and not SOA (Which i thought it was). Can someone explain this to me? Thank you!
Hmm but there are not really active 🥲
SOA does make more sense to me. Could be a mistake on the practice test (I've seen more than a few of those)
I would answer SOA as well
neither is this one
Hello there,
I want to use flask, but the hardware is a littlebit exotic.
It is an IX15 gateway for xbee mesh networks.
It has a full fledge python, and even has a command line where I can do basic stuff like ask the ip, or lookaround in the filestructure..
Anyway, If I run a basic hello word flaks app, it say you can find it this IP adress, but If I check in the browser nothing is there.
Can someone help me debug this issue?
you probably need to open the ports
i see. I can do that from command line I guess.
you know how to do it?
nope. 🙂
googeing it right now
but if you can help me out that would be awsome too
is it linux?
yes
is the machine in your home or is it outside your lan
so it is inside of my lan. next to me actually. :
execute the command ufw
/bin/sh: ufw: not found```
which distro are you using?
Well, I am not sure what is on the device.
how can I check that?
lsb_release -d
same 😦
/bin/sh: lsb_release: not found
via ssh
when you log in
from pycharm
a banner should appear with some info
well, it does not.
This is how the login looks like.
just select which mode I want to log in, I choose shell, then I can do some linux commands.
sorry, forgot to reply you.
Anyone experienced with websockets?
dont ask to ask
could you be a littlebit more specific? 🙂
What is your issue?
hi! i am new here. hopefully this is the right channel for my question.
the documentation for the selectors module comes with an example program for a simple, multiplexed echo server that contains an interesting comment.
conn.send(data) # Hope it won't block
even though the socket that is being used has been put in nonblocking mode, there are high pressure situations in which the socket can block.
i was able to provoke that easily with an un-throttled client program that just bombards the server with requests.
it's easy enough to understand what is happening there, no question around that.
though, i wonder, what piece of python documentation tells me that i have to expect this type of exception for this particular function call?
i wasn't able to find anything related.
actually, it seems to me that the same is true for many functions of the socket module.
e.g. a call to bind() might fail with a OSError: [Errno 98] Address already in use what is typically caught with a message to the user explaining how to find out what other program might be be bound to that port already, etc.
but, how does the inexperienced python programmer learn that that exception might be thrown to begin with?
to explain further, i am not talking about the concept of berkeley sockets that a programmer must be familiar with already.
i am talking about how a programmer can understand which concrete python exceptions might occur in particular situations.
If it's not in the docs (shame on the developer) you can look at the source code
i could image part of the reason why this is not properly documented is that exceptions around sockets seem to be platform-specific.
still, imagine you write a piece of code and deploy it to a critical application, only to see it crash later because you didn't handle an exception gracefully that can be thrown in some situation.
i somehow can't imagine i am the first person using the python socket module who cares about this aspect...
My server runs locally fine, but when deploying it on a VPS the fields coming in for a multipart/form-body request is giving a 422 error for missing fields, specifically the file upload field.
Other request endpoints are working fine.
The server is hosted on Azure VM and is using Caddy for the reverse proxy.
The command I'm using for uvicorn is this: python3 -m uvicorn --proxy-headers main:app --host 0.0.0.0 --port 8080
My caddy config:
:80 {
reverse_proxy :8080
}
server.my.domain {
reverse_proxy :8080
}
Let me know if you need any other info
Hi,
I have a networking issue I haven't been able to solve; hoping someone here might have an idea.
I have a service on K8s running Gunicorn, Connexion, Swagger and Flask, using Python 3.7.3.
As part of an effort to upgrade things to newer versions, I performed the following version changes:
- Connexion: 1.5.3 --> 2.14.2
- Flask: 1.1.4 --> 2.1.3
- Werkzeug: 1.0.1 --> 2.2.3
- (Some others that I don't think are likely to be relevant)
- Python: 3.7.3 --> 3.8.17 (the issue also happens without this change though)
With these changes I've started getting numerous connection issues. Mostly "Connection reset by peer," some "connection refused."
These are when connecting directly; I normally use an NGINX ingress controller for accessing the service, in which case I get numerous 502, 503 and 504 errors instead.
All my efforts to figure this out, fix it or work around it so far have been unsuccessful, so I'm rather at the end of my rope here.
Any advice or idea would be very welcome.
Gunicorn is the latest version (20.1.0; I haven't touched that) and running sync workers if that helps anything. I did try switching it to use gthreads, and I think the errors persist, but I'm not 100% positive since it breaks another major part in the system as well, making all the tests fail regardless.
guys I need nodejs elp
nodejs help
im trying to send Gigabytes of data from my express backend to the frontend client to download
im getting max heap errors
the internet is telling me to try the streaming method
making a buffer and sending chunks
using fs.read or write stream
does anyone have experience doing this well?
becuase apparently I have to manually determine the cut off size for the buffer or something?
if someone helps me out with this u can download the game on my website fo free
print('Im Stupid')