Questions tagged [networking]
Networking is associated with creating and managing networks as well as adding network connectivity to a (set of) programs.
317
questions
2
votes
2answers
158 views
Getting metadata from MusicBrainz service
I've written a program which does the following things:
calls third-party utility to get mp3 file fingerprint
asks MusicBrainz IDs from AcoustID service
asks metadata from MusicBrainz for each ID
I'...
2
votes
0answers
32 views
MAC address-based presence detection
This code integrates with dweet and freeboard to produce a dashboard display of which occupants of a house are probably at home, based on the presence or absence of their phones' MAC addresses on the ...
0
votes
0answers
10 views
Basic Erlang chat server
Newish to both network programming and Erlang, and I'm not familiar with the best practices of either. I wrote a simple chat server to try and educate myself. If anyone could tell me how to improve ...
5
votes
0answers
71 views
Simple chat server in Python
I'm new to both Python and socket programming and figured setting up a simple chat server would be good practice. In addition to general critiques of the code, I have specific questions:
What are the ...
4
votes
1answer
92 views
Boost.Asio Server and RAII
I am trying to implement a network server application in C++ using Boost.Asio.
Here are the requirements I am trying to meet:
The Application creates only one instance of ...
1
vote
1answer
64 views
1
vote
1answer
46 views
Feedback on send/recv functions for non blocking sockets in client side HTTP library
I'm working with TCP sockets in C, specifically only for client side HTTP(S) requests, and would like to get some feedback on my send and recv code.
You can make some assumptions regarding my code, as ...
4
votes
2answers
73 views
Simplified Windows' tracert command
I wrote a simplified versions of Windows' tracert command as an exercise and to learn about TTL in packets. It shows the path that your internet traffic will (...
1
vote
0answers
38 views
ARP Spoofer to Set Up MitM and DOS attacks
This code "poisons" the ARP cache of victim computers. Given the IP addresses of hosts A and B, it will trick A into thinking that you're B, and B into thinking that you're A. This means ...
4
votes
1answer
58 views
Assemble network packet on stack for iovec
The recurring problem to assemble a network packet out of payload, sequence number, header, and other misc. information is mostly solved either on the heap (e.g. appending to a ...
3
votes
0answers
44 views
Simple SYN Port Scan Using Scapy
I decided to try writing up a port scanner to develop my understanding of Scapy. Here's a timed example of its use. The first two arguments are the address and range of ports to scan:
...
3
votes
2answers
204 views
Build byte array from multiple different types of data for sending over a network
The following codes purpose is to generate an array of bytes that represents some user defined data. This array of bytes will later be used for sending over a network.
...
4
votes
0answers
124 views
Clear-net browsing with Lynx over Tor
This project is designed to enable clear-net browsing over the Tor network with the Lynx web-browser. Currently everything seems to be functioning as intended, however, it would be most appreciated if ...
9
votes
3answers
130 views
Parse string into a struct
I'm writing a C application for the Networking course at the University.
Basically it's a UDP server that can receive two commands:
GET key
SET key value
That are ...
4
votes
2answers
460 views
Implementation of portscanner for a host
I have tried to check whether the ports of a host from port 0 to port 1023 is open or not. Could someone please review this code and provide feedback.
...
2
votes
3answers
126 views
I want to take away WebService call from UIViewController
I am using Moya to make network calls in Swift.
In my ViewController I am calling the WebService and creating a model from response.
...
0
votes
1answer
100 views
A common class for Client and Server [closed]
I have written this code to use TcpClient both from a client program and a server program.
Can you review this source code?
Kindly, take a close look at ...
4
votes
0answers
38 views
python network test application
I am working to a python application for some operational test on a Arista brand Network (more info here: https://gitlab.com/networkAutomation/pyateos)
I am the only one doing coding in my team so I ...
2
votes
1answer
67 views
Serializable and extensible API implementing the Command Design Pattern
I am currently trying to implement an extensible way to create commands that can be sent to some type of executor. In my case, there would be two of them (server and client). As I posted here, I had a ...
2
votes
1answer
91 views
Asynchronous TCP network server with a packet system
So I'm writing a game emulator and would like some advice after finishing the networking. It is designed to accept multiple connections, and process messages from all of them.
Here is just a brief ...
1
vote
1answer
41 views
Java implementing task on another thread with javascript-like promise resolve-reject
Background:
I have a TCP online multiplayer game server, which the player requests to log-in. However, the game server does not handle the authentication part of the login process, instead, it uses ...
2
votes
2answers
175 views
ICMP ping all hosts in a range
I'm creating my own little toolbox for pinging IP interfaces (for the test, only in localhost). In the future I'm thinking of piping the output to a text file. But I'd like to focus on improving the ...
2
votes
0answers
16 views
Auto re-connecting to a VPN on OS X and pointing Squid accordingly
We need to tunnel certain applications over a VPN at work. Ideally we would use a dedicated firewall/network appliance for this but the only permanent infrastructure we have are Mac Pro's running ...
3
votes
1answer
93 views
Token Bucket context manager for rate limiting async calls
I've written a class that implements something akin to the token bucket algorithm so that I may rate limit aysnc HTTP requests made from my application.
The code works but I'm still not sure if it ...
3
votes
0answers
42 views
Network connection monitor
I was recently in need of a class that checks if a computer has a valid internet connection, so I wrote one; however, I feel that there is a better way to do so and I just don't have the knowledge ...
3
votes
1answer
43 views
Network programming - asynchronous, single-threaded, nickname-only chat server
I am starting to learn network programming. I have implemented a very simple chat server based upon TCP, where the users only need to provide username.
The assumption is that the server makes use of ...
5
votes
1answer
552 views
Streaming Messages to multiple Clients
I wrote a server-client application in Python where the server sends a never-ending stream of messages to connecting clients.
I was in need for such an architecture since I want to retrieve and ...
2
votes
2answers
781 views
Simple subnet calculator and parser
I have started to learn Java for the past 20 days with no prior coding/comp science experience.
My brother gave me an idea to make a subnet calc/ping tool to enhance my knowledge and mentored through ...
4
votes
1answer
57 views
Send / receive wrapper for System.Net.Sockets - follow-up
I recently posted a question about improving thread and socket safety in my NetworkEndpoint class. previous post
I have implemented the changes suggested in the answer I got there. When I asked for a ...
6
votes
1answer
157 views
Send / receive wrapper for System.Net.Sockets
The following NetworkEndpoint class serves as a simple send / receive interface for either side of a network connection (client or server) when provided with a ...
3
votes
1answer
73 views
Small socket based packet Library
I'm currently writing a python script which needs some simple networking. After some playing around with sockets, this emerged, but as this is my first foray into sockets I'd really like a second ...
6
votes
1answer
130 views
Java objects for a network sniffer program
I'm working on a network sniffer program, whose structure uses 3 main classes:
Frame Class - One per monitored frame, holds reference to all the other sub frames
Parse Class - Holds the hex value of ...
5
votes
1answer
237 views
Enum for handling network request errors in Swift
I'm working on a new API written in Swift 5 and I wanted to play with the new Result. I wanted to know what you guys think about this syntax:
...
3
votes
1answer
79 views
API for multiple printer attributes [closed]
I have network printers which have different attributes (e.g. supported network protocols, languages, status, print modes).
...
2
votes
1answer
116 views
Script to get available IP automatically
Recently I made a script to get available IP automatically. I was woundering if anyone can give me tips on how to make this code look better, preferably in a class and OOP. I'm gonna show the code to ...
8
votes
1answer
1k views
Python scanner for the first free port in a range
I have a distributed application (YARN), which runs a WebApp.
This application use a default port to start (8008), before I start I need to check if port is in use.
A container may run in the same ...
1
vote
1answer
42 views
Page download with reattempts in Scala
I wrote the following code to deal with possible network problems.
...
2
votes
0answers
106 views
Web server using syscalls in Go
I'm new to Go and wanted to implement a web server using system calls to get a better feel for how everything works.
I'm looking for feedback on idiomatic go especially error handling and using ...
2
votes
1answer
348 views
C# Async/Await networking server
I made a simple async networking server and I'd like to get some input on the code, whether things can be done better and whether the code is stable (able to hold more than 1000 connections without ...
4
votes
0answers
620 views
dynwg: A DynDNS watchdog for WireGuard via systemd-networkd
Preface
I'm using WireGuard as a VPN solution to connect a remote client permanently to my home server.
Unfortunately due to Consumer DSL-related IP address changes, the client loses the connection ...
8
votes
1answer
1k views
TCP client and server API
I made a server and client API for TCP connection. It is intended to shorten the work you need to do to prepare the server and client.
It's separated into 3 projects - ...
7
votes
1answer
3k views
Non-blocking TCP and UDP in Unity3D Game Engine
I would like constructive criticism of a networking plugin I've written for Unity 3D. The use-case of the code is for people in "creative coding," where simple TCP and UDP messages are used for ...
4
votes
1answer
260 views
Looping through multiple regex efficiently
I'm writing a program that adds all network interfaces with multiple parameters to a list.
I have written the following code, which should work out of the box on any Linux system with Python and ...
1
vote
1answer
452 views
C++ game server
I'm writing a server for an MMO game using boost::asio. I would like to know, are there any design or other issues in my code? And what should I improve in it? Thanks in advance.
BaseServer.h:
...
7
votes
2answers
6k views
Add and enable/disable Windows Firewall rules with Python
I have this following module using for adding and enabling/disabling Windows Firewall rules using Python.
I currently use subprocess.call to execute the ...
2
votes
1answer
116 views
Java League of Legends ping checker
I'm still a freshman and this one of my first projects I made using Java and Swing.
The program is a simple League of Legends multi-threaded ping checker that pings the server 10 times to get an ...
2
votes
0answers
179 views
Batch file that checks for wifi connection - reconnects if no internet
There is a remote Windows PC that has access to "landline" unmetered WiFi and there is a Verizon 4G LTE MiFi (metered WiFi) as backup. This script checks to see if the PC is connected to any WiFi, ...
5
votes
2answers
371 views
CloudFlare Dynamic DNS Update Script in Python 3
I have a computer that roams, but needs to have an FQDN attached to it for certain reasons such as email system integrations or testing email via a testing SMTP server that requires valid FQDNs and ...
2
votes
1answer
309 views
PyCat: a netcat implementation in Python3.x v2
This is a follow up question from this question
Intro
netcat is an all-round tool used with many applicable features
My last try felt a bit rushed, and should've improved before posting here.
But ...
7
votes
2answers
227 views
PyCat A small implementation of netcat in Python3.x
Intro
netcat is an all-round tool used with many applicable features
I was playing around with sockets and openssl, and decided I should build my own.
It works as expected, but my code feels a bit ...