#networks

1 messages · Page 3 of 1

compact solar
#

Thanks though!

zealous flint
#

Np

fickle hawk
#

could someone show me the best way to begin studying networking, some roadmap or something

compact solar
#

It's best you do your own research, but I would begin with getting a study guide for a cert if you don't want to pursue some traditional training

fickle hawk
#

ok ty

drifting prism
#

Hey

#

So I have a server code, when I put two sendall back to back, the two messages merge, how to fix?

tropic island
#

Heelooo

#

question*

fossil wing
#

Can anyone here help me with python web scraping with getting when a new episode comes out for a show. I've done quite a bit already but I need a bit more help with getting to notify the user when the episode actually comes out.

sage swan
#

yo
help
my wifi subscription had ended and i think my wifi admin just changed the dns
cuz it says dns not found
is there a way i can bypass that

zealous flint
#

But "DNS not found" is not always because your internet had been cut off

#

Could just be a configuration issue but we'd need to know more details to be able to troubleshoot that

spice zodiac
#

dont give up young padalin

solid sandal
#

Hey guys I'm setting up a python http.server at my home network but can't get it to work past localhost. I set my local machines ip address but no device can find it. Any tips people might know here?

zealous flint
#

I’ve had the same issue

vast spire
#

Need some assistance with a assignment in python can any one pm me?

twin flame
#

can anyone help determine the internet provider for a given IP i have
i also have something like this...consmr.mail.ir2.yahoo.com
im trying to report someone

ember ledge
ember ledge
errant bayBOT
#

8. Do not help with ongoing exams. When helping with homework, help people learn how to do the assignment without doing it for them.

ember ledge
#

Keep that in mind though 👆

ember ledge
cinder isle
#

Hello everyone !!!
How can I check who is connected to my server ?

#

in socket

zealous flint
#

localhost or 127.0.0.1 only lets you connect

upper bramble
#

anyone have any examples on how I can point netmiko to a CSV with a list of commands to run?

 output4 = net_connect.send_command('show run')
prisma cobalt
ember ledge
#

Isn't there a property in the socket object to check all connections?

#

!d socket.socket

errant bayBOT
#

class socket.socket(family=AF_INET, type=SOCK_STREAM, proto=0, fileno=None)```
Create a new socket using the given address family, socket type and protocol number. The address family should be [`AF_INET`](https://docs.python.org/3/library/socket.html#socket.AF_INET "socket.AF_INET") (the default), [`AF_INET6`](https://docs.python.org/3/library/socket.html#socket.AF_INET6 "socket.AF_INET6"), [`AF_UNIX`](https://docs.python.org/3/library/socket.html#socket.AF_UNIX "socket.AF_UNIX"), [`AF_CAN`](https://docs.python.org/3/library/socket.html#socket.AF_CAN "socket.AF_CAN"), [`AF_PACKET`](https://docs.python.org/3/library/socket.html#socket.AF_PACKET "socket.AF_PACKET"), or [`AF_RDS`](https://docs.python.org/3/library/socket.html#socket.AF_RDS "socket.AF_RDS"). The socket type should be [`SOCK_STREAM`](https://docs.python.org/3/library/socket.html#socket.SOCK_STREAM "socket.SOCK_STREAM") (the default), [`SOCK_DGRAM`](https://docs.python.org/3/library/socket.html#socket.SOCK_DGRAM "socket.SOCK_DGRAM"), [`SOCK_RAW`](https://docs.python.org/3/library/socket.html#socket.SOCK_RAW "socket.SOCK_RAW") or perhaps one of the other `SOCK_` constants. The protocol number is usually zero and may be omitted or in the case where the address family is [`AF_CAN`](https://docs.python.org/3/library/socket.html#socket.AF_CAN "socket.AF_CAN") the protocol should be one of `CAN_RAW`, [`CAN_BCM`](https://docs.python.org/3/library/socket.html#socket.CAN_BCM "socket.CAN_BCM"), [`CAN_ISOTP`](https://docs.python.org/3/library/socket.html#socket.CAN_ISOTP "socket.CAN_ISOTP") or [`CAN_J1939`](https://docs.python.org/3/library/socket.html#socket.CAN_J1939 "socket.CAN_J1939").
prisma cobalt
#

i dont think so

ember ledge
#

Yeah you're right there isn't

cinder isle
prisma cobalt
#

wdym?

ember ledge
#

There is an event you can listen to when a socket connection gets disconnected. Handle it accordingly

ember ledge
#

Basically, im trying to get data from an api on a website, using js fetch in the console i am able to get it to work but i am unable to run the same request in python using requests or using curl. I am getting an error regarding cloudflare. Im just wondering why a request through the console works using js while the exact same request does not work in python

#

any help would be appreciated

#

cookies = {
    '__ddg1_': '-----',
    '__ddgid_': '-----',
    'cf_clearance': '----0',
    '__cf_bm': '-------1663881600-0-ASi4VvOTU90+7XgTNz0NALar1yNpdeZli9zUbesjpmdknzcH8uPE4nr7nKajRvuPGWEGP1mnupxIQjZgQ9x8MzTmb0E9ALA1vqyySj7OQ31tgbfrDAEMDEE81N5/RgBomw==',
    'XSRF-TOKEN': '------%3D',
    'adurite_session': '------%3D',
    'A2------29-------uWSLJm': '------%3D%3D',
}

headers = {
    'authority': 'adurite.com',
    'accept': 'application/json, text/javascript, */*; q=0.01',
    'accept-language': 'en-US,en;q=0.6',
    'cache-control': 'no-cache',
    'origin': 'https://adurite.com',
    'pragma': 'no-cache',
    'referer': 'https://adurite.com/',
    'sec-fetch-dest': 'empty',
    'sec-fetch-mode': 'cors',
    'sec-fetch-site': 'same-origin',
    'sec-gpc': '1',
    'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36',
    'x-csrf-token': 'VO08----------zjtAYO93a9YQsJJ',
    'x-requested-with': 'XMLHttpRequest',
}

response = requests.post('https://adurite.com/api/get-items-onsite', cookies=cookies, headers=headers)```
#

i removed a lot of the cookie stuff

#

using -

#

the same request works in js fetch("https://adurite.com/api/get-items-onsite", { "headers": { "accept": "application/json, text/javascript, */*; q=0.01", "accept-language": "en-US,en;q=0.6", "authority": "adurite.com", "cache-control": "no-cache", "pragma": "no-cache", "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "same-origin", "sec-gpc": "1", "x-csrf-token": "VO08jQ-----tAYO93a9YQsJJ", "x-requested-with": "XMLHttpRequest" }, "referrer": "https://adurite.com/", "referrerPolicy": "strict-origin-when-cross-origin", "body": null, "method": "POST", "mode": "cors", "credentials": "include" });

ember ledge
#

does not work

#

Very vague. How about you give some output you've got during your own debug and research e.g. the status code you get etc.

ionic zinc
#

how to link gunicorn gunicorn -w 3 django_habr.wsgi:application --bind 0.0.0.0:8000 with nginx? nginx/default.conf

events {
working connections 1024;
accept_mutex on;
}```
jaunty wasp
#

how to make a http/3 protocol post request using python?

#

couldnt find one on google

errant dome
#

i've been messing about with sockets and learned about asyncio sockets recently. What approach would you take to set up a server with a flask website to receive dict data from a couple of clients every minute?

#

just need to be pointed in the direction of what i actually need to be learning. (it has to be non-blocking)

#

could use regular blocking sockets and run it in another thread, or i could learn this select stuff with non-blocking sockets, or i could rewrite for asyncio sockets or whatever is suggested froggy_chill

jaunty wasp
#

how to make a http/3 protocol post request using python?
couldnt find one on google

errant dome
#

yeah, i managed to play about and make a chat/messenger application with it that could handle multiple clients, curious whether that's the best approach

#

gonna require me rewriting everything to switch to asyncio steams on my apps

#

7739monkathink might just pull the trigger on it, it'll work fine

ember ledge
#

why do my aws subnets have both allow and deny all incoming traffic by default?

#

does the rule number do something I dont get it

zealous flint
#

Something something security probably

ember ledge
#

ok cool

#

thank you

ember ledge
#

okay so I can't delete the base * rule and I think rule 100 takes precedent over * so I think currently the subnet does accept incoming traffic from all addresses?

ember ledge
#

holy crap i think i figured it out it's a security group inbound rule god this is so many rule blocking everything but one ip

ember ledge
#

no im good thanks it was unrelated about security groups problem 👍

remote valley
#

helo! i've been toying with web sockets for sometime, trying to get it working with multiple clients. However, when i connect the second client to the server, the first client gets disconnected. So what solution i got from this site totally came up with on my own was like this:

  • Second client sends a connection request to the server (First client is connected rn), so the First client lets it connect and breaks its own connection.
  • Then, the server generates a pool(array) of connected clients(their request.origin).
  • When server receives the message, it sends it to all the members in the pool (disconnects from the Seconds client)
  • The First client connects, sends message and so on...
    But this approach seems really inefficient because I were to disconnect and connect again and again, I'd have just used some HTTP connections.
    So i wanted to ask if there was a better solution with low wait times without having to connect to the server again and again.
halcyon hull
#
import threading
import time
import requests
import sys
from   queue import Queue

threads = 500
Que = Queue()
domain = None

def Scan_sub_domain():

    while not Que.empty():
        ssn = Que.get()
        Targ_url = f'http://{ssn}.{domain}'
        try:
            requests.get(Targ_url)
            print(f'> {Targ_url}')
        except requests.ConnectionError:
            pass


def Main():
    dom_list = open('Word_Lists/subDm.txt', 'r').read().split('\n')

    for sub_domain in dom_list:
        Que.put(sub_domain)

    ts = []
    for i in range(0,threads):
        try:
            t = threading.Thread(target=Scan_sub_domain)
            ts.append(t)
            t.start()
        except Exception as e:
            print(e)
        for t in ts:
            t.join()

if __name__=='__main__':
    domain = 'bing.com'
    Main() 

I've added multi threading in my subdomain scanner.
Still it's slow.
Any solution to make it fast af?
..

quasi wraith
#

how can we reduce the rate of false positives alert issued by NIDS? Like any solution that one can work on

peak igloo
# remote valley helo! i've been toying with web sockets for sometime, trying to get it working w...

https://youtu.be/MCs5OvhV9S4
I haven't been able to implement it for myself but this talk at pycon seems to be covering what you're looking for

"Speaker: David Beazley

There are currently three popular approaches to Python concurrency: threads, event loops, and coroutines. Each is shrouded by various degrees of mystery and peril. In this talk, all three approaches will be deconstructed and explained in a epic ground-up live coding battle.

Slides can be found at: https://speakerdeck.c...

▶ Play video
remote valley
peak igloo
#

Yeah fair enough, that is usually how multiple connections are handled, just maintaining a connection pool as far I know

prisma cobalt
remote valley
#

lol looks like he's an old school legend or smthn

remote valley
#

they do

#

but they don't send the data received through one connection to all the other

#

it doesnt

#

i thought it did

#

yea

#

seems like i declared the connection variable int he global scope so there was only one connection even when 2 clients tried to connect

#

The server, even though accepted the request when the disconnected client tried to send a message, still didn't send him any data while he was disconnected

#

yea, thanks for the reply

sturdy island
#

what reasons are there for not being able to ping your own public ip address?

#

or, well, noone at all being able to ping your public ip?

dusky crescent
hoary geyser
#

Hello there, so I was trying to deploy this very simple python socket server to AWS ec2. But it seems I can't connect to my server, any ideas why this could be happening or what should I do to fix it, any help? On the right, my server is running on an AWS EC2 instance; on the left, I am running a simple client script to connect to the server.
Thanks!

quasi wraith
#

If I want to make a host-based network IDS, and detect the any anomaly or intrusion or any attack on the host pc, I can detect them through the packets right? So like how can we differentiate malicious packets and normal harmless packets?

jaunty wasp
#

hi, i am currently making a web cloner from python, requests and bs4
currently trying to clone Instagram page for testing,
it fetches the html of page, searches for all css and js files linked, download them and save to the path as written in href.
But my script clones the preplash screen of the page, not the page after preplash/loading.
how can i fetch the html after the preplash screen?

jaunty wasp
#

ok so now i used selenium for that purpose, and somehow successfull in getting the actual html + css + js code of the webpage

#

but when i host the webpage on localhost, there is a weird infinte reload automatically

#

idk whats the issue

zealous flint
#

By default it blocks all incoming traffic I believe

hoary geyser
keen gyro
#

You need to edit the security groups of your ec2 instance

#

And allow incoming traffic

teal furnace
#

Hey I got a question about smtp

#

Currently I can get an email client as '192.168.0.11' and can send emails via .py scripts just fine, but how do I create a 'username@192.168.0.11' for sending emails normally?

#

If someone could help with this, that would be great

fair plinth
#

Hi all,
I'm trying to write a python script to extract connected clients from a dell n2000 series switch, no luck at this stage... I use to use switch miner in the past for Cisco extraction to detect the phones connected to what port of the switch but im unable to achieve this with dell. Has anyone tried to get an export of all connected devices from a dell switch?

finite dock
#

anyone use pyzabbix? Cant seem to wrap my head around its usage, need to get device by IP and then a 7day history in values

fair plinth
#

@finite dock yep just got to script it to extract it

finite dock
#

i like easysnmp.. clean and easy

fair plinth
#

So I’ve extracted arp and Mac table now MAC address don’t marry up…. @finite dock do you have any easysnmp samples?

finite dock
#

ill get you my most used couple of lines here in a bit.

#

also.. I have read before that cisco devices return macs that need to be formatted bc they return in binary.. let me know if you have that problem, ill find the post I read.. i got it saved somewhere

finite dock
#
#Useful for calls that are hidden behind multiple results, or in a table. 
genEquipMngSwOperationOperation = [item.value for item in bh_session.bulkwalk('.1.3.6.1.4.1.2281.10.4.1.21.1.2') if item.value != 'None']
genEquipMngSwOperationOperation = genEquipMngSwOperationOperation[0] #<-[0-XX] for result wanted, is just a list.
## bh_session is my connector to easysnmp via,

def create_session_bh(NETWORK, host):
#host = IP
    if NETWORK == 'NetworkName':
        bh_session = Session(hostname=host, community='PWString', version=2, timeout=5, retries=1)
        return bh_session

#So in general I just import easysnmp as, 
from easysnmp import Session

hope that helps.

ember ledge
#

Hello, I need help with request status code 429 in aws(amazon web services) / cloudfront
I tried to print the headers, and if randomize sleep it's will end up with block, I want to know the specific amount of how long time I have to sleep..
Output:

{'Server': 'CloudFront', 'Date': 'Tue, 27 Sep 2022 13:48:12 GMT', 'Content-Length': '188', 'Connection': 'keep-alive', 'Content-Type': 'text/plain', 'X-Cache': 'Error from cloudfront', 'Via': '1.1 397f210a9eb9ec34ba3f1f814bc1a7a2.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'AMS1-P2', 'X-Amz-Cf-Id': '06LZjQ7t9v6RbIkiAjlaEoY1c2klERyzQWnxAuPFe1OWF38ria5pYA=='}

--ping me when you replay.

ember ledge
#

a good language to learn for networking other then python

#

i wanna learn new language

ember ledge
#

c boring

#

C networking good

zealous flint
ember ledge
umbral moss
#

Anyone got experience with wireshark?

twin flame
#

when u do a request.get or post
u can put your cookies in the headers so it can access something only you can right

crystal current
umbral moss
#

hey okay so i need help w setting up cisco’ packet tracer and get familiar with it but i’m stuck at understanding most of it

umbral moss
crystal current
loud dove
umbral moss
crystal current
faint hemlock
winter yacht
#

ETH

#

anyone is here from ETHEREUM community

faint river
#

sup buds

#

what if router is offline during routing

#

will it just keep routing endlessly?

zealous flint
#

that's why it's important to set up redundant links

faint river
#

Once it has gathered all active router ips?

zealous flint
#

The router?

faint river
#

Yeah the sender's

zealous flint
#

The senders don't

#

Unless we're talking about like STP or something

#

But for the sake of simplicity let's assume a simple network without redundant links

#

The switches and hosts will just send packets to the router as if it's still online

#

But the router is offline so the packets just sort of... go into a "void", if that makes sense

faint river
#

I see that

#

But

#

How do they know it's offline?

zealous flint
#

They don't get a response back for their packets

faint river
#

Ah got it

zealous flint
#

That doesn't always mean it's offline, so they dont know it's offline

#

You'll just get a generic timed out error or some other error clientside

#

It's up to you as the user to figure out if it's offline or not

faint river
#

So the packet just hops to the next network endlessly

zealous flint
#

The packet just dies, it doesn't go anywhere

#

The router is offline, so it can't route it to another network

faint river
#

Makes sense

#

Thank you for clarifying : )

zealous flint
#

No prob

bold harness
#

Is this channel for networks in sofware or for networking through people?

cunning garden
ember ledge
#

Can someone help me with networking mailing client

#

Traceback (most recent call last):
File "c:\Users\Admin\Documents\Python\Networking.py", line 16, in <module>
server.login('(my username im not gonna list it here)@gmail.com', password)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\smtplib.py", line 750, in login
raise last_exception
File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\smtplib.py", line 739, in login
(code, resp) = self.auth(
File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\smtplib.py", line 662, in auth
raise SMTPAuthenticationError(code, resp)
smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted. Learn more at\n5.7.8 d79-20020a621d52000000b0056012d934fasm1842802pfd.156 - gsmtp')

#

the username is right but idk if there is something wrong with the password's

cunning garden
ember ledge
cunning garden
#

no

ember ledge
#

so basically i have to put the app password into the password.txt file ?

cunning garden
#

I haven't used smtp with gmail, so I have never tried

ember ledge
#

the problem is

#

I watch a tutorial and they have something called "app password" in the signing into google section but i don't

ember ledge
ember ledge
#

Finally

#

it works

#

i forgot the "()" at msg = multipart & didn't use app password
@cunning garden ty for the app password one

karmic rain
#

i'm new to the stuff anyone can tell me why there are sooo many failed hops here??

#

i mean id get it was a 3 or 4 why 20 hops fail

finite siren
#

hello could i get some help with my python chat that im making

sullen temple
#

dose anyone know how I could host a dns server that all requests get told to go back to my self (local host), I want to forward them like a proxy, without needing to config the device, (host a dns server redirecting all data back to me, host a website that redirects all data over a tunnel and out to the open web) but main thing I need is how I can do it with a dns server to have every website go to me while I am the dns

(ping to reply)

zealous flint
#

I think adding a proxy will only make it harder because you've got 2 devices/applications to configure rather than just 1

sullen temple
#

no, like the dns server goes to me, and I then do the proxy

zealous flint
#

Right, but why not have your machine as the DNS without any proxies?

#

Just makes things much easier

sullen temple
#

I cant do that it is a phone

zealous flint
#

Well you'll still need something to host a DNS server

sullen temple
#

and I dont have access to the proxy configs, and I want to encrypt things on the dns server

sullen temple
#

that is what I am saying

zealous flint
#

So just set that other device as the DNS

#

There's no need to overcomplicate and slow things down with a middleman proxy

sullen temple
# zealous flint There's no need to overcomplicate and slow things down with a middleman proxy

but there is for me, I have been thinking bout this for a while, it is so I can heist data over a network, by hosting a rasberry pi that has (i forgot what it is called rn, but a hosted wifi, that goes over then the real network) then I use that to set the network dns, and using the dns I proxy over the network back to a computer at a diffrent location who decodes the data, and sends it out, a convoluted tunnel to stop the network from reading any data in the middel

zealous flint
#

..DNS poisoning?

sullen temple
#

god my spelling is bad today

zealous flint
#

Sounds kind of malicious, what's the point?

sullen temple
#

dms rq?

zealous flint
#

I guess you could set up a DNS upstream forwarding thing

#

But this is a strange usecase

sullen temple
#

yes, but long story short, I want to find a way to bypass the school blocking software, becuase they blocked fu**ing github and stackoverflow, ITS A STEM SCHOOL AND THEY BLOCK LEARNING TECHNOLOGY

zealous flint
#

so just use a VPN?

sullen temple
#

school device

#

cant do that

#

lol

zealous flint
#

hmm

sullen temple
#

see, this is why I am doing it

zealous flint
#

i have a feeling this has a very low chance of working

#

there are multiple points of failure

sullen temple
#

yes and no, Its the best way I could come up with

#

because I dont want to do any send images shi*

#

because that has file:// explitation

zealous flint
#

i don't think just using a different DNS server is going to allow you to bypass the content filter, is it? Because the end result is still the same

#

your outgoing request is still the same IP/domain

sullen temple
#

dns points every request to me, whitch is hosting a webserver who forwards all data to my home computer (encrypted with public/private keypare), on a kinda like a hotspot but as a midddle betwine the thing, and then at my home computer make the thing decrypt and send as a normal request and return back 3 times to the machine, bypassing all data lookup they could do

zealous flint
#

is this all in your home network?

sullen temple
#

the end part

#

the begening is a proxy thing

#

to my hoe

#

*home

zealous flint
#

So.. the DNS server that points to your webserver, is that on the school's network?

sullen temple
#

convoluted proxy

sullen temple
zealous flint
#

I see where you're coming from

sullen temple
zealous flint
#

But I think the issue is that content filters usually don't look at DNS requests

#

That's the reason why VPNs work

sullen temple
#

no, but they use a certificate to decode data and sniff for things

zealous flint
#

Right but the certificate is not the DNS's job, is it?

sullen temple
#

anything not on http or https is blocked

sullen temple
zealous flint
#

So.. you're trying to encapsulate your DNS request inside of a HTTP request?

sullen temple
#

also I would use either a host like (forgot rn the one all tech people advertise) or just use ngrok

sullen temple
# zealous flint So.. you're trying to encapsulate your DNS request inside of a HTTP request?

no,
request -> my network -> my dns -> my http server -> encryption -> add http (not https) headers -> school network -> proxy -> server -> decryption -> make request

backwards
request data -> encrytion -> send back as http response -> school -> my decrytor -> the device

the school never sees the device only my servers local ip (randomised macs) and goes to a proxy, like ngrok who dont leak ips

network layout
devices -> my middle server -> the school [-> a proxy ] -> a server

next marsh
sullen temple
next marsh
sullen temple
#

ikr

#

and as you can tell I like tech stuff so I am mad

next marsh
#

This is something to bring up to the technology staff of the school.

sullen temple
#

*the one girl who cant do anything, because of the district

#

I asked her what I could use as a text editor on the chromebooks, and they said that the district said you cant use it, so only google docs, goodluck programing a website using only javascript: bookmarklets, and not dev console, with not being able to save anywhere becuase google docs changes ' and " to special characters

next marsh
#

And this is the same school that has you in a class to learn these things?

sullen temple
sullen temple
#

also, this is the best school in my area for this kinda stuff, It is so dumb

next marsh
#

As justified at being angry as you may be, you cannot expect us to assist with a project is this breaking all of the protections on the school's equipment put there, seemingly, to prevent you from doing this. That, in a short summary, is a malicious act.

sullen temple
#

okay, I just dont want to have to use all my mobile data, because everyone just uses that in class, and its not free lol

#

I just cant come to understand my school

#

also I am fine if you remove the conversation, as it is about somthing you say is malicious, I am sorry for wasting your time

sullen temple
next marsh
sullen temple
# next marsh Sounds like they could use some insight and help in setting up their protections...

I know, but there is only one lady there for tech support, and she cant help, its all district things, my teacher is blocked from programs too, we were trying to do programing in python last year and they blocked the good websites like replit, so we could only use the shi**y ones that had adds everywhere, and didnt work half the time, no one learned anything and he requested 2 months ahead a time for it to be unblocked but they said it was not safe for kids, and was not going to be unblocked. these people are verry smart, also its still blocked over a year and a half later, with multiple requests, that each take like 2 weeks to send for the teachers to get a responce, I hope you can see why I am mad bro.

next marsh
finite siren
sullen temple
#

I understand, and I am sorry, once again if you wish to deleate the messages that is ok with me, I was not trying to be malicious and I have stoped discussing how I could do it, and just explained my reasons for fealing so, so thankyou for your help, I am sorry I seam malicious in any way

sullen temple
sullen temple
next marsh
sullen temple
ember ledge
#

Heey everyone, so far this has been the livliest discord server Ive ever been in. Recently I got interested in generic algorithms. Is there anyone in here who can help/guide me, or give tips please?

cold geyser
ember ledge
lyric fossil
#

Hi everyone
I want ask to how to know a fingerprint machine connected to the network by python

hexed raft
serene junco
#

Hey, Im doing a project about web scraping on a large scale. Anyone here has experience with using scrapy and python? Would appreciate some help or guidance
Im working as a jr python dev ✌️

last ore
# sullen temple I know, but there is only one lady there for tech support, and she cant help, it...

There are two possible options to abuse actually

  1. installing programs not requiring admin permissions. U could try get hands on Python(or whatever Lang u need) interpreter and some Notepad++ with syntax highlight for this as example
  2. getting USB with Live Linux like Ubuntu and just using it in Live more without installing. (Admin rights to install anything, IDE or other programming tools)
    (Second option can be treated as malicious though. It would be cool if u recieved permission)
    (Second option requires ability to use Linux)
last ore
#

Optionally forward proxy(like Squid) can be tried with DNS change as lightweight alternative, but Wireguard VPN is a more ultimate solution

frosty orchid
#

Does anyone know a good book to start learning about computer networks, routing, protocols etc?

sullen temple
frigid pagoda
#

I am currently working on a project that I establish a connection with a websocket, which I already successfully did, send data to the client (achieved) and lastly receive the binary messages which are send from the server to me. However the response I receive isnt the binary message I see in the browser(network)

#

This is the message I get.

steady horizon
#

Have you tried prefixing the string literal with r

#

I think the percent symbols are messing up with the send method

frigid pagoda
ember ledge
#

Hello

#

How can I open a socket using S.Connect and provide cookies/auth details.

#

for example if I were to do a normal XHR requests it'd be

#

(..., cookies={})

#

if anyone could help, would rlly appreciate it.

#

I just wanna open a socket whilst sending auth to the server basically.

lofty moat
#

beginner to networking i need a good tutor

#

anyone with proof

burnt quartz
#

networking is hell

zealous flint
#

I love understanding how things work on a low level

burnt quartz
zealous flint
#

Even when it doesn't

#

Troubleshooting has it's own joys

quasi wraith
#

Networking is fun as hell! It's interesting and it gets more and more interesting as you keep getting the in-depth knowledge about it

twin flame
#

what type of payload is that

#

cause its not json

ember ledge
prisma cobalt
#

in JSON format???

#

weird

twin flame
prisma cobalt
twin flame
#

oh thanks, why did I forget i could google that XD

primal gyro
#

Hello!, I'm trying to setup my own dns server using python: (code not mine)

import socket

from dns_generator import ClientHandler

# Global variables
IP = "192.168.1.XXX" #was 127.0.0.1 
PORT = 53


def main():
    sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    sock.bind((IP, PORT))
    print("DNS Listening on {0}:{1} ...".format(IP, PORT))
    while True:
        data, address = sock.recvfrom(650)
        client = ClientHandler(address, data, sock)
        client.run()


if __name__ == "__main__":
    main()

So I edited the firewall rules to allow inbound udp on port 53 and run the thing but it seems the script is not receiving any dns requests when I try to set the dns on my phone as 192.168.1.XXX? am I missing something?

zealous flint
primal gyro
ember ledge
#

can i ask about networkign not about python here ?

ember ledge
#

how to change ssid and secure my network ,??? all people on building using my wifi

primal gyro
#

It depends on the setup, it looks like totolink ex_200 is an extender of sorts so maybe ypu could still access 192.168.1.1 even if you're connected to totolink?

ember ledge
#

if i connect to toto
and i cant find my main router to setup pass and ssid

sullen temple
primal gyro
sullen temple
#

hummmmm

#

for some reason I just dont get anything, hosted on linux with root

#

only dig works with it

primal gyro
#

Haven't tried running this on linux yet so I'm not sure. Though from what i remember, opening up service ports on linux is much more straightforward

rapid fog
#

Does ARP use the OSI model for transmitting the MAC request? If so how does the data link layer work without knowing any MAC addresses?

#

Or does ARP use some other method that bypasses the OSI model?

steady horizon
#

I think it sends the question "who is x" to every entity in the local network and then the entity in the same network which identifies as x replies with its MAC address

ocean bay
prisma cobalt
#

ARP works between L2 and L3 (of OSI)

#

MAC -> L2

#

IP -> L3

prisma cobalt
#

example:
A: "who is 192.168.1.100"
B: "its not me so i wont respond"
C: "its not me so i wont respond"
D: "wait, thats me! Hello A, i am 192.168.1.100, my MAC address is AA:...:AA"

#

@rapid fog

prisma cobalt
#

what do you mean by L7 packet though?

cyan wing
#

odd format

ocean bay
#

i mean when I learnt about osi model, I heard that you gotta encapsulate data from L7 to L1, so there needs to be a data (or wtv the term is at different levels) that gets encapsulated at every stage, but thats not actually the case as we see with the arp protocl, you dont have any data you need to encapsulate from L4-L7 so you just encapsulate from L2/3 to L1

ocean bay
steady horizon
#

It's not that kind of a protocol

#

I think it's on the same layer as protocols such as IP

ocean bay
#

Its L2/3

zealous flint
grim quest
# ocean bay i mean when I learnt about osi model, I heard that you gotta encapsulate data fr...

Yes you encapsulate. Think of it this way ARP is how you get the next layers information so you can add that information to the layers pdu (frame in the case of L2. The computer has already done a DNS lookup and has the destination IP address and now needs to validate if it is on the same local network by checking against the subnet mask and destination IP or if on the same local network check the local ARP table for the destination MAC. If not broadcast with the destination MAC address of FF:FF:FF:FF:FF the question who has the address or if determined not on the local subnet who has the default gateway address and return its MAC so the L2 frame can be completed.

lusty field
#

The osi model breaks down pretty quickly after a certain point. It was originally created in 1980 to be fair. In reality the terms have basically become industry jargon that is equivalent to:
Layer 1: physical connections
Layer 2: Hardware address space (Vlans and mac addresses on ethernet - there are equivalents else where)
Layer 3: Logical address space and movement between spaces (IP addresses, and routing protocols for example)
Layer 4: Communication methods between Logical address endpoints (TCP, UDP, ICMP, etc.)
Layer 5: uhhhhhh
Layer 6: uhhhhhh
Layer 7: Anything inside of the communication that's interesting enough that we want to peel it apart and poke at it.

prisma cobalt
#

Layer 5: sockets
Layer 6: TLS/SSL

maiden drift
#

Hi guys,
Does anyone know how I could create an app blocker with python?-Not the one with editing hosts file.
Preferably with scanning which websites are currently open

twilit shore
#

hello, does anyone know how to compare desktop screen and image in opencv2? My solution do not work 😕

fast tusk
#

TLS/SSL are security protocols that sit at the transport layer.

#

TLS is what’s currently used and is the standard for website security over https.

fast tusk
# lusty field The osi model breaks down pretty quickly after a certain point. It was original...

Layer 1: Physical - NIC, Hub
Layer 2: Data Link - Switches, Mac Address
Layer 3: Internet - Routers, IP protocol
Layer 4: Transport - ICMP, UDP, TCP, TLS, SSL
Layer 5: Session - Sets up the session between client and server
Layer 6: Presentation - organizes the data in a human presentable/readable format.
Layer 7: Application - You can think of this as the application window on your computer.

#

Although at the end of the day the OSI model is bullshit.

#

Either a computer accepts a communication or it doesn’t.

#

It doesn’t care about what layer something is at since the model is just for human understanding.

prisma cobalt
#

heres a good model

#

TLS operates across layers @fast tusk

fast tusk
prisma cobalt
#

it's hard to constrict it to a specific layer, the OSI model isnt really that flexible

fast tusk
#

Mhm.

#

Hence why I say its bullshit.

#

It’s just for understanding by human standards.

lusty field
prisma cobalt
# fast tusk Hence why I say its bullshit.

i partially disagree, it has its uses (mainly for visualization) but it also can be improved. the human understanding was the purpose it was created (and to segregate specialists etc) and i think its pretty good at allowing that

lusty field
#

It's become more useful as a description set than engineering principles

fast tusk
prisma cobalt
fast tusk
#

It’s another reason why the most secure computer in the world is one not connected to the internet.

lusty field
#

@prisma cobalt I'm a network engineer first, and came to programming through it. So I'm quite familiar with industry realities around data networks.

prisma cobalt
fast tusk
#

Just curious.

prisma cobalt
fast tusk
lusty field
#

@fast tusk Right now I work for a company called MYR group, which is a large holding company for electrical construction subsidiaries, but in a past life I worked at various Vars and MSPs, and have built some very large data networks.

prisma cobalt
fast tusk
# prisma cobalt what does this have to do with the OSI model???

We are talking about the communication of devices over the OSI model and that simply can happen if it’s not connected to the internet. If it stays internal with no outside connection then it doesn’t matter what’s at layer 3 the computer simply wouldn’t recognize it without a connection.

#

It would only have a media access control and that’s it.

#

Maybe an apipa depending on the device.

lusty field
#

Are you ever truly disconnected with RFC 1149? Who knows when they might extend it and teach the pigeons how to plug USB drives in.

prisma cobalt
#

lmao

fast tusk
#

Cats are more effective.

lusty field
#

Sounds proprietary.

#

My whole point of the original post was that people really shouldn't be too hung up on what the intent of the OSI model was for. We have so many exceptions to the so-called rules at this point that all that's actually important is how the industry uses the jargon

fast tusk
#

Apipa is a windows protocol that give a computer a private IP address in the 169.254.0.0 range I think.

fast tusk
#

Again why I say it’s bullshit.

prisma cobalt
#

agree to disagree 😄

lusty field
#

I mean it has a measure of utility. When somebody says this happens a layer 3 and not a layer 2

#

You've got a ballpark idea of what kind of technology you're using.

#

But it's just not a design philosophy. It's a descriptor set.

fast tusk
#

Still just makes it more easily understandable for humans.

#

Which is good.

lusty field
#

But all in all it's given far too much attention in entry-level classes

fast tusk
#

In order to learn anything you have to baseline it first.

lusty field
#

Yeah I'm aware. My field in particular is a little bit frustrating, in that there are definitely people who go to college with the hopes of jumping directly into network focused stuff... And the typical academic flow just does not prepare them for that

#

But I need to be careful not to stand on that soap box too long

fast tusk
#

I think it’s a bad first step.

#

Unless you have a scholarship.

prisma cobalt
#

curious

lusty field
#

Me either. But I don't know if that I agree with that either.

fast tusk
#

I’ve never gone to college but I have enough hours for an associates in cyber security.

#

I believe college can be useful and it’s different for everyone.

lusty field
#

@prisma cobalt I think you deleted your comment, but it was a valid question and yes it does limit your options.

prisma cobalt
prisma cobalt
lusty field
#

Ahh

fast tusk
#

Currently I’m employed in a place that will make college free.

#

Should I choose to take it.

prisma cobalt
fast tusk
#

I didn’t get where I am through luck.

#

I just don’t see the point in going to college and ending up with tons of debt to possibly not get hired.

#

That sounds more risky.

#

And it works for some people it really does.

prisma cobalt
#

i think this is another case of "agree to disagree" :/

fast tusk
#

Very well then.

#

Eventually I will go to college but the only difference is it will be free and I already will have 3 years job experience.

#

Having the degree and extra years of work experience will make it far more likely you get hired.

prisma cobalt
#
  • more job prospects after leaving college
#

and knowledge that expands where they can go

fast tusk
#

Rn I’ve got 2 years job experience and hours equivalent to an associates degree.

prisma cobalt
#

okay

fast tusk
#

And I believe you would be right in most cases.

#

Also those graduates would start off in an entry level position in the field whereas I’ve already built a reputation and have the experience to back it up.

#

So I wouldn’t be hired entry level.

#

Of course there is internships.

#

So that could help a little bit for sure.

#

It also depends on the job you were working before.

fast tusk
lusty field
#

you know, something I took for granted for a long time was that programmers understood network level communication and conventions because they were programmers. How sweet and innocent I was.

fast tusk
#

I know I still have a lot to learn when it comes to networks and how specific protocols work on a granular level.

lusty field
#

here's the thing, a lot of the time you can leverage libraries to take care of the pesky bits

fast tusk
#

Hmmm.

#

That’s pretty cool.

lusty field
#

but then there are times where... you're building a feature that isn't addressed by a library. Multicast is a good example of this coming up often

#

it's important enough to deal with from time to time, but not so frequent that there is a robust set of tools around it in some situations

fast tusk
#

That make sense.

#

But with IPv6 multicast is it’s main thing.

lusty field
#

ehhhhhh

fast tusk
#

So wouldn’t that change in the future?

lusty field
#

not precisely no

#

but even then, if it were true

#

you'd have to find more than a handful of developers who were comfortable writing to ipv6 in the first place.

fast tusk
lusty field
#

I had to walk a vendor through the RFC and show him where his TTL was mucking things up with v6

fast tusk
#

Did he set the TTL too low?

#

Or was it something else?

#

Maybe incorrect formatting?

lusty field
#

the details are escaping me, but there was a corner case where you had to be very particular about the TTL

#

that was years ago though

#

anyone who takes an interest in network level stuff should be at least aware of the RFCs

#

there is a wealth of information in them

fast tusk
#

I know what they are and yes there is a lot of information in them.

#

Like a metric ton.

#

Even though I don’t build networks I still read a few from time to time to understand a protocol as in detail as possible.

#

I’m still in training rn but it’s on the job training.

#

I’m in the Air Force and I am currently working in the NSA.

#

It quite honestly is a lot of fun since I learn new things everyday.

#

I plan to transfer over to the civilian sector after my military contract is over and working only for the NSA instead of as a military position.

#

@lusty field

ember ledge
#

hey
i have 3 devices on network
192.168.1.2
192.168.1.3
192.168.1.4
3 and 4 can connect to each other
2 and 4 can connect to each other
2 and 3 can not connect to each other
via RDP or file sharing ... where it is the problem ?

ember ledge
#

Request timed out.

#

via arp -a from 2
i can see 3

zealous flint
ember ledge
#

it is little complicated

zealous flint
# ember ledge

Hmmm. Is there anything going on with the router? Like do you have VLANs set up or anything?

ember ledge
#

no no

#

everything was workking okay

#

from yesterday problem started

zealous flint
#

Anything changed since then?

#

If so, that could help figure out the problem

ember ledge
#

no things changed

#

that why im confuised

#

even i disabled firewall

fast tusk
# ember ledge

I’m not an expert on this but is .1 the only IP address that router has configured?

ember ledge
#

what ?

zealous flint
#

I'm pretty sure each port on a router is a different network and has to have a different IP

ember ledge
#

1.1 is router only

#

default getway

zealous flint
#

Yeah but which interface on the router?

ember ledge
#

what do u mean by interface

zealous flint
#

And each "line" is a different network

ember ledge
#

to access netwrork admin panel is 192.168.1.1
and getway of ipv4 of all devices is 192.168.1.1

zealous flint
#

that might make sense

#

The line connecting router and 4 probably has the .1 interface

#

the line connecting router to 3 might not

ember ledge
#

i didnt get u

#

but all devices have the same configruations

#

2 ; 3 ; 4

zealous flint
ember ledge
#

device 2

#

lemme re say again

zealous flint
#

I think I get the issue

#

I'm not sure how you can ping from 2 and 4 because each device needs to have a different default gateway

#

unless some sort of bridging is going on

ember ledge
#

2 ping 3 timeout
2 ping 4 ok

3 ping 2 timeout
3 ping 4 ok

4 ping 2 ok
4 ping 3 ok

zealous flint
#

hmmm

ember ledge
zealous flint
#

you're sure the device in the middle is a router?

ember ledge
#

on the same sittings

zealous flint
ember ledge
zealous flint
#

or a layer 3 switch?

ember ledge
#

totolink is extander

zealous flint
#

2 is directly wired to the router right?

ember ledge
#

no

#

2 connecto to extander

#

and extander connect to router

zealous flint
#

What is the "extander"?

zealous flint
#

Ah, can we assume it's a switch for logistics reasons?

ember ledge
#

no

#

2 work with 4

#

4 work with 2

#

4 work with 3

#

3 work with 4

#

2 dont work with 3

#

3 dont work with 2

#

3 work with 2 yesterday

#

2 work with 3 yesterday

#

clear ?

zealous flint
#

I understand that part

#

I'm just speculating reasons for why

#

It's odd because it doesn't make sense how 2 can't connect to 3 but 4 can

#

What's the make and model of the router?

ember ledge
ember ledge
#

but trust me no realtion to router module , i said they was working for two years

zealous flint
#

Usually when something works but doesn't work a while later, it's usually an update of some kind

ember ledge
#

okay i give up

#

any idea how to solve the issue ?

#

if there was an update for frimware that should broke the connection between 2 and 4 too, not 3 only

#

arp -a can see, ping not ping (timeout) lol

zealous flint
#

maybe it's somehow altering only connection from 3 and 2?

ember ledge
#

like what ,?

zealous flint
#

what is the IP of the extender? Can you ping it from 3?

ember ledge
#

extander dotn have ip

zealous flint
#

MAC?

#

If it only operates on layer 2

ember ledge
#

i dont know honstly

zealous flint
#

First step would be to figure that out then

#

See if the extender has an admin portal or similar and how you access it

ember ledge
#

yup

#

to access to it i should change the defult getway to 192.168.0.254

#

then get access to 192.168.0.254 control panel

storm radish
#

in an online multiplayer game, i need to send a tuple(ints), a string, and an int to the server each execution, what's the best way to do it in terms of server network load? make a list, serialize it and send it? send 3 separate messages? 4 messages?

ember ledge
#

Hello I have a list of multiple email addresses with custom domains (exemple: name@organisation.com).
Some emails are valid others aren't.
How can I programmatically test the smtp response of these emails with python?

prisma cobalt
#

its better to send it all at once if the data is related

manic fractal
#

Asked this in a help channel about 4 times and never got an answer so I will ask here...
Here's a link to my message because I'm lazy and don't want to find it again (had the link pre-copied to my keyboard)
#help-popcorn message

ashen portal
#

What is an ip address? I seem many different things and they are confusing me. What is ipv4 and ipv6? What are the 6 classes of adresses? What is a local and public adress and what is a router, do i need it to send data to, say, my friends address?

zealous flint
#

Private IP is similar to where you are in your house, e.g: your bedroom, the master bedroom, the kitchen, etc

#

Your private IP doesn't mean anything without a public IP

#

If someone asked where you lived, and you told them "in my bedroom", it wouldn't help

#

Same deal with saying my IP is 192.168.1.2

ashen portal
#

Ty

#

!

unborn patrol
open kelp
# manic fractal Asked this in a help channel about 4 times and never got an answer so I will ask...

.sendall ensures that the message you want is sent along the connection ; this is different from .send which may only partially send the data. It does not send the data along multiple connections

a concern with use of raw TCP sockets is that it is an interface for sending/receiving a stream of bytes. When you run .recv on socket you may receive the raw bytes from one object, multiple objects or part of an object.

You have a couple options if you want to pull out proper objects on the receiving side

  • only send objects of a fixed number of bytes, e.g. ints
  • prefix every send with a header (e.g. a 4 byte header) saying how many bytes the following object/string is. Decode that many bytes, then find the next 4 byte header, etc...
  • use pickle.dump, pickle.load to dump load bytes on to and from the socket byte stream
  • instead of sockets, use something like multiprocessing.connection Connection which will allow you to send and receive objects and manage the encoding/decoding behind the scenes

recommend the last as the most practical approach, although the first 3 might be more educational

real hearth
#

Hi

#

I am trying to use HTTPS with a Flask server

#

While you work on your Flask application, you normally run the development web server, which provides a basic, yet functional WSGI complaint HTTP server. But eventually you will want to deploy your…

#
if __name__ == "__main__":
    context = ('secrets/cert.pem', 'secrets/key.pem')
    app.run(port=8080,  debug=True, ssl_context=context)

This is the approach recommended in the stackoverflow thread

#

How do you give the password for the key.pem to Flask?

errant bayBOT
#

Hey @lyric dust!

You either uploaded a .txt file or entered a message that was too long. Please use our paste bin instead.

lyric dust
#

Hello,
When I am trying to make a WSDL connection , sometimes I am getting below error

2022-10-11T12:50:43.663Z    socket.timeout: The read operation timed out

Kindly suggest

solar marsh
#

Hi, I am new to kuberetes cluster and gRPC. What I am trying to run a gRPC server (docker file image) image on kubernetes cluster and then run the client. But I am not sure how should I proceed. My server and client works fine on local system.

cold geyser
misty orbit
#

can flask work with https? like can I create an https server using flask? working with requests actually

#

if so, do you have any documentation or video that could help me setup an https server to work with requests? Thanks in advance 🙂

cold geyser
bronze dove
#

I doubt anyone will be able to help, but I've setup a basic socket server which starts a new thread for each connection, which works fine, I'm using connection.recv(1024) in an infinite loop to receive data and send a reply, the issue is that if I send two lots of data to the server at once, it will miss one and it won't get processed... how can I make sure I'm not missing any data?

cold geyser
# bronze dove I doubt anyone will be able to help, but I've setup a basic socket server which ...

you need to buffer your data. you cannot rely on .recv(N) giving you N number of bytes. There is no guarantee that you get what you sent on the other end. it might be split up, or merged with other data.
add the data you recv to buffer, and check that buffer for a delimiter or similar. something both ends agree on should mark "the end of a message". remove the message from the buffer, and keep the remaining part in the buffer. and repeat.

#
buf = b''
while True:
    data = conn.recv(1024)
    if not data:
        break  # connection closed
    buf += data
    *lines, buf = buf.split(b'\n')  # anything after the last \n is what stays in buf, usually empty.
    for line in lines:
        process_line(line)
``` very simple example of what it could look like, if your "end of message" delimiter is a single `\n` newline.
swift jasper
#

Hi, is it possible to open a VPN connection with Python, I need my script to access a remote pc that it is in a private network that I can access trough a VPN

rich hinge
#

is HTTP always over UDP or TCP?

glossy karma
#

Is there a way to what is causing a script not to connect?

fading lily
#

anyone know a way to curl/httpRequest natively in python without importing a lib? Im over at #help-pancakes :c

ember ledge
#

does setting up a home server help learn networking stuff or not really

zealous flint
cloud plover
#

doe anyone knows how to use wireshark

#

what to fill in this section

fading lily
#

@cloud plover
if you have to ask this question tbh, idk if youll get much out of wireshark but the second option would work I believe. If you can do multiple, 2nd+3rd but this depends on your method of connection. are you wired or wireless?

#

2nd is most ideal if you ask me

#

@ember ledge
yes hosting your own server will teach you alot. setting up linux taught me alot about how OS work. this is a hands on field with lots of trial and error

#

wireshark is some 2010 tech lol unless youre doing local networking or MITM stuff. wouldnt recommend. Try an api or a lib instead of pure hex unless youre trying to learn TCP/IP. injecting and sending hex packets is legitimately 2010 tech and unless youre trying to test an api, I wouldnt recommend using it

cloud plover
#

hmm

fading lily
#

not saying wireshark isnt useful for debugging, just that if you need to ask, you prolly wont get what you want from it

#

hex values and the obfuscation will heavily throw you off. network serialization too

#

it all depends what youre wanting to achieve. someones IP over P2P? Use an api with vulnerabilities but wireshark would work. just dont expect to get help from this community. Debugging your home network? Good idea

fallow pollen
#

Hello, I'm Gonçalo from the Data-Centric AI Community!
The Data-Centric AI Summit is now available on demand, I think you could be interested in watching 🙂
https://www.youtube.com/channel/UC4AFOG1a8b9r46G9w0CacUA/playlists
Also, check the github with 10k+ stars so you can ramp up your python game: https://github.com/ydataai
Enjoy!

GitHub

Accelerating AI with improved data. YData has 49 repositories available. Follow their code on GitHub.

storm radish
#

im using sockets for a multiplayer locally hosted game and my client easily connects to the server when both are run on the same machine, but client throws this error when i run the client on a bridged adapter VM

#

what might cause this?

#

i don't think it's a firewall thing because i had been able to connect this way a week or 2 ago

ember ledge
#

Hello. Sorry for the noob question. If this is the IPv6 address "5​d​6​6​:​5​e​c​9​:​0​0​4​6​:​0​0​0​0​:​2​5​7​6​:​0​0​4​f​:​7​1​5​9​:​0​6​3​9​", would the proper compressed address be "5d66:5ec9:46::2576:4f:7159:639"??

Guidance in any way, shape, or form would be greatly appreciated. Have a great day! 😁🙏

ember ledge
# storm radish that would be it, yeah

Thanks. I'm currently taking a class at Coursera, but the quiz doesn't seem to be recognizing the answer. Which kinda confuses me big time. It's already gotten on my nerves 😅

fading lily
#

Or change the code to connect to localhost

#

Cant firewall your own IP hahaha... Oh wait

storm radish
fading lily
#

You can have 2 games open on the same machine

#

Attempt to connect to the localhost 127.0.0.1 i think

#

If that works, then debug from there

#

Or try 2 seperate local machines

#

1 machine can host a server AND can connect to it. Thats what im saying to try

#

Or try disabling your firewall on server and vm. If that fails, download wireshark and see why the connection is dropping

storm radish
#

oh yeah

#

that works already

fading lily
#

If its an api, use fiddler

storm radish
#

thats why im so confused

#

it connects if i run the client on the same machine the server is running

fading lily
#

But drops the connection when you try locally?

storm radish
#

like its trying to connect but doesnt find it or something

fading lily
#

Hmmmm thats odd

#

Try setting up a vpn on your client machine and the trying so its not really local

#

Maybe theres a latency issue but if you know wireshark, you can debug and see why its not connecting

#

It might be a server setting youre missing also

#

Is it in unity?

storm radish
#

pygame

fading lily
#

Oh idk that sorry

#

Try to modify your server settings

storm radish
#

its python

fading lily
#

Yeah honestly I dont use python lol

storm radish
#

lol

#

i mean

fading lily
#

C# is kingggg

storm radish
#

its a work laptop

fading lily
#

Its a work laptop?? And youre sure it isnt a firewall issue?

storm radish
#

i would assume that

#

but like 2 weeks ago

#

i was following a socket multiplayer game tutorial and it worked

#

so idk anymore

#

its not like the networking code is any different

fading lily
#

Then I would recommend rechecking your server and client settings

#

Oh

#

First, check server and client settings, if nothing appears out of the ordinary(same port you tried 2 weeks ago) try wireshark to ser whats happening with the connection

storm radish
fading lily
#

There might be better software but idk any other than wireshark. Any failed connections should show up in color

#

So should be easy to find whats happening with the connection

#

Sorry idk python enough to help with screenshots sadly

storm radish
#

wireshark on the server machine?

fading lily
#

Correct

storm radish
#

was just showing you the ips and ports were the same

fading lily
#

Well actually

#

Wireshark on both if you cant find a problem

#

The client might yield more info due to it trying to connect and throwing an exception

#

I say wireshark on the client. It will show you where the packet is going and why the connection is being dropped

#

Or actually

#

You could write an exception block in the client script and log a stacktrace

#

Thats prolly the best way

storm radish
#

stacktrace?

fading lily
#

Yes, look into it. Its essential for debugging

#

Always learn logging and unit tests, itll save you headaches :p

#

But theres a few suggestions to help you out. i need sleep, godspeed

storm radish
#

alright thanks!

fading lily
#

Cheers~

storm radish
#

sadly didn't give much more info

fading lily
#

Says it timed out but connected? Theres a logic error with that code then

#

Something in the code that threw that error also sent connected. Somethings wrong with the code that spit that out. Keep trying :p

storm radish
#

no yeah that Connected shouldn't be there

#

it was right after the connect method and i should've put it inside the try except

#

after the exception was thrown it just continued and printed Connected

#

but it didnt connect

#

what am i looking for in wireshark?

fading lily
#

Get your 2 local ips of the devices and folloe the packet and where its dropping at

#

Start a capture, try to connect to server. When it fails, look and see where the packet went. Did it not find the correct IP to connect to? Port issue?

#

I would bet on there being a vm issue. I would use 2 seperate machines instead

#

Being the network channel, the connection is trying and either not finding the servers IP or just timing out due to latency issues would be my guess. I suspect the vm being the issue and recommend 2 machines

storm radish
#

idk who to ask at the office lol

fading lily
#

Well damn whats the pay

#

Maybe i should apply

#

XD

storm radish
#

im a paid intern

#

465€/M

fading lily
#

Hmmm not having a second device sucks

#

Maybe try an ssh server? Or like I said, vpn on your VM

#

So its a different IP

storm radish
#

im using this as a filter for wireshark

fading lily
#

Might need to filter by port instead

#

The client machine will definitely send out a packet searching for the server

#

You can follow it and see where it stops. Your router, a firewall, etc

#

Look into wireshark filter docs for further assistance

#

I dont use it often and am not a guru on wireshark but it will help I believe

#

Client: hey wheres this ip?
Server: im over here!
Client: heres your data
Lol

#

Something like that

#

Check for acknowledgement packets and push packets

storm radish
#

im working on it, it doesnt like my filters lol

fading lily
#

Wireshark can be a pain lol, peep the docs

storm radish
#

okay i found something, looks like these appear when i run the client code

fading lily
#

Expand the stuff below it and start the google fu

#

I need sleep lol its almost 4am

storm radish
#

okay🙏 go sleep

fading lily
#

Godspeed

storm radish
#

wireshark on server machine doesn't detect anything at all

fading lily
#

Sounds like a setting issue then. Try 2 seperate machines when you can, local and over the internet

#

I may be able to help out tomorrow with a secondary machine

#

Feel free to add me

storm radish
#

ill need to see how hosting outside of local network works

fading lily
#

Ah. Shouldnt be too bad

storm radish
#

a guy at the office ran the code for me and got a similar error

cold geyser
strange jewel
#

@cold geyser I have a question: Does chrome support HTTP/3

cold geyser
#

yes

strange jewel
#

fuk I meant HTTP/2

#

@cold geyser also how can I use HTTP/3 with Django

cold geyser
#

you don't

strange jewel
#

I already got HTTP/2 working

cold geyser
#

you use a public facing webserver with a reverse proxy config, like nginx or similar, and those would support http/3 if at all. django communicates with the "outside" (the webserver) using WSGI or ASGI protocol

strange jewel
#

I use nginx lol

#

inside of a docker container

#

A seperate one

cold geyser
#

then you have to see if nginx already supports http/3

strange jewel
#

it works

#

but sometimes is fkerd

cold geyser
storm radish
#

what should the packet look like when a client connects to a server using python socket?

thorn vault
#

Im not sure if this is te right channel to ask this question but I'm wondering how

#

to mount a volume in Docker

#

with all the files inside the directory

ember ledge
#

What are you trying to do?
Or why?
Have you solved it?
I've not worked with docker in a long time, but if you tell me, I could try to help you, it shouldn't be hard

ember ledge
#

I ask, because most of the time, people mix up binds, volumes and I think there's an extra way to manage storage

thorn vault
#

I had my volumes mounted with the paths but somehow they didn't show the files inside the volumes

#

Turns out i was missing './' in the name of the mount

#

this is wrong

- data:/opt/airflow/data

this is right

- ./data:/opt/airflow/data
thorn vault
#

Thanks !

ember ledge
#

Hi guys, I'm very new to networking, and I was trying to configure nat so I could test it

#

I've a small server (that does nothing, basically, just be there for testing), I can access from my phone

But when I try to access from my public ip, it doesn't work

I tested it on yougetsignal.com as well and I've had no luck

#

I've very minor exp with networking, basically know nothing

#

Yesterday I even tried enabling DMZ and it didn't work either

small spoke
#

You using dual stack?

#

Cg nat?

#

Are you hosting it locally?

ember ledge
ember ledge
#

I also just thought that my isp could be using cg nat, but I doubt it

ember ledge
#

I think, if my isp uses cg nat, I won't be able to do this, right?

#

Holy cow

#

I'm looking up how to know if my isp uses cg nat

#

I think it does it 😢

#

Very much likely they're using it

ember ledge
small spoke
#

Yes cg nat or dual stack like won't work

#

Lite

#

But you have connection with your phone

ember ledge
#

Can I request them when they is tall the stuff to not use cg nat nat and give me ipv6 or something?

ember ledge
small spoke
#

Ah, OK. Depends on your ISP. If they're lacking ips then they will use cgnat sadly. And for duals take you can probably contact your provider

ember ledge
#

Thank you, I'll see what can I do

small spoke
#

I was lucky. My provider "only" uses dynamic ipv4 and proper iv6

ember ledge
#

Apparently, yes, it's cgnat

#

😢

ember ledge
#

It's, indeed

small spoke
#

Cg nat is absolute perversion. But since no one wants ipv6 it's what we get

thorn vault
#

Can someone help me out with some Docker problems again haha

#

i'm trying to access from the airflow-airflow-worker-1 through a python script with psycopg2 to the airflow-capstone-db-1 container

#

But im getting this error

#
could not translate host name "postgres://capstone-db:5432" to address: Name or service not known
#

Nvm i've fixed it

thorn vault
ionic zinc
#

Help solve the problem. I have 1000 users and 1000 articles. Forum. How can I make the user know which articles he has read and which he has not? Help me google please. You can create an array column where read articles will be stored. What's the best way to travel?

edgy plank
#

Hey, there is a certain mobile game for which I want to create a bot, but it has no public API. If it was a web game then just opening developer tools I would be able to find the API calls its making, but since its a mobile game, I want to know how can I go about intercepting the traffic. In general for any mobile app or desktop app(which is not opened through a browser) how does one see the requests made by the app.

thorn vault
#

Or you can also make a list of the articles and make a list in the value of the key in the dict and append the article id everytime they read an article

ocean bay
ember ledge
wind grove
#

Hey anyone know subnetting

zealous flint
#

what's the issue

#

though fair warning of advice i'm not very good at it and it's been a while :p

wind grove
#

Thats my question

#

I just want to check my answer with someone

#

Please check if it is correct

zealous flint
wind grove
quasi wraith
#

is it possible to read the packets and detect bad packets(malicious) from the network traffic using ML algorithms for the detection in realtime?

cunning garden
quasi wraith
quasi wraith
cunning garden
#

Tons of established and startups went into ML applied to networking for the past 10 years

#

I haven't look at snort for decades. So can't comment specifically on it

quasi wraith
#

alright...well i am working on my UG project and I want to create an IDS that works in realtime

cunning garden
#

sounds great!

quasi wraith
#

yeah well I am kinda stuck after the network traffic capturing and logging part

cunning garden
quasi wraith
cunning garden
edgy plank
ocean bay
covert forge
#

does anyone know how to use websockets in python?

quasi wraith
#

btw is there any python library that can record the network traffic(packet) data captured by a python program in .pcap file

#

so that we can analyse and visualize that data afterwards

fossil wing
#

Hey guys, so I'm trying to make a Torrent Downloader; so it downloads the file when you put in the magnet link, but it's saying that the dll load didn't work because the module could not be found. I've checked and it is installed, I even tried to uninstall it and reinstall it but it still has the same dll error on the first line where the import is. Any help would be appreciated.

#
import libtorrent as lt
import datetime
import time
import os

print("Torrent Downloader")

print("\nBy:  ViridianTelamon.")

time.sleep(2)

link = input("\nEnter In The Magnet Link For Your Torrent File To Download Properly:  ")

session = lt.session()
session.listen_on(6881, 6981)

try:
    if not os.path.exists("Torrent Downloads"):
        os.mkdir("Torrent Downloads")
except OSError:
    print("\nTorrent Downloads Folder Is Already Made.")

parameters = {
    "save_path": f"{os.getcwd()}/Torrent Downalods/",
    "storage_mode": lt.storage_mode_t(2),
    "paused": False,
    "auto_managed": True,
    "duplicate_is_error": True
}

print(f"\n{link}")

handle = lt.add_magnet_url(session, link, parameters)

session.start_dht()

start = time.time()

print(f"\nCurrent Date And Time:  {datetime.datetime.now()}")

print("\nGetting The File Data.")

while(not handle.has_metadata()):
    time.sleep(2)

print("\nGot The File Data.")

print("\nDownloading Process Is Starting.")

print(f"\nProcess Starting:  {handle.name()}")

while(handle.status().state != lt.torrent_status.seeding):
    downloader = handle.status()
    
    state = ["Queued", "Checking", "Downloading File Data"\
        "Downloading File", "Finished", "Seeding", "Allocating"]

    print("% .2f %% Complete || Download: %.1f kb / 1s | Upload: %.1f kb / 1s | Peers: %d ||  %s" % \
        (downloader.progress * 100 , downloader.download_rate / 1000, downloader.upload_rate / 1000, \
            downloader.num_peers, state[downloader.state]))

    time.sleep(8)

end = time.time()

print("\nProcess Finished:  " + handle.name())

print("\n" + int((end - start) // 60), "Minutes" +  " And " + int((end - start) % 60), "Seconds" + "Time Taken To Download The File Overall.")

print("\nDownload Process Finished.")

time.sleep(2)```
elder cobalt
#

Hello I wanted to know if someone's good with WebRTC related softwares?

#

I'm thinking if it's possible to route WebRTC connections through socks5 proxy?

#

With the help of pyshark + pydivert

#

Sort of like a side project for me since webRTC is known to leak public ips with proxies

#

Okay nevermind my idea is a bit flawed lol

#

Was thinking if you could hijack the webrtc session and replace the source IP to that of your local socks5 proxy address

dusky sable
#

Can anyone tell me about smtp library , an how to get connect to mail, in list

cloud plover
#

does anyone knows to use iperf?

cloud plover
#

there are lot of resources

steady horizon
quasi wraith
thorn vault
#

I need some help with Python and Docker.

I'm running a script in python every 5 min with Apache Airflow mounted in a Docker Container

#

I'm accessing a PostgreSQL DB mounted in another docker container through the python script in the docker container

#

I can successfully perfom sql queries in the PostgreSQL container like counting rows

#

But when i try to export the table to a .csv it doesn't allow me to do it. It alway's throw this error

could not open file "/opt/transaction/2022-10-17/transaction_2022-10-17.csv" for writing: No such file or directory
HINT:  COPY TO instructs the PostgreSQL server process to write a file. You may want a client-side facility such as psql's \copy.
#

The path to the .csv file it's being generated automatically by the python script that exports the file, i'm using os.mkdir & os.system with bash commands to access the docker container throught the containerID and mkdir commands

#

But so far both ways of trying to create the dir don't create the directory

#

Any ideas how to fix it ?

storm radish
#

why is the PICKLE message takins 200ms to arrive when the header takes barely 1ms? this is from a NatNetwork VM which has 0.5-2ms ping against the server (hosted on the VM host)

gloomy root
#

that really depends on your code

storm radish
#

they're sent one right after the other though

gloomy root
#

what is client

storm radish
#

using python socket, don't really understand what they are tbh

storm radish
#

how do i troubleshoot lag?

storm radish
#

if i host my server on my host machine and run the client on a NatNetwork VM, the header takes 1ms to arrive and the pickled dict takes 250ms

#

if i host on a VM and client on another VM, both in an internalNetwork, both the header and the pickled dict take 40ms to arrive

gloomy root
#

Sorry for the long delay but work™️

#

it's most likely because your bandwidth rates and latency are difference

#

the header is much much smaller than the pickle object I imagine, so your bandwidth limits will be exacerbated or more noticeable with larger payload sizes

ember ledge
#

Guys i have a simple doubt regardsing using socket..
I connected my laptop (server) and android phone(client) to hotspot of another android device that has nothing to do with the code do i have to put the IP address of the client(android device containing client file) as host in my android (client file) and also inside the laptop (server file).

storm radish
#

you put the ip of the server on both

ember ledge
#
#Server.py
#
import socket
port = 5000
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind(('', port))
s.listen(1)
c, addr = s.accept()
print("CONNECTION FROM:", str(addr))
c.send(b"Hello from server") 
msg = "Bye.............."
c.send(msg.encode())
c.close()
#
Client.py
#
import socket
port = 6270
s = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
s.connect(('', port))
msg = s.recv(1024)
while msg:
    print('Received:' + msg.decode())
    msg = s.recv(1024) 
s.close()
#

I put ip address of my laptop (containing server.py file) in my laptop and android phone(containing client.py file) both of them are connected to another android device 's hotspot when i run the code i don't see any error but my android (client.py) is not connecting to my laptop (server.py).

storm radish
#

and this ip address of your laptop

#

it's the local ip?

ember ledge
#

Ip address i get after ipconfig
command in cmd of my laptop

storm radish
#

you only get one ipv4 address?

ember ledge
#

Yes,i also check in android hotspot setting(with whom my laptop and android device is connected) and when i click on the device name of my laptop i can see the ip of it..

snow yarrow
#

Is fastAPI good?

zealous flint
#

of course

ember ledge
# storm radish you only get one ipv4 address?

When i tryed using two android devices as client and server and connecting them to another device hotspot,then i find it working seems like there is some problem in laptop accepting client 🤔🤔 may i have to go throught some settings but anyway thankyou for your inputs 🙂

prisma cobalt
halcyon elk
#

Hi im learning about protocols, and sockets, and networks in python but not quite grasping the idea,

#

what exactly is a protocol

cold geyser
# halcyon elk what exactly is a protocol

it's an agreement between two computers, how and in what format data is to be exchanged... If a client connects to a server and just sends random data, the server won't understand what it means and fails processing it. so both client and server need to agree on a protocol on how exactly the data, that is exchanged, needs to be structured so the receiving end understands it

small spoke
#

I highly suggest getting basic understanding of the osi/iso model.

zealous flint
# halcyon elk what exactly is a protocol

Sani has sent you a good definition - think of it like a language. You and I are speaking the same language right now, it can be analogous to a protocol. We understand each other and can communicate. Different machines on a network do the same thing as well

jagged light
#

Hello guys, I'm peter and I'm new to Descord, can anyone please help me to solve the "error_proto" while trying to connect to FTP ?

#

I have searched the internet with no luck

cold geyser
umbral cargo
#

anybody could help me to transform numbers to human-redeable IP Address?

neon holly
#

Guys can someone tell me how to configure switches, routers and do all the networking stuff using python? Pls share the resources if possible 🙃.

umbral cargo
#

3128580215

#

the ip i need to get with that number is "186.122.88.119"

#

ohhhh

#

first

#

number to bin

#

and later bin to ip

#

im pretty sure thats not what you mean to do

#

lmao

errant bayBOT
#

@bold gyro :x: Your 3.11 eval job has completed with return code 1.

001 |   File "<string>", line 1
002 |     !e
003 |     ^
004 | SyntaxError: invalid syntax
umbral cargo
#

!e
num = 3128580215
while num > 0:
print(num % 256)
num //= 256

errant bayBOT
#

@umbral cargo :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | 119
002 | 88
003 | 122
004 | 186
umbral cargo
#

the only problem now its im not ussing py

#

but i'll get it over with, thx you a lot

zealous flint
zealous flint
zealous flint
errant bayBOT
#

@zealous flint :white_check_mark: Your 3.11 eval job has completed with return code 0.

['0b10111010', '0b1111010', '0b1011000', '0b1110111']
zealous flint
#

slightly esoteric but it works

umbral cargo
#

i need to use lua for this

#

it will be a lot easier

zealous flint
#

conceptually it should still be the same

umbral cargo
umbral cargo
ember ledge
#

anyone here in the network security field?

lucid scroll
#

ask away

#

whatever question you might have

ember ledge
#

Just ask your question. Don't ask to ask, ask for topic experts or DMs. Skip the formalities and ask away bunHappy

dawn obsidian
# ember ledge Just ask your question. Don't ask to ask, ask for topic experts or DMs. Skip the...

I want to ask, sir. May I? Well okay. So I do learn go rn, I love this language but I'm doubting if I will be able to find a junior position with this lang, so I decided to learn python as well. So to be able to do networking stuff on both language I need a theory I guess, where can I get that? I mean, can you link some resources or give some advices on learning theory? (P.s. I checked pinned messages, so please don't refer that)pepethx

zealous flint
dawn obsidian
#

That's why I am asking for theory to understand stuff

zealous flint
#

I know plenty of people in the field who only know one or two languages and not well either

zealous flint
dawn obsidian
#

Because lang doesn't matter,code is code, the main part is to understand conceptspepethx

zealous flint
#

!resources I haven't checked here specifically for networking but it might be worth a shot

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.

zealous flint
#

As this is fundamentally separate from python

dawn obsidian
prisma cobalt
jovial fable
#

It's my first time working with a tcp server, I have checked the networking FAQ as well so I made sure these troubles were crossed off. I am currently trying to make a server that connect to an OBD device. The OBD sends a log in message such as C00000009DAA020000000000010001001047325F48312E315F56322E31000300133836313434353033343533383130330004000A313135323030000200153147314A4335343434523732353233363900050005010006000B6265656C696E650007000B6265656C696E650008000500000900183839373031393931363031313930343036363466000A0017696E7465726E65742E6265656C696E652E7275C0 and I have to return a response like this C00100000DFF0300000000000100C0

#

Here is my current code:

import socket

PORT = 1234
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((socket.gethostname(), PORT))
s.listen(5)
print('Server is running...')
while True:
    clientsocket, address = s.accept()
    print(f"Connection from {address} has been established!")
    clientsocket.send(bytes.fromhex('C00100000DFF0300000000000100C0'))
lucid scroll
#

you are not calling recv()

#

before .send

prisma cobalt
#

that doesnt matter @lucid scroll

#

trying to make a server that connect to an OBD device
the OBD device needs to connect to the server
not the other way around

#

whats not working @jovial fable

jovial fable
#

I ended up going back to the real python tutorial and using their code instead of another i found online:

import socket

HOST = "127.0.0.1"  # Standard loopback interface address (localhost)
PORT = 1234  # Port to listen on (non-privileged ports are > 1023)

with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
    s.bind((HOST, PORT))
    s.listen()
    print('Server is running...')
    conn, addr = s.accept()
    with conn:
        print(f"Connected by {addr}")
        while True:
            data = conn.recv(1024)
            print('Raw Bytes data: ', data)
            print('Hex Data: ', data.hex())
            if not data:
                break
            conn.sendall(bytes.fromhex('C00100000DFF0300000000000100C0'))
cinder isle
#
        url = f"https://i.instagram.com/api/v1/users/web_profile_info/?username={USERNAME}"
        req = urllib.request.Request(
            url, 
            data=None, 
            headers={
                    'User-Agent': 'Instagram 219.0.0.12.117 Android',
                    'Accept': "*/*",
                    'accept-language': "fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7",
                    'origin': "https://www.instagram.com"
            }
            )    
        response = urllib.request.urlopen(req)
        response = response.read().decode("utf-8")

        return response
#

because the problem is that I don't get the information I need

cinder isle
#

I just looked with a friend, we did the same command for him, it works, but for me, it doesn't work on my 2 computers

jovial fable
#

i tested it on postman and it is return json, if you are using vscode, then i recommend to use thunderbolt to test your http requests

prisma cobalt
cinder isle
ember ledge
#

does anyone know how to drop an ip permanently or for a set period of time if an ip exceeds a rate limit in either ufw or iptables?

sacred plank
#

I use Fabric in order to connect to an SFTP client in order to upload and download files from it. Connecting, uploading and downloading files works.

I don't know how to properly handle my credentials though. I don't want to type in my password every time I connect and I also don't want to write it in plain text. I have read through Fabric's documentation telling me about keyfiles, passphrases and SSH configs, but I couldn't really follow. Can you give me an ELI5 version of it?

lyric tide
#

how do i know when a websocket connection is closed by the client so that i can do some cleanup activity on the server

prisma cobalt
#

what library are you using?

bold anchor
#

Hello everyone, i am facing a little problem with python requests lib on my raspberry.
I am trying to build a bot with python and to do so i am using requests library.
When i try to do a GET on some URL to get info from i have a 403 error. The problem is that on my mac when running the same code i get a 200.

Version 3.9.0 for python
Raspberry pi on Raspberry os

Thanx for helping

#

what i am getting from a curl command on my raspberry

jagged light
#

Hello guys,
Does anyone know how to connect to FTP that has a text file that contains public keys necessary for this connection ?

wicked vigil
#

What are you trying to achieve?

jagged light
#

@wicked vigil
I want to connect to FTP through filezilla and upload some files with python

jagged light
#

I have seen this link before but I'm kinda new and don't know which one can help me to connect to the FTP

#

Especially as i have a txt file that contains public keys necessary to connect

wicked vigil
#

Literally says it

jagged light
#

It's not working

#

I have to use the txt file somewhere but i dont know how

#

The public keys

wicked vigil
#

Take a look at the docs oof

keen bough
#

hey so if i wanna do like a certain job of coding like machine learning ant networking do i learn the whole language or just the parts i need to learn

cold geyser
#

there are libraries that cover those topics, but to use them, you need to first understand how to use python

analog holly
#

@zealous flint

is this good so far?

misty coral
#

!e

from socket import gethostname, gethostbyname

print(gethostbyname(gethostname()))
errant bayBOT
#

@misty coral :x: Your 3.10 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 3, in <module>
003 | socket.gaierror: [Errno -3] Temporary failure in name resolution
misty coral
#

ah rip no networking

zealous flint
analog holly
analog holly
zealous flint
analog holly
lunar wasp
#

Hey, There!

I'm getting a ConnectionResetError with BaseHTTPRequestHandler from builtin http module. The error happens when a client cancelled a sending a packet to server.

Is there a way to catch this error in the BaseHTTPRequestHandler class?

Here's what I have:

def run(server_class=HTTPServer, handler_class=Server):
    server_address = (SERVER_IP, SERVER_PORT)
    httpd = server_class(server_address, handler_class)

    def wrapped():
        try:
            print(f"Starting httpd on port {SERVER_PORT}")
            httpd.serve_forever()
        except ConnectionResetError:
            wrapped()

    wrapped()

Resetting all the connections when it occurs is definitely a no no.

Server class is a subclass of BaseHTTPRequestHandler

lyric tide
wanton quiver
#

.

main turret
#

If I use ipv6 in socket , will I be able to connect it by the device which is not on the same network?

quasi wraith
#

is there a way I can get the packet info like this using any python library...I am making a packet sniffer with GUI and I want to get the packet info like this like i did in wireshark

#

i am using scapy for the packet capturing

proven cargo
#

how to get client server lag of 2 machines running on the local network

crystal current
celest maple
#

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

inland kernel
#

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

analog holly
#

Does anyone know whether i done this correctly?

young fox
#

Anyone have a good tip for a root/dedicated server with a good price to run scripts on it?

quasi wraith
#

is there any way to identify if there is a traffic analyzer in the network by an external agent?

wheat finch
young fox
#

Anyone have idead how to upload a file via ssh to a linux server?

#

im so lost atm

runic shale
#

What is the best way to ping a website without any 3rd party libraries and sub-processes?

ember ledge
runic shale
#

Is there a way without sub processes ?