#networks
1 messages ยท Page 18 of 1
It enabled that but you don't know the way to make it higher perf yet 
But also brings alot of danger with it
I think there is value in struggling with sockets once
because afterwards you know what you are doing
It's great to know how they work for sure
and I know that it sucks
and I know that it sucks
@quick knoll im having fun dealing with bugs and errors
lots of it
Tcp is annoying to write protocols on top of as well
we all did when we started working with sockets
hey guys wanna do a funny test
i want to see how many concurrent clients my laptop can handle (normal clients, none of that 3k char long shit, especially because i just filter it if it's too long)
if you enter a normal message it just gets printed to the server so it's kind of like a one sided chatroo, but i can just stream it so we can have some fun ๐
A single threaded server done right should be able to handle about 5k req a sec easily
XDDDDD
a single threaded python server
how can you handle more than 1 client with a single thread
like literally how does that work
Async
My my WSGI server will go to 11k a sec per thread but that's about as far as it goes
ASGI will go to about 30k per thread
there are different ways of achieving concurrency
threading is one way, but has lots of issues ( like not being threadsafe, huh)
My my WSGI server will go to 11k a sec per thread but that's about as far as it goes
ASGI will go to about 30k per thread
@gloomy root in what instance do you even need to handle this many "messages"
Production
Imagine discord
Production
@gloomy root ๐
discord probably has a shit ton of servers
Less than you might think
The more efficient a server is the less server specs you need to run a system
50 good servers
More than you might think then. Haha
Discord is serverless
o.O
No it's not
goood
how could it even be
Discord is not serverless
Is it not?
It runs on autoscaling managed instance groups at least for stateless stuff
Is the backend still python and flask (I'm not sure about the flask thing)
Ah fair enough
But also a lot of elixir and rust
Elixir for ws?
Fair enough, what made you guys choose WSGI vs ASGI systems?
Flask v other async systems
Was py2 until recent
Would you guys ever move to ASGI or just keep it with gevent and flask
I imagine the stack was chosen for familiarity by the original devs and then momentum
No big plans to change right now because it works great right now
Ig back then flask and django were some of the few frameworks around and no asgi
wait, you work for discord gary?
Ye Gary staff
Yea on the backend infra
Does gevent get heavy affected by things like requests
Not product so I can't answer anything about that 
infra is more interesting anyway
Tho I imagine you guys don't need any client req
We have rpc libs that work with gevent for internal rrquests
Oh nice
I only mention the product disclaimer to fend off product questions/complaints 
People always lurking :P
I just like python and this server is managed in a way that's not overwhelming to pop in and help
Haha was going to say except one
What sort of performance so you guys get out of gevent compared to asyncio BTW
Haven't compared. Would be a huge change
I've messed around with libuv and pyuv but not had it get anywhere close to asyncio
Reality doesn't really match benchmarks. Most slow down is waiting on rpc/databases/network
Only as fast as the slowest component
The value of async is more concurrency while blocking on io
Is discord Sql or no sql?
What made you guys move?
A bit of consolidating on fewer technologies and a bit of preferring the scalability and performance model
Cassandra still kicking or is that blog article obsolete?
got it, Scylla is drop in replacement
yeah for the most part
but with more consistent performance and more isolated failures
@tall olive @quick knoll sorry for the bad ping, i'd like to see if the server works as it should with multiple users from all around and possibly try to break it in every way possible, since i added a sort of chatroom setup the server can see all messages sent (but i havent added that to the client yet), so what i was meaning to ask, if i gave you the client and possibly streamed the chatroom in a vc, would ya like to connect? and maybe break it i guess
pinged you two because you're the #networks og's 
uhh actually i can't video stream in this server sadly
Sorry not available for that
@undone gust look at wrk if you want to try break it
It's a benchmarking tool that essentially just floods requests at your server
Niceee
Good afternoon! First post on this Discord server so I hope this is the right place to ask.
I am trying to identify the tools I need to write the backend of a real-time "collaborative agenda", where the server will schedule and broadcast events sent from the clients via a web app. Most of the communication between server and clients should be done via websockets (i.e. clients will have their state updated in real time via web sockets or long-polling where a websocket connection is not possible).
My main priorities are performance (hundreds of clients connected simultaneously should be handled seamlessly), caching and database integration.
I have heard of socket.io for Python, which looks promising, but I am not sure of its performances. There is also Django with the recent Channels features.
Any suggestion for my use case?
an easy way to guarantee you have enough server capacity to handle lots of throughput is to just spin up multiple servers, the implementation is pretty agnostic as they'll all be about the same unless you're comparing compiled vs interpreted languages
@hexed epoch Hey, thanks for your reply! If performances don't distinguish one implementation over the other, are there other important criteria which in your view would single out 1 or 2 frameworks (possibly including those I mentioned above)? I should mention are we are a small structure of only two devs for now.
I would go with the one that's quickest to get running and easiest to understand when reading/writing the code
Cannot be wrong about that :)
So one last question: Do you think there are other promising candidates beside those I mentioned I should consider in in my choice?
ay
import socket
import time
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server1 = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
HOST = socket.gethostbyname(socket.gethostname())
PORT = 8888
# Check at the first try
def connect():
try:
server.connect((HOST, PORT))
messages()
except ConnectionRefusedError:
print("reconnecting, please wait...")
time.sleep(0.1)
connect()
# Check at the second, third, etc.
def reconnect():
try:
server1.connect((HOST, PORT))
messages()
except ConnectionRefusedError:
print("reconnecting, please wait...")
time.sleep(0.1)
reconnect()
def messages():
while True:
try:
command = server.recv(1024).decode()
print(command)
except:
reconnect()
connect()
my reconnect function works, the server receives the connection
but i got a error: OSError: [WinError 10056]
in 24 line, server1.connect((HOST, PORT))
@lilac ginkgo I don't normally use python for sockets, I typically use Elixir with the Phoenix framework, and it's not too hard
lets see
@hexed epoch Hard to beat the beam vm at this I reckon... I hope my use case allows to stay with Python though. Thanks for the discussion!
@ember ledge i mean you're using that port for server so i dont think you can also use it for server1
i can
that code is weeeird
@lilac ginkgo fwiw, gRPC is what I use for things like this now. They can do bidi streaming
@ember ledge shouldnt you do server.listen and then connect via the client?
no you're doing server.connect
server.listen can't be on client
client
i still dont understand why you use 2 sockets, and also why you want to receive commands on the client instead of the server, but the second one i guess isnt too important
@vernal surge This is an excellent suggestion! I had overlooked gRPC. This seems to allow for a more modular type of development than websockets
@vernal surge Is there any gRPC library you'd recommend?
to receive commands on the client
@ember ledge yeah i see but isn't it better to receive them on the server? that's... kind of the point of servers
i just need it to be like this @undone gust
anyways i cant exactly pinpoint the error, ill look again later im eating rn
if you are targeting businesses, gRPC can annoy net admins
why do oyu need it to be like that
@vernal surge Fair enough. I will need to see if this checks out.
@restive blaze all http/3 stuff does lol
@undone gust idk, i just want it to be like this XD
yeah but..
but my point is, there is technology and business
technology may say "gRPC is best way to go", business may say "Whatever is most compatible with businesses"
WebSocket > gRPC when dealing with net admins
@ember ledge if you do it on the server you can have all commands from all clients in one program and it may be a lil better anyways
nevermind lol
Depends on what the business is. If the tool is worth the effort, adoption occurs.
WebSocket > gRPC when dealing with net admins
@restive blaze You're saying the gRPC means more footwork for consumers of my API / service, if they need to exploit my gRPC in their own ecosystem?
j4ng5y, his business idea sounds like Microsoft Teams/Google Chat already
@lilac ginkgo the level of effort is different, with gRPC, the client stubs are easily generated
I'm saying, bigger businesses with their firewalls may need to poke holes causing poor adoption of your product
WebSockets are well known and thus firewalls don't freak out about them
I disagree with poking holes. It's all HTTPS, but L7 fws will required things.
and it could be WS with clients, gRPC internally
gRPC is HTTP/2 which I've seen plenty of firewalls barf on
yes yes, businesses should get updated, blah blah blah
welcome to business hell
@restive blaze only clients I've had using an rpc library of mine didn't have trouble, but yeah, These were tech forward companies
Palo Alto / Cisco ASAs
@vernal surge @restive blaze I agree with both of you. I am aware that gRPC is not widely adopted among small businesses yet unless they're tech businesses. You've made your case.
I'm saying, gRPC is future facing awesome sauce, WebSocket has higher compatibility, I don't know the goal of your software
I imagine a PIX would absolutely barf
I think Teams/GChat/SLack all use WebSocket for comms
Probably they do.
WebRTC for Video/Audio
Okay folks, I am off to the docs ! Thanks for your help, really appreciated!
Biggest trouble I've had with gRPC was when I tried to use it without pre-generating client libraries for an API ... That process is not overly trivial yet I guess
So I had to do some gRPC<->JSON magic, but luckily, things like envoy do that for you now
Hello guys, i have a question.
Is there a way to transfer a variable/information to my programm by clicking on a link like this.
If yes it would be awesome if someone could explain it to me quick or provide me an explaination on the internet (since i cant find a solution somewhere)
Examples:
http://dashboard.phasma-aio.com:2001/qt?url=https://www.aw-lab.com/yeet-AW_846ZJMRC_4045754_19.html
Thank you guys very much ๐
Yeah, you can do that, but you have to be running the web backend to process those @limber shoal
But it's fairly trivial to grab request path variables and url parameters with most web frameworks
Without knowing what you are doing though, no idea where to direct you
@vernal surge Can i write you a DM?
Nope
lol
it's less an issue of me getting annoyed, more an issue of "i'm sure there are other who are silent who would benefit from the discussion"
about to start (again) ramping up on Python and VSCODE - any good non-noob tutorials or videos out there? I have a good C programing background.
Realpython had some good ones that jump right into things @cinder trellis
Realpython had some good ones that jump right into things @cinder trellis
@vernal surge thanks
Is someone able to explain how a socket with REUSEADDR load balances on the socket side?
Like is it predicable or is it purely down to a random internal system balancing across the multiple processes
Not 100% certain this is the right help channel but I'm having trouble with aiohttp and my header
async def fetch(session, url, params=None):
global header
formattedUrl = url #+ '&access_token={}'.format(access_token)
print(formattedUrl)
async with session.request('GET', url=formattedUrl, params=params, headers=header) as resp:
print(resp.status)
data = await resp.json()
return data```
so i have this which im trying to request a json with but it requires authentication via access token
header = {'Authorization':'Bearer ' + 'redacted, access token here'}```
this is what my access token looks like
using requests.get() it works just fine with the same url and header
but i get a 401 status code using aiohttp
Sniff the traffic and see what's different

Also you have a commented out + so there's a line in there that does nothing
Yeah i know, I was passing it through the url but it was becoming tedious and also not working all the time
Well then how does it get the access token
I have 3 antiviruses
Avast, Malwarebytes, and Windows Security
My computer isn't accepting any incoming connections
I tried multiple ports
Try to disable something that blocks the connections
I'm not disabling my firewall
Try to disable features in those 3 antiviruses
wdym on localhost
when I try to connect to the server on the same computer it works
From the own computer to itself
yeah oh okay yeah it works
Okay, did you open the port on your firewall
Your on windows right
Yes windows 10
Use the search bar at the bottom
Type firewall, it'll take you to the firewall controls
Then you can make a new rule in incoming rules
Okay I'm on t
Configure it to allow all connections on a certain port
does port 31607 work
Okay it's allowed
it's still not connecting
Here's my code:
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind(("192.168.x.x", 31607))
s.listen(5)
print("open")
while True:
# now our endpoint knows about the OTHER endpoint.
clientsocket, address = s.accept()
print(f"Connection from {address} has been established.")
clientsocket.send(bytes("Hey there!!!","utf-8"))```
and here is where I connect to it
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect_ex(("192.168.x.x", 31607))
while True:
msg = s.recv(8)
print(msg.decode())
when I try to connect to it on another computer I got Winerror Errno 10060
and when I try to connect to it with my phone I get OSError Winerror Errno 107
@thorn stratus
I have question not about python (generally) so im sorry but i dont know any server for stuff like that
can anyone help me connect my domain with my page?
@tiny panther when you do s.bind try to change it to s.bind((socket.gethostbyname(socket.gethostname()), 31607))
then on s.connect() in the client put the ip you gey by printing what i just told you, and obviously the port, as a tuple
also, send() only takes 1 argument, what to send, you have to do clientsocket.send("Hey there!!!".encode("UTF-8"))
and you do s.recv(8) but the message you send is over 8 characters long
the argument in recv has to be the length of the message you're receiving
in a simple case like this you can just count it by hand, but usually you first send a message long a certain amount which is just spaces and at the end the length, so you always know the length of the first message you send, and then by decoding it you can easily get the length of the message you actually wanted to send
s.bind(('', 31607)) or s.bind(('0.0.0.0', 31607)) will suffice
hey guys how do i send a message to all the clients connected?
uh
get a list of connections
and send all of them in the list
idk how to explain lol
@undone gust Hmm.. Okay I'll try that
it didn't work
I'm questioning whether my computer even opens the server
Yeah the server does open
I tried connecting to it on the same computer
everything worked as expected
it's just that other devices can't
are you actually binding to local host or to external tho
You loop through the list and send it to all of them one way or another
Idk I'm using my IPv4 address
Something is wrong with my comptuer
my main one
because the code I used worked for a different computer
no problem worked super easily
What I know is that the server does open
so my computer is running a server
but when I try to connect to the server from a different device, it doesn't connect
When I try to connect from my phone, I get WinError Errno 107
and from my other computer I get WinError Errno 10060
two different errors
(Both my phone and other computer can connect to each other)
I've tried connecting my phone to my other computer
my main computer can't get those connections but can connect to the server my other computer is running
so it doesn't take connections, but can connect, so it works
Did you try to connect on another network then your own?
Maybe its smth with ur network
Did you check your firewall
I don't know if I did it right but I allowed the port I'm trying to connect too
In the inbound part of the firewall
the rule
My main computer can connect to other networks
The difference between the two computers is one is on the same network as you and one isn't?
both are on the same network
ServerApp is on Comp A and you think it is running a server and exposing a port.
ClientApp is on Comp B (or your phone) and can't connect?
Can you scan Comp A from Comp B to confirm? Is Comp B a *nix machine you can install nmap on? A quick nmap -sS ip.of.comp.a.here will show you ports reachable from outside CompA.
Both are Windows machines
Checked the firewall?
I made a rule that allows port 31607 in the inbound section but it made no difference
Can you connect from the computer running the server
Yes I can connect to other servers
it works when I try to connect to another server
Yo so got a question. Programs like discord do everything through a server right? So when i send some text in dm to someone. My disc client sends data to the server, which sends the data to the client of the user im dm'ing. So basically is the server the middle man in programs like discord. Is my interpretation right or not?
Yeah, it's called client to server architecture. They use webRTC for voices and such but it's mainly a client to server architecture.
But how does it come people say yea i used wireshark to grab his ip in disc. If they would only be getting the ip adress of the server lol
Are those people just stupid and trolling. Or is it in fact possible even with a serverside application
As far as I know, wireshare is for packet analysis on the local network. This is all I have ever used it for and if it has another use case I am not aware of it.
As far as I know, wireshare is for packet analysis on the local network. This is all I have ever used it for and if it has another use case I am not aware of it.
@ember ledge yes, but you can see in wireshark from which ip adress the data is coming.
ahh right, right.
@ember ledge hey how can i check if a client is connected to a certain server with like an if statement?
Are those people just stupid and trolling
yes
import socket
import time
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
HOST = socket.gethostbyname(socket.gethostname())
PORT = 8888
def connect():
try:
server.connect((HOST, PORT))
messages()
except ConnectionRefusedError:
print("reconnecting, please wait...")
time.sleep(0.1)
connect()
def messages():
while True:
try:
command = server.recv(1024).decode()
print(command)
except:
connect()
connect()
i get this error:
File "C:\Users\Laurynas\Desktop\project\client.py", line 27, in <module>
connect()
File "C:\Users\Laurynas\Desktop\project\client.py", line 13, in connect
messages()
File "C:\Users\Laurynas\Desktop\project\client.py", line 26, in messages
connect()
File "C:\Users\Laurynas\Desktop\project\client.py", line 12, in connect
server.connect((HOST, PORT))
OSError: [WinError 10056] A connect request was made on an already connected socket```
any ideas?
the error tells you you're connecting on an already connected socket in your messages function
well first, you're doing that an every type of except
you probably don't want to reconnect if say you got a unicode decode error
but when you want to reconnect you need to make a new socket object
uh wait
ill try
# Python program to implement client side of chat room.
import socket
import time
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server1 = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
HOST = socket.gethostbyname(socket.gethostname())
PORT = 8888
def connect():
try:
server.connect((HOST, PORT))
messages()
except ConnectionRefusedError:
print("reconnecting, please wait...")
time.sleep(0.1)
connect()
def reconnect():
try:
server1.connect((HOST, PORT))
messages()
except ConnectionRefusedError:
print("reconnecting, please wait...")
time.sleep(0.1)
reconnect()
def messages():
while True:
try:
command = server.recv(1024).decode()
print(command)
except:
server.close()
reconnect()
connect()
like this?
no, because nothing is using server1 and that would only let you reconnect on time
you're not recv on server1 ever
sorry, gotta run but you should just overwrite your server variable with new socket when you need to reconnect
probably have to use global server to assign a new socket
How would i get the Users IP address? Im making a simple login system in which, an account will be bound to an IP address (IP wuill be hashed) So, they will enter their username, ad if the IP matches the Users Ip it will let them in.
uh
conn, addr = server.accept()
addr[0] is user's IP Address
who just connected to the server
I've never worked with HTTP request streaming, but the API I'm using has an endpoint that is a stream. The example from the docs (https://requests.readthedocs.io/en/master/user/advanced/#streaming-requests) has a foreach to loop over the stream, but it doesn't really explain how to work with it other than that. My assumption is that I have to do requests.get(endpoint, stream=True) every second (or how often I want to check if there's something new in the stream) and then do the same procedure they use. Is this correct?
And will the response I get then have only the new entries added by the API?
I have a question regarding architecture of my chat app. Lets say I have multiple rooms and each room has multiple clients. I thought about making a dictionary which is something like {"room id": ["list of all clients"]}. Is this a good approach? So when I want to add a message to a room I need to loop over the list. but my server creates a new thread for each client so will it not be a issue with each thread accessing the same dictionary? especially when a client disconnects and one of the threads needs to modify the list.
Anyone know how to speed up requests.post? the page itself is very slow but with my internet its even slower
i spent 25-27 seconds on sending request
any change in python library would be minuscule compared to the network latency
unfortunately, you're at the mercy of your network speed and the speed of the server you're talking to
you could try threading them, yeah
but wont it hurt my pc?
but that won't speed up your network or the server you're talking to
would aiohttp help
no, it won't hurt your pc
I've never worked with HTTP request streaming, but the API I'm using has an endpoint that is a stream. The example from the docs (https://requests.readthedocs.io/en/master/user/advanced/#streaming-requests) has a foreach to loop over the stream, but it doesn't really explain how to work with it other than that. My assumption is that I have to do
requests.get(endpoint, stream=True)every second (or how often I want to check if there's something new in the stream) and then do the same procedure they use. Is this correct?
@waxen kraken Just follow the example. Call thegetjust once like thisr = requests.get('https://some.url.goes/here', stream=True). Then usefor line in r.iter_lines():to read the streamed reply. One suggestion, and I don't know why they left this out of the example, butiter_linesuses a defaultchunk_sizeof 512, butiter_contentuses a defaultchunk_sizeof just 1, which ends up giving extremely poor performance. I think this is a bug in requests - looking at the source it looks like the intent was to default toCONTENT_CHUNK_SIZE = 10 * 1024. So if you useiter_content, be sure to specify some value forchunk_size, I've used 1024 and it works well. One other point: you will get your HTTP status code from the initial get, probably a 200-299 code. But if there are any server errors while streaming the content, there will be no indication or further exception - your client code will just have to handle bad data if it goes bad.
@idle portal But since the example is just a for loop, won't it only read whatever is in the request the first time it is called? Like, I'm thinking about if I consume whatever is in the stream, then I still have to call the request afterwards again to get any new info that was pushed by the API right?
@mellow dock How would I keep the connection open?
what
That question makes no sense lol
Hey folks, I am trying to build a super basic file-uploading API using the Swagger specification and the connexion library. I am new to the multipart/form-data format for files so just wanted to ask if this looks like a reasonable API. Thank you!
openapi: "3.0.0"
info:
title: File upload API
version: "1.0"
servers:
- url: http://localhost:9090/files/v1
paths:
/files:
post:
summary: Upload a new comma-separated file
operationId: api.post_file
requestBody:
content:
multipart/form-data:
schema:
properties:
myFile:
type: array
items:
type: string
format: binary
responses:
200:
description: Upload successful
content:
application/json:
schema:
type: object
properties:
fileId:
type: string
def post_file(myFile):
fileTitle = myFile.filename
fileBytes = myFile.stream.read()
fileDecoded = fileBytes.decode('utf-8')
file = open("{}/{}".format(UPLOAD_FOLDER, fileTitle), "w+")
file.write(fileDecoded)
file.close()
return getFileId(file)
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:
that would be better in #data-science-and-ml
@idle portal But since the example is just a for loop, won't it only read whatever is in the request the first time it is called? Like, I'm thinking about if I consume whatever is in the stream, then I still have to call the request afterwards again to get any new info that was pushed by the API right?
@waxen kraken yes, once you consume the entire stream in the for loop, you'll need to re-call GET to start a new one. Interesting though, if the server just keepsyielding more data, your for loop won't ever finish. (You may have to handle empty content returned from a call tiiter_lines, and possibly sleep for a second at the bottom of the loop so you are not in a busy loop.)
Alright, thanks @idle portal
thanks for the warning i guess
@ember ledge if you have a problem with another user on the server, you're welcome to DM @small mango, otherwise this really isn't the place for that
ok thank you
unless you live on mars, that doesn't make that much sense
unless, you have really bad internet
hey there everyone! Im trying to learn how to make a website with python but there is something wrong with my code```python
Import and Setup
from flask import Flask
app = Flask(main)
Functions
@app.route("/")
def home():
return "Hello! this is the main page <h1>HELLO<h1>"```
error is line 4, in <module> app = Flask(__main__) NameError: name '__main__' is not defined
im actually not too familiar with __ main_ _ but im following a tutorial and when the youtuber used it, it didnt show any errors
please ping me if you respond
also i am using pycharm
what python interpreter are you using?
i think you mean __name__
yea that is a good point
link to a good source is: https://projects.raspberrypi.org/en/projects/python-web-server-with-flask/1
they go into detail on how to build a basic site
why is it when I use selenium, I get booted off of this site: https://www.yeezysupply.com/ once I click any elements on the page? does anybody have any good resources on website's authentication? (sorry if this is wrong channel)
Noob here, want to create a server-client where client users on a seperate network can send simple text strings to a host machine!
Python Tutorial: Network Programming III - SocketServer, Server & Client
This is about the simplest way to do it
why is it when I use selenium, I get booted off of this site: https://www.yeezysupply.com/ once I click any elements on the page? does anybody have any good resources on website's authentication? (sorry if this is wrong channel)
@thorn jolt you can't ask for help with sneaker bots, its against rule 5
This is about the simplest way to do it
@thorn stratus Thanks, will try to comprehend that ๐
guys! how can i listen to ports that ethernets are connected to? for example if i get two raspberry pi's and connect with ethernet. How can i query the ips connected to one of the pis?
I know once i have the ip i can use requests.get("") as client and flask as server
Why can't you just grab the IP from the flask server
because localhost is not available from another raspberry
and I can look it up with bash in raspbian but I am trying to learn in python so I can automate it and not have to look up the ip for all 5 raspberrys
Well it's not something easy to automate
yeah i think im going to run bash command from python
that may be ok solution for now
You can scan your network, but that still wouldn't tell you what is what
right.. I am thinking about purchasing a switch to connect em all
Using static IPs would be the easiest solution
yeah but the point is im too lazy to keep looking up ips and writing the ip manually
as i add more and more raspberries
Yeah that's what static IPs could fix
oh really?
You know raspberry pi #5 is at 192.168.1.5 or something like that
#6 at 192.168.1.6
Lots of different ways to do IP schemes
interesting... I wonder if it will add one as external ip after connecting to a switch
i can pip install https://pypi.org/project/lanscan/
@lusty ermine you can try something like this http://zguide.zeromq.org/py:udpping1
OMG ty!! thats exactly what I was looking for
@cobalt herald your a good one man im bookmarking this link
what are some networking projects
that i can do with python
make a mini http server
make a higher level http server on a existing low level one
interact with WSs etc...
WSs ? @gloomy root
Websockets
TCP would be much better for something like a communication server right
TCP grantees that all the data sent will get to the recipient and in the same order they were sent
UDP for speed like Video streaming or Game streaming for example
TCP for messaging etc...
implement TCP style insurance on top of UDP
On the subject of TCP: TCP can have some really bad performance over wireless links. This is because in wireless you can get these things called burst errors (heavy sporadic interference causing multiple packets to drop in rapid succession). TCP interprets this as heavy network congestion and decrease its sending speed to play nice with the network. I know there have been work to improve TCP to mitigate this unintended behaviour but many applications still use an UDP approach instead. What you do is use UDP with an application layer protocol on top which handles the stuff TCP usually do.
Help
I got a simple server-client program working on one machine, now I transferred the client to another machine on the same network
I changed the HOST to my Server machines ipv4
However I get an "Winerror 10060 A connection attempt failed because the connected
party did not properly respond after a period of time, or established connectio
n failed because connected host has failed to respond"
Did you already try it with firewalls turned off
Did you already try it with firewalls turned off
@thorn stratus Yes
private ipv4 or public
private ipv4 or public
@thorn stratus private atm. Will switch to public after I get this working
can you ping the ip?
can you ping the ip?
@wraith grove wdym
@thorn stratus UPDATE: I got Error 10061 No connection could be made because the target machine actively refused it
This problem is really weird
what could be refusing the connection
A firewall usually
Yep theyre all disabled
Anyone willing to try my code on their PC or is that not possible
Has it got anything to do with port forwarding?
I have a port forwarding setup for a separate server
If your on your own network with no NAT in the way then no
Fair enough
@tidal matrix your IP isn't 127.0.0.1 is it? Lol
They won't
They dont make a diff*
Thats on the server side
The client points to my server machine IP
What ip is your client pointing to
192.168.0.89
Ok, what port are you bound to server side
CLIENT:
HOST, PORT = "192.168.0.89", 9999
SERVER:
HOST, PORT = "localhost", 9999
Thats how I have it setup
Ok, you can't bind the server to local host
Yea I left that as it was lmao
Have to either bind to '0.0.0.0' or to '', but quad zero is more explicit
On the server that is
Ah ok
Then the client can point to your .89 address
Hopefully its a stupid mistake like that ๐
I'm just starting this whole networking thing aha
Localhost is reserved for intra-machine comms and will never be routable outside of itself
Hoping to have a small server for a few people with a special strip system used in airports, for realistic simulations of airport ATC. A pilot would have the client and the ATC is the server. I am fine to do everything on either side just transferring the data is my problem
Actually, the whole 127/8 block is, but you don't see much else outside of 127.0.0.1
Ahh ok
The name localhost suggests it
I thought its probably not listening outside the server but didn't know what to replace it with
And for this use case TCP would be my ideal choice
0.0.0.0 means "all outward facing interfaces"
Ah ok
I have a small game server setup for this simulation etc etc but I just had to port forward that and was done ๐
You could bind to the IP specifically, but if you are doing DHCP, that'll be a bug to hunt later in life
Yes indeed
While we are at it, any tips for connecting the client to the server
Let me explain a bit more
The client has to connect to my public IP from another network correct?
Correct
However my router changes public IP if it goes down
Or a DNS name, but that'll resolve to your pub
Ah
So the issue is if it points to my public IP then it may change, or so I believe
It can, my ISP threatens that to, but I've never had my IP change lol
But it's good to plan for the case
So you need a dynamic DNS updater
Ah ok. I have never seen it either, but they do say that if its down for a while or reset it'll use a different one
Ah ok
I've written several for different services over the years, but the https://domains.google.com synthetic records are my favorite because it's so easy
Find your place online with a domain from Google, powered by Google reliability, security and performance.
The cloudflare API is pretty easy as well though
And I think there are some DNS companies that have their own tools for that
But I don't know them
Ah ok
The "API" for Google synthetic record updates is literally just a url (so it's easy to automate a thing that "updates" the record every 15 minutes)
Most of the time, I just set up a cronjob with a curl command
If you go the cloudflare route though, I have a thing I wrote in go to do that lol
Wdym
It's a dynamic DNS updater for DNS hosted in cloudflare
Felt kind of advertise-y, so if you want the tool, I'll DM you
Felt kind of advertise-y, so if you want the tool, I'll DM you
@vernal surge haha that's fine, sure DM me ill check it out
What's the problem
It closes early?
I can help if its not to do with networking ๐
@ember ledge it's because you define server with caps, but do a bind with it lower ... The capitalization matters in python
@ember ledge also, your start function shouldn't need to call itself
Think through it a bit, give us your proposed fix, and we can help. I'm not one that is going to just do it for you โบ๏ธ
Thank you @vernal surge it works now!
@tidal matrix good deal
Always lol
Will I be able to compile this basic server script into an exe with pyinstaller
That I don't know. I don't use python for compiled binaries
Fair enough
Implementation would be better with something like C++ for what I'm doing but I ain't too good with that
pyinstaller should work fine I think
Fair enough, but I am not familiar at all with them ๐
pyinstaller should work fine I think
@shy pebble Was thinking so just confirming
Does pyinstaller literally just wrap python in a binary? Like, dependencies and all? I legitimately don't know anything about it.
And I question if (assuming you are not writing threaded it async code) the GIL still plays a factor in the end binary or if it is distributing the low level C code rather than the python
I think it pretty much just sticks the python interpreter, your code and a simple exe that handles unpacking and running it/
Ah, so no dependency handling
well, you just tell it what dependencies to include, but it does not download them at runtime as far as I know
Interesting, GIL question still stands lol
it is no different from just running python normally (except sometimes missing stdio), so the GIL is still there
Also, from what I remember from back in the day, getting EXEs were fairly simple, but what about "Linux/amd64|i386" or Darwin binaries?
it cannot cross compile, but I think it supports anything with a C compiler. But that would require testing
:+1:
I'll read more on it, I just didn't know the high level details :D
Feels like a decent enough stop-gap until you get around to learning a compiled language.
I'm all for the "use it until you can't" mentality :)
Hey
In terms of keeping my server safe
What can I do
Because even if the people who have the client seem nice, I can never be sure
And the server will run on my standard residential network
@tidal matrix lol question of the last two decades lol
Lmao
Look up the OWASP top 10, they have a lot of examples of how to secure the 10 most common, exploitable web things
And on server side, there is a lot you can do. Not least of all is keep your server up to date on patches, don't use EOL operating systems, and Google a general server hardening guide for your operating system
Networking wise, it's best to use a firewall that can do more than just port filtering, but in a residential context, it's unlikely you will have something like that.
(I use to run my own ISP, so I'm an outlier lol)
Also, don't just expose the python web server or use IIS. Generally speaking, use a proxy like Apache or Nginx to do the exposure, because they are a lot less susceptible to web based attacks (assuming you use the best practices and hardening guides)
Also, if you are using web sockets, then you are already subscribing to the RPC paradigm, so you really need to make sure your functions that clients can call don't do things you don't expect ... This is the hardest part ... So doing things like fuzzing and chaos testing helps alot.
Additionally, make sure you are throughly testing your code before deployment so you can catch unit and e2e level mistakes before a bad actor can.
</WallOfText>
I'm a firm subscriber to the zero trust model lol
And don't get me started on authentication lol
Anyway, hope that helps @tidal matrix
This is why security is a career path in and of its own
And not to mention, the threat landscape changes hourly lol
Hey is anyone good in making packets with python raw sockets
!ask
Asking good questions will yield a much higher chance of a quick response:
โข Don't ask to ask your question, just go ahead and tell us your problem.
โข Don't ask if anyone is knowledgeable in some area, filtering serves no purpose.
โข Try to solve the problem on your own first, we're not going to write code for you.
โข Show us the code you've tried and any errors or unexpected results it's giving.
โข Be patient while we're helping you.
You can find a much more detailed explanation on our website.
@serene halo
I've written several for different services over the years, but the https://domains.google.com synthetic records are my favorite because it's so easy
@vernal surge could you give a little help on how this works
Find your place online with a domain from Google, powered by Google reliability, security and performance.
@tidal matrix sure, I'm not at home right but, but I will when I get back
Sure
@tidal matrix I assume you have a domain?
@tidal matrix I assume you have a domain?
@vernal surge I do
Who did you register it with? Google?
Lol, GoDaddy is global my man
But GoDaddy doesn't have a solution they provide, but it would be easy to build a solution with their api
Otherwise, you would need to transfer the domain (which isn't free) to Google to use their synthetic records.
I'm glad to help you build something, or I could whip something up pretty fast for you.
Who's?
You mean using their DNS/name servers?
I've not had much luck with synthetic records just using NS records
Who's?
@vernal surge Mine even
Hosting my domain on their server would make the target IP theres?
Makes sense
No, domains just allow you to point the name wherever
It can be in their data center, but can also be your house lol
When a computer tries to find your domain it has to contact the DNS server that knows where it is
So all you are doing is changing which DNS server tells you where it is
The A record inside that DNS zone is what actually stores where your domain goes to
Ah ok which would be my house
Yep
And yeah, if you IP changes, you need a service to update your provider when it happens
And how would I do that
With go daddy you to have to build something or use noip, but noip is convoluted
I'm sure you could find something prebuild on GitHub, but I don't know of anything offhand
I like to make those things myself though as a refresher for certain skills and languages lol
Ah ok
I actually just wrote one for an iot project I'm working on lol
But it's for an STM32 board lol
It's called ddns
There are a lot of things that do that for you
https://www.dynu.com/ here's one ddns provider
@serene halo
@wraith grove Thanks
Are you not gonna ask your q?
Honestly not sure if helping with packet forging is against the rules or not though. Would depend on context.
@vernal surge So say I got a new domain from google, and I setup a custom record that points to my server IP, could I make my client point to the domain, which would then indirectly connect it to my server?
Sorry I'm very new to networking aha
well, you don't need a new domain (unless you want one lol)
Yea because my current domain is expensive and for a store I used to run which I dont anymore
but yeah, that is exactly how DNS works ... the thing in question was the dynamic-ness of your home IP
Ah, would I manually be able to change it?
i think i remember you saying that it doesn't really change all that often ... so i might be trying to prematurely-optimize things lol
By changing the destination DATA IP in the record
yes
Yea never changed for ages
but yeah, you can manually change it
However I will be switching ISP sometime in winter so
Ah ok
Cool thats exactly what I wanted to know
Thank you!
Also does the domain ending matter a huge amount or not
not really ... only for advertising purposes (like ... people tend to default to ".com" when they type things in the address bar), but so long as people know it's a ".xyz" or whatever, it really doesn't matter
the only ones that matter are the "secure" domains, like ".app" and ".dev" that require you to run a secure server
Ah ok, wondered why those two are more expensive
But thank you for the help!
I will find a simple tutorial to use but should be straightforward
basically, you just add an "A" record with whatever alias you want (e.g. www) that points to your IP address
or if you use NOIP or something like that, you set up a CNAME record that points to the other URL
A is easier, and probably best for your setup
Ok cool
if you notice your IP changing, then address it then
Also quick Q, how many clients could I practically connect to the server
Does it depend on bandwith
if you notice your IP changing, then address it then
@vernal surge Ok
yeah, a few things ... bandwidth / server resources
your server will probably clap out before the bandwidth
lmao
concurrent connections wise
realistically, on consumer hardware, on a consumer ISP, i would be surprised if you get more than 100
without benchmarking though, i have no real idea
Yea max would be 20. The server machine is quite powerful too as it was my old PC
But ofc not as powerful as normal server machines
its your framework and code that makes the diffrence aswell
Yes, the code here is simple af
How well your framework or server can actually use those reasources
All the server is doing is receiving strings from clients. Thats it.
100 concurrent connections is regarded as 'low' for a framework or server thats being tested or put into th real world so you should be fine
simplicity isn't really the question lol, but how the code uses multiple threads or async ops (if at all)
i can write really simple, really poorly performing code ๐
It currently doesn't but I will make it so it does
honestly for 20 users i dont think youll have an issue

Like a sync based system using 1 thread can still chill with a few hundred connections a second and concurrency
Aha yes. I programmed a mini auto-landing rocket (irl) the other day in C++ and even that relatively simple loop code could be massively optimised
Yea thats all that I would have. Thanks!
Oh one more thing, I saw a few people constantly closing the connection with the server after sending a string. This I assume has no benefit?
It has a massive server side benifit
Really?
If the connection is kept alive the server has to keep using that thread or keep blocking other requests in order to keep it alive
I thought it may reduce massive load when not being utilised
But thought thats quite a simple thing
if the server is able to drop that request after its done it free's stuff up to handle other requests
generally, tho you'd want to check to see if the client hasnt disconnected alreadyu
We got another problem!
Will using my public IP in the client only work if the client is currently connected to a different network to the server
Nope, should work either way
it will go out to your router, your router will say hey I know where to send that, from the port forwarding rule
then it will work like normal
Not entirely true @wraith grove ... some older routers (and even some new ones) needed rewrite rules to point to the internal address instead of the external (based on Origin filtering ... if it saw a packet come from itself, which is the case, it would filter it because "that isn't common")
but generally speaking, yeah, unless it doesn't work, assume it will ๐
Hmm cause I tried it and I'm getting the same 'actively refused it' error when using public ip
Do i need a port forward rule setup for this?
yes
But what forward to what
in your router, just set a rule that points <whatever you want the external port to be> to <whatever your service port is>
i don't remember the port, but i think i remember you doing 9999
yes
My external port can be the same or no
yeah, it can be the same
Ok but I must do the port forward for it to work
And then the client port is also 9999
yes, a port forward must exist if you want it to work outside your own network
don't worry about setting the client's outbound point, it'll get a dynamic one when it goes out
Ok, so if I use a client in the same network that points to my public IP, will it be registered as an external signal coming in
depends on what your router does, but maybe
if it does any level of intelligent routing, you probably won't see an external client, but if not, then yeah, it'll go out and then right back in and it'll look like it came from your public IP
It works ๐ฅณ
@tidal matrix hooray
have anyone experience doing web sockets with a RDS database like postgres or MySQL?
looking for a way to integrate the two via python
@serene halo move your Q here and we'll have a look at it
here is lib i am using
from genpack import *
from random import randint
test=TCP(randint(1, 65535),80).pack(b"192.168.0.243",b"192.168.1.1")
print(test)
her is my code
and its showing me error
Traceback (most recent call last):
File "C:\Users\mayan\Desktop\testing.py", line 627, in <module>
test=TCP(randint(1, 65535),80).pack(b"192.168.0.243",b"192.168.1.1")
File "C:\Users\mayan\Desktop\genpack.py", line 154, in pack
tcp_checksum = checksum(psh)
File "C:\Users\mayan\Desktop\genpack.py", line 15, in checksum
s+= ord(data[i]) + (ord(data[i+1]) << 8)
TypeError: ord() expected string of length 1, but int found
i guess its because i am using this in win and may be it only works in linux socket
uhhhh
it should work ๐ค
try passing things as strings
not bytes
because ```py
checksum(b"abcdef")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 5, in checksum
TypeError: ord() expected string of length 1, but int found
checksum("abcdef")
53973
that checksum function is iterating over the bytes in that bytes object, but it doesn't give characters like the checksum wants (though it should be quite easily transferrable)
!eval ```py
print("> BYTES")
for a in b"abc":
print(a)
print("> STRING")
for a in "abc":
print(a)
@cedar forum :white_check_mark: Your eval job has completed with return code 0.
001 | > BYTES
002 | 97
003 | 98
004 | 99
005 | > STRING
006 | a
007 | b
008 | c
you see?
that make sense leeme try
i see but i guess checksum should be in int, i am trying it first time
Yeah, checksum should be (and is using that function) an integer
!e ```py
def checksum(data):
s = 0
n = len(data) % 2
for i in range(0, len(data)-n, 2):
s+= ord(data[i]) + (ord(data[i+1]) << 8)
if n:
s+= ord(data[i+1])
while (s >> 16):
s = (s & 0xFFFF) + (s >> 16)
s = ~s & 0xffff
return s
print(checksum("Hello, DiceOfDeath!"))
@cedar forum :white_check_mark: Your eval job has completed with return code 0.
64580
No problem, was it just the strings after all?
yes string not bytes i was sending bytes data
Makes sense, glad you fixed it!
!e
def checksum(data):
s = 0
n = len(data) % 2
for i in range(0, len(data)-n, 2):
s+= ord(data[i]) + (ord(data[i+1]) << 8)
if n:
s+= ord(data[i+1])
while (s >> 16):
s = (s & 0xFFFF) + (s >> 16)
s = ~s & 0xffff
return s
print(checksum(b"Hello, DiceOfDeath!"))
You are not allowed to use that command here. Please use the #bot-commands channel instead.
I'll run it ๐
thanks for your help
!e ```py
def checksum(data):
s = 0
n = len(data) % 2
for i in range(0, len(data)-n, 2):
s+= ord(data[i]) + (ord(data[i+1]) << 8)
if n:
s+= ord(data[i+1])
while (s >> 16):
s = (s & 0xFFFF) + (s >> 16)
s = ~s & 0xffff
return s
print(checksum(b"Hello, DiceOfDeath!"))
@cedar forum :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 13, in <module>
003 | File "<string>", line 5, in checksum
004 | TypeError: ord() expected string of length 1, but int found
thats the same error becayse if bytes data
yeah
thanks again xD
No worries hah
ah finally i find a better solution cause sending decode data in function creating problem
python3 already return int from but not python2
so is ```python
def checksum(data):
s = 0
n = len(data) % 2
for i in range(0, len(data)-n, 2):
s+= ord(data[i]) + (ord(data[i+1]) << 8)
if n:
s+= ord(data[i+1])
while (s >> 16):
s = (s & 0xFFFF) + (s >> 16)
s = ~s & 0xffff
return s
print(checksum(b"Hello, DiceOfDeath!"))
error is because we are passing int variable to ord
solution just remove ord
def checksum(data):
s = 0
n = len(data) % 2
for i in range(0, len(data)-n, 2):
s+= data[i] + (data[i+1]) << 8
if n:
s+= data[i+1]
while (s >> 16):
s = (s & 0xFFFF) + (s >> 16)
s = ~s & 0xffff
return s
How do you shutdown an aiohttp web.Application?
await app.shutdown() doesn't work and throws RuntimeError: Cannot send non-frozen signal.
Please ping me if you have an answer, thanks!
hello guys
it might be a simple question. sorry im new to python and everything
is there a way for paramiko to save show run hostname name as my text file name?
@solid iris I guess that means you are saving all output to a txt file?
yes
can i ask why? lol
@keen pawn how is that related to the channel?
Was looking at cloudflare etc
Cloudflare seems really nice and advanced, but not needed for me
The ddos protection is also good
@tidal matrix always lol
Setting it up to do what exactly
Right, do you have a domain there?
Yep
Ok, then you just go to the DNS section and add an a record
Unless you want to do a synthetic record
I understand everything on that page apart from the CNAME and A things
A points right to an ip address
A synthetic record seems easy but I would like to the custom record
Cname points to another domain name
Ah
Normally, you don't need to worry about ttl
Unless it complains (in which case, set to 300 seconds)
Yea
@ is the "self"
which is
If your domain is "jray.dev" then the @ record responds to any protocol not pointing at a specific record (e.g. http://jray.dev)
Otherwise, you need a resource record
I tend to tell folks starting with DNS not to worry about that and just name it
Such as WWW
Ah ok cool
Technically, you could have www and @ point different places, but that's not really done lol
you might want to worry about ttl
high ttl = less queries but any changes will take longer to propagate, low ttl means the opposite
And the name of the record is the subdomain of the zone it is
so if the name was mail and the zone's domain was example.com, then the record would describe mail.example.com
Ah ok makes sense
Also is it worth using the free cloudfare ddos protection?
Just requires changing the nameservers
Cloudflare free ddos is not super useful in a real ddos scenario, but it's better than nothing
@wraith grove and not that I mean it's not important, but for what he is doing, it's not lol
Cloudflare free ddos is not super useful in a real ddos scenario, but it's better than nothing
@vernal surge Yea just adds another small protection.
And even their low paid version is much better than something like AWS Shield which I was looking at
Of course I would do many network upgrades before upgrading to a substantial ddos protection and when I expand to take upto 100 clients in one go.
But the risk even for 100 clients is very little
Hmm my WiFi has just crashed and isn't reconnecting
Wonder if its related ๐ค
I dont think that's technically possible though
can any one explain some python basic socket stuff -- can you PM me
Why not go through any tutorial or the docs, try to make something, and ask questions here when there is something you don't understand
Someone's looking for help with paramiko in #help-peanut if anyone has time to take a look.
Maybe someone with more sFTP knowledge than myself can help. If I'm on the same LAN as my sFTP server, is there any benefit to connecting with the public ip vs the local ip?
Speed wise it appears to be the same. The only difference I've noticed is that if my internet connection drops, then I can't connect to my sFTP server if I used the public ip. Am I missing something else?
if you aren't using it from outside the local network, you should just not port forward and use it from the private ip
otherwise I don't think it makes much of a difference, but usually you would use the private ip
if it makes things more convenient with like dns and stuff though the public ip is fine
Got it, thanks a bunch. It was just about dns convenience ๐
What will I have to change in my original code to get this new domain working? My client currently points to my public IPV4 and everything works fine. Do I only need to change the IPV4 to my domain in the client, or is there more I need to change?
@ember ledge Be patient, you posted your question 2 mins ago. Noone here is obliged to help you, they are doing it out of their own kindness
It will take some time for a response
@ember ledge its because you didnt define 'server'
Instead you put capitals 'SERVER'
Change everywhere it says SERVER to server
Then tell if its works
Yes put all to small
You are not allowed to use that command here. Please use the #bot-commands channel instead.
thx for the help i relly like it
@ember ledge No problem
What will I have to change in my original code to get this new domain working? My client currently points to my public IPV4 and everything works fine. Do I only need to change the IPV4 to my domain in the client, or is there more I need to change?
Im new here
@candid lion Hi new here, Im @tidal matrix
Emm I just started too ๐
ok
If it's anything extremely simple then yes but I'm not one to teach aha
@tidal matrix yes, all you have to do is change your client to point to the domain name
Shouldn't have to change your server at all
@candid lion that is a very loaded question lol. What do you want to know?
Haha ๐
Also, I assume you mean computer networking, but there are other types of networking (social networking, telecommunication networking, lol)
Lol true thing
I did telecom before computers, so I have the battle scars
And I still own a butset and a punch down tool just in case lol
@tidal matrix yes, all you have to do is change your client to point to the domain name
@vernal surge cool, I setup the cloudflare dns so it'll take upto 48 hours to change
So you have good knowledge in network signals like radio
@serene halo yeah, I do some HAM radio stuff too (I'm also a weather nerd lol)
Wow
@tidal matrix that is usually worst case, most folks that use primary DNS providers will see the change in less than an hour
My friend is also good in radio signal and idk how he got police radio signals lol
METEOROLOGY WOOO
@tidal matrix that is usually worst case, most folks that use primary DNS providers will see the change in less than an hour
@vernal surge ah ok
@serene halo police two way is easy to intercept. But most departments have scramblers (encryption) now, so they are usually in those channels
Aircraft comms is fun to listen to
Some would say that, I have my CCIE after all
Although, it's in security, not route switch, but I have a CCNP/RS so I'm ok I guess
I ran my own ISP as well
Until I got bought out
Are you ccnp?
Damn thats cool haha
U are a internet service provider
Nice
Where ?
I'm not anymore, a bigger company bought mine, so I don't do it anymore
Ah alrighty
So bro have you ever tried to generate packet ?
Like in python creating raw socket
And sending struct packet
I don't do that in python usually, but yes, I've done it
Das cool i got stuck in it
I am trying to create packet and its unfortunately not working
I don't do that in python usually, but yes, I've done it
@vernal surge in which langauge ?
Ruby if I want to share it (because metasploit) or Go/Rust if I'm doing it for real
Can you help me a lil and tell me whats my mistake if i will show you my code
Cause i am truly depressed now lol
Depends what you are trying to accomplish, I'm not going to help you hack anything lol
Honestly, what you are trying to accomplish I'm sure had already been done in metasploit
I would check that out
Or run Kali and go to town
No one does raw packet manipulation unless you have a purpose
๐
Just wanted to learn
Think if i only wanna spoof packets i can use other scripts and tools
But thats not the things
Yeah, I don't mind helping people learn security, and there are lots of places to do so online (https://cybrary.com) but I'm not going to hand-feed a script kiddie without you knowing that you can easily go to jail, even for a simple mistake.
Not exactly something I'm going to get involved with in such an informal situation
Thats true
You can atleast tell me the learning source
Cybrary is good i have used it
I even have their certificate fir tcp/ip with 80%+
But its been year i guess
Cybrary has a lot of courses
And does they use python cause python is my main language
If you really want to learn security, check out the Offensive security courses
And there they teach stuff like this rite ?
Yeah
Yeah, that way, when you do to jail, you can't say I taught you the technique ๐
They are just tools, but idk, I use 4 regularly, but I can write in 8/9
Which one ๐ฅบ
My main Languages are Go/Rust/Python/C ... But I can write in Ruby/C++/Java/C#/Haskell/Scala and less so a few others
Damn bro
Like I said, they are just tools
Ah, I forgot js and dart lol
32
And from when you started learning these things
Never too late to start
Cybersec in the US is at or near a 0% unemployment rate, so it's a great career to be in lol
Wow
Thats really a good stats
I guess i been doing this from 16
I first started with pen test
Then i dive into hacking and stuff
With programming
๐
Yeah, you can't do pentesting well unless you know how to do some Programming
True
If you can't simulate an APTs TTPs, then you are doing your customers a disservice and giving them a false sense of security
@candid lion that is a very loaded question lol. What do you want to know?
@vernal surge How to do networking in wireless network?
Move to c or c++
Change to monitor mode
And learn aircrack ng and all thei family tools
If you are talking about wifi networks

