#networks

1 messages · Page 6 of 1

radiant vortex
#

I can't send the output, it's too long for pastebin, but if anyone can help me, they can run the code and get the output?

valid gyro
#

looks like html to me

#

with some css (and probably js) mixed in

radiant vortex
#

</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

steady horizon
#

It says it is (LD) JSON in the tag <script type="application/ld+json">...

#

It's seems it's just JSON with a set set of keys

spare shore
#

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.

steady horizon
#

Well html.parser.HTMLParser is a thing in the standard library, but I have never used it myself

spare shore
#

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

amber anchor
#

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.

spare shore
#

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

primal lintel
#

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

trail bridge
#

so there are a few ways, and i dont know if any of them work in python 2.7

primal lintel
#

Could you let me know?

trail bridge
#

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?

primal lintel
#

no it's personal project

#

and it's very old

#

so it's only run on xp

trail bridge
#

but its an windows xp exe?

trail bridge
#
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

primal lintel
#

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

trail bridge
#

@primal lintel you there?

fallow oasis
#

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

oblique berry
#

Anyone here have experience with Paramiko?

#

Specifically we doing ssh sockets with it

glacial eagle
#

Hey guys! I am a business guy working in Finance and I'm teaching myself Python! I am in the NYC area

ember nova
sharp sundial
#

Anyone know any good tools to do some labbing?

deep fiber
#

Hey guys

formal quarry
#

hello

#

I'm new to python can anyone make me a script for python? I can pay

slate forge
#

what's the script

#

did u ask chatgpt first

oblique pawn
magic kernel
#

hi, does anyone know anyone in person coding competions for highschool students in nyc where python can be used?

pearl anchor
#

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

glossy flint
#

Hey everyone, my name's Phil im from VT. I'm attempting to learn Python.

ember ledge
#

to learn python i would follow basic tutorials on youtube

zealous flint
#

!resources

errant bayBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

hard monolith
#

can I try and catch this exception using

lucid scroll
#

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

toxic mural
#

DNS is light enough that i don‘t think this is a common usecase to be honest

zealous flint
#

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

safe jungle
#

hello there

#

how can i use peer to peer connection in python

lucid scroll
#

in such a way that nameservers/resolvers (1.1.1.1) are spread equally between DNS requests

regal birch
#

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.

toxic mural
#

gunicorn has support for statsd metrics that you can use, but note for multiprocess you may need to sum it together

digital gate
#

Is this Networking about Graph theory-network? Or socializing-network?

zealous flint
ionic hemlock
#

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?

zealous flint
#

Frame buffers and automdix/autoduplexing

safe rampart
#

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

ashen portal
#

I want to get into IoT, where should I start? I have an elegoo uno, and also heard of esp32. What is that?

light kayak
#

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

west oxide
#

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?

karmic glen
#

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

karmic glen
#

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

ashen portal
#

what is LoRa?

covert topaz
karmic glen
karmic glen
covert topaz
#

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

karmic glen
#

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 !

covert topaz
#

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

karmic glen
#

oh I see, thanks for all these informations !

covert topaz
#

no prob

gaunt kernel
uncut grail
#

Hello i have question how can i get ip in python?

ember ledge
#

use an api

#

or scrape it

ember ledge
#

I have a question related to this

#

How do these apis get your IP

zealous flint
#

Well, at least the source IP (which may or may not be your IP)

ember ledge
#

Oh got it

zealous flint
ivory ridge
#

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

final meteor
#

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?

zealous flint
final meteor
#

ty

tranquil current
winter reef
#

how do i set my dns using python?

bold heart
#

On windows and mac its handled by the operating system

#

On linux its most probably /etc/resolv.conf

winter reef
teal fiber
#

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 ?

bold heart
winter reef
bold heart
#

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

winter reef
bold heart
#

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

winter reef
#

tnx

winter reef
deep fiber
#

Hey guys

winter reef
sly wind
#

hellloooo my python buddies

ember ledge
#

Lmfao

shrewd sapphire
#

hello

vestal dirge
#

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

patent oracle
#

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?

steady horizon
#

Is the computer in the same network

patent oracle
steady horizon
#

What is the error that you're getting

patent oracle
#

It simply can't find the server

#

I can open the website on the raspberry pi

#

But any other device can't find it

steady horizon
#

On what address and port does it say it's listening

patent oracle
#

127.0.0.1 port 8080

steady horizon
#

Also how are you connecting to it

patent oracle
#

through wifi. We connect to the wifi accesss point we setup on the raspberry pi

steady horizon
steady horizon
patent oracle
patent oracle
steady horizon
patent oracle
#

yup

steady horizon
#

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

patent oracle
#

Thank you that worked 🙂

steady horizon
#

👍

sly wind
river trellis
#

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?

zealous flint
vagrant plank
#

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:

ember ledge
#

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.

lone crow
#

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:

buoyant patio
#

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

steady horizon
stiff bear
#

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.

buoyant patio
#

Are there any resources for learning optimal socket programming in python?
cuz tutorials I've seen so far are buggy/very basic

cunning ruin
#

I like sensors that's can be a pet project

lone crow
lone crow
steady horizon
#

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

buoyant patio
oak portal
#

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?

boreal wing
#

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

steady horizon
#

Maybe your JavaScript side tries to access port 80 (you're serving on port 8000 which is unconventional for HTTP)

boreal wing
#

I tried on 80 too.

lilac holly
#

wsg im kinda new to this

#

what do i need to know to be a good programer

pallid haven
#

is here anyone writing the geeks for geeks jobathon?

pallid haven
#

answer this question

toxic mural
#

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

naive warren
#

really, what's that got to do with networking?

errant bayBOT
#

: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.

ember ledge
astral flicker
#

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"]

teal jay
#

does anyone know solution i searched on everywhere but there is no related to this

silk charm
#

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

crystal current
# teal jay does anyone know solution i searched on everywhere but there is no related to th...

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

faint tinsel
#

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

zealous flint
faint tinsel
#

i need somthing sustanable

#

i will forget its gonna be charged to my card

fervent osprey
#

which simulation software is best for simulating IoT devices, I need to simulate IoT devices with Intrusion detection System

worthy rune
#

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)

steady horizon
#

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

polar cloak
worthy rune
#

I will check it out tnx

ember ledge
#

Hi, any idea how to keep websocket/socketio connection alive when restarting backend server ? I am using python-socketio

quick zealot
#

@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

unreal wren
#

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

lone crow
#

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

crystal current
quaint token
#

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?

quaint token
#

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

steady horizon
#

You can use an existing internet protocol like HTTP/S or WS/S

#

They don't have to use the standard web ports

kindred briar
#

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🥲

crystal current
crystal current
# kindred briar I want to create a mesh network that can transfer data between the connected nod...

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...

kindred briar
#

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

quaint token
#

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?

idle obsidian
# quaint token im trying to follow this https://docs.python.org/3/library/ssl.html to establish...

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.

quaint token
quaint token
idle obsidian
#

change the certificate ur using.

quaint token
#

Just generating a new one doesn't sound like it would help

idle obsidian
#

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

ornate sluice
#

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?

normal plover
#

help me pls

cunning garden
cunning garden
grand pike
#

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

surreal pumice
#

any good free courses for basic network?

ember ledge
#

whats the easiest webserver library

#

I dont need anything special, just displaying websites, sending and receiving requests

quaint crystal
#

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

crystal current
steady horizon
#

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).

wispy epoch
#

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

sterile garnet
#

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 ?

surreal pumice
#

any good free courses for basic network?

marsh arrow
#

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!

upper chasm
#

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!!

sweet igloo
# surreal pumice any good free courses for basic network?

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

ember ledge
#

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.

marble cloak
#

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

strong walrus
#

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.

livid edge
#

What routers would you recommend for self hosting?

steady horizon
steady horizon
silver mulch
#

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

steady horizon
# silver mulch 'import socket, sys from _thread import * #Basic server info #5555 is generally...

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

silver mulch
#

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

ember ledge
#

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

normal gazelle
nimble maple
#

no UTs, so 👎

silver axle
#

who knows how to craft enet packets in python? am thinking to make my own module of enet using python

heady breach
ember ledge
#

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.

static fiber
#

maybe try

print(hasattr(socket, 'IP_RECVERR'))

to sure that IP_RECVERR is able in ur OS.

static fiber
normal gazelle
static fiber
#

What's wrong with Qt?

#

I was going to use PyQt

static fiber
normal gazelle
#

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

static fiber
normal gazelle
#

English

static fiber
normal gazelle
#

Yeah no problem. Do you mind if I could take a look at your project?

static fiber
normal gazelle
#

Looks like its private

static fiber
static fiber
normal gazelle
#

thats pretty big, cant believe you used sockets

static fiber
normal gazelle
#

why though? Why not just UDP and TCP

#

oh nvm

#

wait what

static fiber
#

i had problem with send multidata via UDP

normal gazelle
#

make a protocol

#

this is mine

format = {'sender':sender, 'message':message, 'message_type':message_type}
static fiber
#

i have custom protocol and for udp, but when i had several connection to udp i had overlap data

normal gazelle
#

the downside of sockets, thats why I had to use asyncio

#

I had that same issue

static fiber
normal gazelle
#

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

static fiber
#

i saw, ur project looks pretty good if comapre with mine xD

normal gazelle
#

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

static fiber
#

anyway its fine

normal gazelle
static fiber
#

now my project need in chat, integration with Telegram, GUI, DB, rooms and base settings for anything (rooms, users)

normal gazelle
#

Yeah all im lacking is a GUI

#

I have SSL ready whenever, and I can add DB pretty easily

static fiber
#

Channel is it mean room?

normal gazelle
#

yup

static fiber
#

i should look at ur project again 😄

normal gazelle
#

and I had to change some things like broadcasting in the Server

#

this terrible double portion...I just slapped this in

static fiber
#

is it all on TCP?

normal gazelle
#

Yes

static fiber
normal gazelle
#

I dont know if ill ever add VoiP or anything like that

static fiber
#

is it project for improve ur skills or whatever?

normal gazelle
#

It was at first yeah...im still not sure what it is tbh...i just keep adding on to it

spare vale
#

@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?)

steady horizon
#

localhost may be using a shortcut

#

So it may not be sending packets out the server computer

spare vale
#

Ah ok, I have a school server I can connect to, maybe that would make it easier to detect the packets?

steady horizon
#

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

spare vale
#

Just for there to be no confusion

steady horizon
#

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())

spare vale
#

im on windows yeah

#

but on vscode

steady horizon
spare vale
#

the server that is

#

and I should run the chat client with the server host IP right? which would be my computers IP right?

steady horizon
#

Ye

spare vale
#

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?

steady horizon
#

Actually, thinking about it, my Ethernet adapter doesn't list any IPs

spare vale
#

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

steady horizon
#

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)

spare vale
#

so the server host would be 127.0.0.1?

steady horizon
#

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

steady horizon
spare vale
#

XD

steady horizon
#

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

steady horizon
spare vale
#

You know what, I'm just gonna use the schools servers, I believe it's easier that way

spare vale
ember ledge
#

with this code I obtains False, IP_RECVERR is not supported on linux.

heady breach
# ember ledge Thanks

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

normal gazelle
#

I keep having an issue where if a client joins, then changes network connections the client connection stays open

#

its a tedious process to setup to replicate the error but I explain it more in the file

final shell
#

does anyone have any recommendations of resources to learn sockets?

prisma cobalt
normal gazelle
#

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?

prisma cobalt
#

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)

normal gazelle
#

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

prisma cobalt
#

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 ?

normal gazelle
#

should I incorporate the heart beat as a ping then?

#

like time info etc

normal gazelle
ember ledge
#

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.

normal gazelle
#

so ssh?

#

or telnet essentially...not sure if you have encryption

void cave
#

can anyone tell me where can i learn networking in order to start devops and automation

restive solstice
#

or gooble "learn tcp/ip" an follow your nose

agile granite
#

i wanna talk

ember ledge
#

about what

blazing radish
#

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.

cunning garden
blazing radish
#

Sorry.

vocal cedar
#

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 ?

crystal current
vocal cedar
#

Thanks 👍

lucid knot
bold lark
#

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?

celest pewter
#

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

leaden glen
#

hello anyone from the uk here?

crystal current
leaden glen
#

lol

ember ledge
#

aye

worn aspen
#

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.

crystal current
#

Lol I really think we need to rename this channel because people don't read the description 😉

lapis scroll
#

#network-sockets

normal gazelle
#

make sure its the Asyncio-TCP branch

mortal canyon
#

!f

frozen jolt
#

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

crystal current
sharp mirage
quartz reef
#

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?

ember ledge
#

anyone have recommendations for good rotating residential proxies?

#

and not insanely expensive

normal gazelle
#

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

#

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

ember ledge
#

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.

normal gazelle
ember ledge
#

How can I deal with event-loop in multi processing and multi threading?

normal gazelle
#

can you send me a link to your code

#

@ember ledge

#

you should only need asyncio

#

not threading or anything like that

sharp mirage
pure bough
dire valve
#
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?

frozen drum
#

it's a weird question though

dire valve
#

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.

frozen drum
#

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

dire valve
#

Rs and Rc apply to each server and client respectively

frozen drum
#

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 🙂

dire valve
#

Is it more clear now?

frozen drum
#

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

dire valve
#

one server and one client isn't shown though, but I think you understand now

frozen drum
#

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

dire valve
frozen drum
#

what does your textbook say?

dire valve
#

I'm trying to search for an explanation similar to yours, but so far, I don't see it yet

frozen drum
#

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

dire valve
#

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

frozen drum
#

haha, I have an old version of that 🙂

#

yes, this is saying basically what I told you

dire valve
frozen drum
#

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

dire valve
#

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

frozen drum
#

familiar is a stretch, I've read it like 8 years ago

dire valve
#

let me explain my thought process

frozen drum
#

but the text you linked explains it pretty well

dire valve
#

so, first, after looking at the problem, I went to section 1.4.4

#

and I searched for the throughput formula

frozen drum
#

oh

#

you took the figure 1.20?

#

and changed it to 4 clients/servers?

dire valve
frozen drum
#

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

dire valve
#

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

frozen drum
#

yep

#

it's not that complicated

dire valve
#

so back to the throughput formula

#

it isn't clearly listed so I went searching for it

#

the first thing I see is this:

frozen drum
#

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

dire valve
#
Thus, for this simple two-link network, the throughput is min{Rc, Rs}, that is, it is the transmission rate of the bottleneck link
frozen drum
#

yep

#

Rc in this case is the 200 mbit

dire valve
#

but I don't understand that

#

Rc is defined as the transmission Rate of the client

#

here is the exact definition:

frozen drum
#

oh sorry

#

you are right, I misread

dire valve
#
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.
frozen drum
#

R is 200 mbit/s

dire valve
#

yes, correct

frozen drum
#

Rc is 30, Rs is 10

dire valve
#

yes

frozen drum
#

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?

dire valve
#

not immediately, but let me plug in the numbers for the example from the book for Figure 1.20 (b)

frozen drum
#

be aware that the figure 1.20 doesn't have a connection between every server and every client

dire valve
#

fig. 1.20(b) should be the exact same scenario as the problem here except for 10 servers/clients instead of four

frozen drum
#

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

dire valve
#

I'm running the numbers now, let's see what the result is

frozen drum
#

you can give it a try and I'll tell you if you did something wrong

dire valve
#

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)?

frozen drum
#

sure

dire valve
#

the numbers for Fig. 1.20 (b) are:

#

Rs = 2 Mbps, Rc = 1 Mbps, R = 5 Mbps

#

with 10 clients and 10 servers

frozen drum
#

yep

#

each client is connected to only 1 server

dire valve
#

the throughput is 500 kbps

frozen drum
#

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

dire valve
#

so, now you use the formula you mentioned earlier, which is R / servers * number of clients ?

frozen drum
#

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

dire valve
#

ah, ok

frozen drum
#

it's basically 10 * 1

#

because each server is connected to 1 client

dire valve
#

R / servers * number of clients <- what should this be changed to, then?

frozen drum
#

5 / (10 * 1)

#

which is 0.5 mbits

dire valve
#

I mean formula wise

frozen drum
#

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

dire valve
#

maybe R / server-client connections ?

frozen drum
#

R / ((min of Rs, Rc) * number of servers * number of clients connected to each server)

#

does that make sense?

dire valve
#

let me plug in numbers and try again

#

ok, yes, that makes sense

frozen drum
#

do you understand why it is like that?

dire valve
#

now, let me try this formula for the current problem

#

I have a throughput of 5 Mbps

frozen drum
#

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

dire valve
#

200 / (10 * 4)

frozen drum
#

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)

dire valve
#

oh, you mentioned that here:

frozen drum
#

yes

dire valve
#

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

frozen drum
#

the same logic is extended for any number of links

#

except that adding more links means introducing another possible bottleneck link

dire valve
#

where is the logic you explained about above or below R?

frozen drum
#

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

dire valve
#

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

frozen drum
#

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 🙂

dire valve
#

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) )
frozen drum
#

number of clients per server

#

otherwise yes

dire valve
#

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?

frozen drum
#

yep

dire valve
#

ty!

#

now, let me run the numbers for this problem again

frozen drum
#

be aware that the throughput in the first case is the total

#

if you need per server, divide that by the number of servers

dire valve
#

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

frozen drum
#

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

dire valve
#

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?

frozen drum
#

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)

dire valve
#

yes, it is more clear now how the answer is 40 Mbps

frozen drum
#

🙂

#

what kind of course/education are you doing this in?

dire valve
frozen drum
#

yep

dire valve
#

and the bottleneck link is R = 200 Mbps

frozen drum
#

yes

dire valve
#

with network programming supposedly

frozen drum
#

yeah but in what kind of setting? computer science / bachelor / programming education / ...?

dire valve
#

oh, computer science

#

you know, I read ahead to chapter 3 already

#

and it gets confusing quite quickly

frozen drum
#

😄

dire valve
#

I assume you found the book pretty easy to understand?

frozen drum
#

not at all when I studied

#

took me a while to really understand networking, but I work with it now (as a software developer)

dire valve
#

oh, you use it as a dev

#

I guess that's why they force us to learn this material

frozen drum
#

yeah, I work for one of the largest networks in Europe

#

kind of useful to know low level networking even as a software dev

dire valve
#

did you get any certs along the way?

#

ie CCNA, CCNP, etc?

frozen drum
#

nope, they aren't valued in software dev

#

I'm not a networking engineer

dire valve
#

ah, ok

#

there's a difference there

frozen drum
#

definitely, the line is getting more blurry as the days pass, but yeah..

dire valve
#

well, i have my CCNA, but i don't remember it going this in-depth during my exam prep

frozen drum
#

I think CCNA especially is more focused on technologies in SMB type stuff

#

not really low level details

dire valve
#

ie Selective Repeat and Go-Back-N are tough

#

but network programming like this (from Chapter 3) seem quite interesting:

frozen drum
#

ah yes.. tcp

#

or what do they call it in there.. rdt or something simplified

#

yeah it has it in the image lol

dire valve
#

RDT means Reliable Data Transfer

frozen drum
#

RFC 793 is easier to understand than that honestly

dire valve
#

as opposed to UDT meaning Unreliable Data Transfer

#

You have a need to read the RFCs?

#

I thought only very experienced professionals use them

frozen drum
#

not really, I've read some of them to understand a few things

dire valve
#

they seem quite dense and difficult to follow

frozen drum
#

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)

dire valve
#

Can't an individual server only receive data at max 10 Mbps?

frozen drum
#

which is 10 Mbps in your case.

dire valve
#

since I put 40 Mbps

#

and I think the bottleneck was also incorrect

#

It's not R

dire valve
#

I thought you were saying the answer is 40 Mbps

frozen drum
#

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

uncut cape
#

going for my network+ soon, any tips for studying?

crystal current
# uncut cape going for my network+ soon, any tips for studying?

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

uncut cape
#

That's who I'm watching rn

dawn gazelle
#

Hi, I have question about neural network

#

is it the right place to ask it?

worldly hinge
tacit jolt
umbral steeple
#

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;

  1. How many subnets do you have?
  2. How many host IPs per subnet?
#

Please ping me when you reply, thanks in advance.

zealous flint
#

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

umbral steeple
zealous flint
#

I believe there should be 4094 usable hosts

umbral steeple
zealous flint
#

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)

obsidian cosmos
#

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?

frozen drum
granite nest
#

Hey everyone, I have an off topic question where do I ask it?

bright meteor
frigid vault
#

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.

round parrot
#

anyone familiar with the bind_layers and split_layers of scapy?

sturdy veldt
#

Hello!
anyone can help me with CI/CD deployment?

crystal current
calm mango
#

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)

GitHub

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.

crystal current
umbral steeple
#

Does anyone know how to get a subnet mask from an IP address?
192.168.24.210 is the IP

crystal current
crystal current
umbral steeple
#

I need to look at the class and determine the subnet from there

alpine cave
#

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❣️

queen magnet
#

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?

crystal current
queen magnet
#

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

ember ledge
#

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

covert topaz
#

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

queen magnet
# ember ledge u need google password

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

queen magnet
#

my bot working very good now. thanks again.

umbral steeple
feral grail
split moss
#

Hi guys, I want to simulate poisonous ARP attack, it's possible to make this in python ?

night cosmos
#

@split moss probably not

split moss
#

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

night cosmos
#

@split moss look into Kali Linux for network VM

#

It should have arp tools built in which might useable with python

split moss
#

Ok thanks you

feral grail
coarse vigil
#

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?

lapis scroll
#

How do I decode the output from StreamReader.read() and print as plain text?

coarse summit
lapis scroll
#

thank you very much

coarse summit
lapis scroll
#

Yes

#

tried decoding by saving the chunks of read() concatenated in a byte var but same error 😢

coarse summit
#

"which is the encoding of the stream?": Yes

storm orchid
lapis scroll
#

Thanks! Yes utf-8. "invalid start byte" is the error. I have moved to another task, I will get back to you

storm orchid
# lapis scroll Thanks! Yes utf-8. "invalid start byte" is the error. I have moved to another ta...

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.

runic crane
#

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

night fossil
#

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

frozen drum
#

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

dense wadi
#

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.

vapid mulch
#

print("test")

thin palm
#

How can i translate long texts

dire valve
#

I think B is source port: P4, dest port: P1

#

What do you think about this?

ember ledge
#

I think there are 4 different source and destination ports as shown in the graph - A, B, C and D

wispy kiln
#

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?

wispy kiln
#

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

ember ledge
#

why i get this error

#

and it shows nothing

#

nvm fixed

coarse summit
#

You can scroll horizontally

frozen drum
#

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.

split moss
#

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 ?

dense wadi
# frozen drum there's not really a perfect way to split proxies for every use case, because in...

@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.

frozen drum
#

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

dense wadi
#

@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.

azure current
#

for some reason my ethernet is 1/10th the speed of my wifi

#

i’m using cat 6 cables, but i get abysmal speeds

ember ledge
#

maybe broken

covert topaz
#

yeah somethings wrong

lilac orbit
#

my subnet just died and took out my entire network with it

#

i have like 30 meetings today to lol

frigid pier
#

Can i change the ip address of my router?how?

coarse summit
#

if it isn't static, unplug the router and wait 5 minutes and plug it in again

#

should've changed

umbral steeple
#

"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?

calm spoke
#

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

ember ledge
#

Ditch flask and build ur own from ground upp

alpine furnace
#

Can anyone do paid work for me? dms

errant bayBOT
#

9. Do not offer or ask for paid work of any kind.

ember ledge
#

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 :))”

toxic mural
#

this is not what the "networking" channel is for

#

its for computer networking, not building the 500th AI startup

next sluice
split moss
#

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 ?

zealous flint
#

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

fading seal
#

Hey anyone interested in hackathon based on web3 can dm me

coarse summit
ember ledge
#

Only interactions, you can't get other events, and doesn't need to be verified.

zealous flint
#

Yup I think interactions over HTTP is useful for relatively small bots that you can host as a serverless function

steep aspen
#

how many connection pools for caching is optimal before discarding the least recently used pool?

nimble canopy
#

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

crystal current
heady breach
#

Unless you had some other constraints like not being able to install and start a service

#

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)
sweet egret
#

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.

coarse summit
#

huh?

split moss
ember ledge
wind radish
#

@ember ledge wdym "location" ? like country?

coarse summit
#

but not possible still

wind radish
#

bruh someone want wallhack for minecraft

vestal fjord
coarse summit
#

not other player positions

#

you simply can't get other player position

#

im afaik the server sends the player position packets

pastel quarry
#

i need help

#

how to open port 443 in firewall of freebsd?

pulsar ore
#

be it ufw or firewall

#

or the GUI

#

try iptables

frigid vault
#

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.

prisma cobalt
#

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.

inland rampart
rancid ferry
#

hi

wind radish
#

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

rancid ferry
#

hii

frigid vault
#

Ok then.

cunning garden
regal fractal
#

Hello

#

I was wondering if there is an event we all can meet and network?

main sail
inland rampart
coarse summit
#

lol

queen iron
#

anyone here uses tailscale ?

#

wait

#

this is OT

twin drift
#

Is it possible to add jammer to packet tracer?

split moss
#

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 ?

frigid vault
#

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 ()

cobalt yarrow
#

hola

#

could one of ye guys help me with this ?

placid tree
#

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?

ionic vapor
pallid geyser
#

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

steady horizon
ionic vapor
# steady horizon When do entities on the same network, connected by a router, get another entity'...

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

polar scarab
#

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

crystal current
polar scarab
#

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

dull axle
#

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)

wind radish
#

yes of course

dull axle
#

damn i know it XD

edgy pelican
#

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?

coarse summit
jade sentinel
#

i'm new to sockets. Does anyone know if it's possible to connect to a remote linux server using sockets ?

coarse summit
#

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

jade sentinel
wind radish
#

@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.

jade sentinel
#

so can I use socket to connect to a remote ip address?

#

and get directory information from it

coarse summit
#

Check the ftp protocol and how does it work in order to connect

jade sentinel
coarse summit
#

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

normal quail
#

Hello

#

Do here have connection about cyber security?

coarse summit
#

<@&831776746206265384>

short hornet
#

!warn 1101225330938748971 this server isn't an ad board, please refrain from advertising.

errant bayBOT
#

:incoming_envelope: :ok_hand: applied warning to @wide viper.

ember ledge
#

How do i use websocket in python to get cloud variables in turbowarp (Scratch tool)?

crystal current
lyric whale
#

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!

normal quail
crystal current
wind radish
#

I would answer SOA as well

coarse summit
hushed frigate
#

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?

coarse summit
hushed frigate
#

i see. I can do that from command line I guess.

coarse summit
hushed frigate
#

nope. 🙂
googeing it right now

#

but if you can help me out that would be awsome too

coarse summit
hushed frigate
#

yes

coarse summit
#

is the machine in your home or is it outside your lan

hushed frigate
#

nope, we are in the same lan

#

so it is not outside

hushed frigate
coarse summit
#

execute the command ufw

hushed frigate
coarse summit
#

which distro are you using?

hushed frigate
#

Well, I am not sure what is on the device.
how can I check that?

coarse summit
#

lsb_release -d

hushed frigate
coarse summit
#

ffs

#

how are you connecting to it?=

hushed frigate
#

via ssh

coarse summit
#

when you log in

hushed frigate
#

from pycharm

coarse summit
#

a banner should appear with some info

hushed frigate
#

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.

hushed frigate
toxic vault
#

Anyone experienced with websockets?

coarse summit
hushed frigate
balmy axle
#

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.

crystal current
balmy axle
#

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...

sage bone
#

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

graceful belfry
#

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.

frozen wyvern
#

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

next trail
#

print('Im Stupid')