As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [networking]

Networking is associated with creating and managing networks as well as adding network connectivity to a (set of) programs.

Filter by
Sorted by
Tagged with
3 votes
1 answer
54 views

Access integer field in network packet

I see three complexities in accessing (reading/writing) integer field in network packet. Handle endianness. Integer in network packet is big-endian (BE). The host may be either big-endian or little-...
Lingxi's user avatar
  • 828
5 votes
1 answer
160 views

Python script that identifies the country code of a given IP address

This is a Python script I wrote to identify the country code of a given IP address, using data obtained from tor. It uses geoip.txt to identify country code for IPv4 addresses, and geoip6.txt to do so ...
Ξένη Γήινος's user avatar
5 votes
3 answers
135 views

Socks4 Client/Server implementation

I implemented a basic Socks4 client and server which can handle CONNECT requests only right now also without identfication protocol support. I've tested it with a ...
mortytheshorty's user avatar
4 votes
1 answer
155 views

Python script to check network speed

This is a Python script I wrote to check internet download speed and upload speed. I wrote this because I live in China behind the GFW, and I use VPNs to browse international free internet, and my ISP ...
Ξένη Γήινος's user avatar
10 votes
5 answers
756 views

Follow Up: struct sockaddr storage initialization by network format-string

This is a follow up to: struct sockaddr_storage initialization by network format string First of all thanks to @Haris, @Toby Speight, @G. Sliepen and @chux - Reinstate for their help. I learned a lot ...
mortytheshorty's user avatar
8 votes
3 answers
549 views

struct sockaddr_storage initialization by network format string

I am writing a wrapper library for network functionality in C and wanted to let the user let the user initialize a struct sockaddr_storage with a format string. Format ist like: "proto:host:port/...
mortytheshorty's user avatar
3 votes
3 answers
130 views

Follow up: A chat server using the select() API

This is a follow up to my last question: Multiperson chat server using the select() API Changes: After much fine critique, I made the following changes to the code: Removed redundant casts and ...
Haris's user avatar
  • 1,121
11 votes
2 answers
1k views

Multiperson chat server using the select() API

I followed the Beej's Guide to Network Programming. The program acts like a multi-user chat server. One connects and sends a message to the server, which is forwarded to all that are connected. There'...
Haris's user avatar
  • 1,121
5 votes
2 answers
299 views

Tiny Network Web Framework / Library in C++

I recently wrote a tiny network library in C++17 called Turtle on Linux and wish to seek some improvement advice on how to further develop it. Any insights would be appreciated. Origin: As a student, ...
I Love Turtle's user avatar
3 votes
2 answers
109 views

Forward TCP packets from one connection to another

I am new to Rust but well versed in Go. I have written the following program which initiates connection to the remote-addr and starting a thread to listen to the ...
Nick's user avatar
  • 131
0 votes
0 answers
178 views

Happy Eyeballs with Scala Futures

This is my take on Happy Eyeballs in Scala, but I don't like the outcome. However, I was unable to come up with something "better". The requirements for the code are must close all created, ...
Flow's user avatar
  • 103
1 vote
1 answer
2k views

Brute-force cracking a wireless network password

I am working on my first brute force experiment and I modified code from this SO post but it is kinda slow. Are there any improvements I can make to make it run faster? What the code basically does is ...
seriously's user avatar
  • 153
1 vote
1 answer
152 views

A Tor-enabled daytime client

The following is a daytime client written in C that uses Tor to connect to a given daytime server. It assumes a Tor daemon is running on the system and that Tor can be reached via a specified UNIX ...
JohnScott's user avatar
  • 171
2 votes
0 answers
216 views

TCP&UDP Networking Library Design

Edit: This question is dead, so I am making an edit in hopes that someone who does have the time to look over my code sees it. If you have any way for me to improve this question/ask some other ...
Jakob Tinhofer's user avatar
3 votes
1 answer
238 views

Find proceses listening on the network outside of default package manager v2

So this is a follow up questions to Find proceses listening on the network outside of default package manager I managed to make it a little faster thanks to using ...
N3buchadnezzar's user avatar
4 votes
2 answers
355 views

Find proceses listening on the network outside of default package manager

I have been tinkering with a script that should list things that are listening on the network, but are not part of the base packaging manager. Currently I have only done support for fedora and debian ...
N3buchadnezzar's user avatar
4 votes
1 answer
199 views

Linux netlink kernel socket arp cache getter (similar to ip ne)

...
legale's user avatar
  • 141
3 votes
0 answers
168 views

First Lua program - Print external IP and VPN status

I started learning Lua yesterday and wanted to write a quick program as a practice. It queries an external service for the IP address and country code, and naively check for the existence of network ...
luanoob's user avatar
  • 31
9 votes
1 answer
983 views

Porting C-style socket to CPP class

I am porting the C-style socket to design a simple wrapper around the telnet client in CPP. The telnet protocol is accomplished by using libtelnet in C. The C-style code for this wrapper is reviewed ...
ravi's user avatar
  • 429
1 vote
1 answer
76 views

API call to list top stories using dependency injection in iOS with MVVM

I'm currently trying to find out what's the best networking architecture for MVVM applications. I couldn't find many resources and decided to go with dependency injection based architecture as per the ...
Tharindu Ketipearachchi's user avatar
0 votes
0 answers
39 views

Does this HTTP library API make sense for handling small in-memory message bodies as well as large stream-based messages?

I'm writing a HTTP server and client in C++20. It started with a simple API, string call(string url) which worked great for another project. The API uses implicit ...
LePain's user avatar
  • 1
1 vote
1 answer
107 views

Simple networking framework in C++

Question: What do you think about this design and the implementation? This is a simple networking framework for IPv4, IPv6 TCP client and TCP server for Linux and MS-Windows in C++14. It uses a single-...
Andre Adrian's user avatar
3 votes
1 answer
99 views

Simple networking framework in C

Question: What do you think about this design and the implementation? This is a simple networking framework for IPv4, IPv6 TCP client and TCP server for Linux and MS-Windows in C. It uses a single-...
Andre Adrian's user avatar
1 vote
1 answer
145 views

NTP client displaying reference, originate, receive and transmit timestamps periodically with graceful shutdown in C#

based on this stackoverflow topic: https://stackoverflow.com/a/12150289/15270760 I have decided to create a simple NTP client displaying difference between NTP server response and DateTime.Now called ...
Artur's user avatar
  • 169
2 votes
0 answers
256 views

Networking code for a Golang P2P library

I am working in a Noise-based P2P lib that has only basic TCP networking implemented so far. I am looking for anyone who get interested in this project that want to helps with reviews to the code and ...
Geo's user avatar
  • 21
3 votes
2 answers
822 views

Multithreaded tcp server accepting two clients with task factory and graceful shutdown

as an exercise from multithreading and networking I have decided to create my own implementation of TCP server accepting connections from two clients (which is I think a pretty common case e.g. chess ...
Artur's user avatar
  • 169
3 votes
0 answers
215 views

boost-asio reverse proxy

I wrote reverse proxy using boost::asio. The idea is to send client's data to two external servers and send back response from one of them. Here is my code: ...
rudolfninja's user avatar
4 votes
2 answers
612 views

Bash-based Port scanner (/dev/tcp)

This question is ideal in my case: Ludisposed's python-scapy-tcp-port-scan-of-subnet - At codereview stackexchange But this is not Scapy; nor Python(it might get used in the future though but that is ...
William Martens's user avatar
4 votes
1 answer
137 views

Online check with retry logic and anti-flapping

I've got a network device that doesn't hold its WiFi connection brilliantly and occasionally drops off the network completely. Although there are dedicated network monitoring tools out there, I ...
Gordon Mckeown's user avatar
1 vote
2 answers
121 views

IPAddress Range access

I want to make this code better and easier to read. It works now but I think it can be better. When there is an Inbound request I check to see if that accessKey is setup for IP address Range that will ...
Jefferson's user avatar
5 votes
1 answer
494 views

Task-based TCP socket wrapper class

Recently I've been entertaining the idea of making a small encrypted chat app as a way to learn about UI, encryption and networking in C#. After some research/work, I've produced the below protocol ...
SomewhereOutInSpace's user avatar
1 vote
1 answer
82 views

simple code that tries to establish tcp handshake. Creating tun device | what ever ip packets message comes try sending valid response.checksum&TCP

So I am getting packets from TUN interface and after that processing the packet, and then try to send correct TCP handshake response message. It does handle sequence and ack sequence handling but That ...
user786's user avatar
  • 145
7 votes
2 answers
98 views

Network utility tool

I wrote a little program in C based on some requirements: Ping every IP from a file and check the result Show, by network adapter, ONLY the IP, subnet, default gateway and DNS Check the speed between ...
Norhther's user avatar
  • 269
3 votes
1 answer
416 views

Creating a Client-Side Prediction and Server Reconciliation

Preface I have been trying to find out "How to make Client-side Prediction and Server Reconciliation" from scratch with an easy-to-understand code in C#. So I decided to make my own ...
ガブリエル Gabriel's user avatar
4 votes
0 answers
91 views

Barebones DNS Client in Rust

I'm starting to learn about networking and as a project I am building a really simple DNS client in Rust. Functionality to start was just to take a command line domain argument and sending a DNS A ...
matthewmturner's user avatar
2 votes
0 answers
43 views

Rust program to create mail.tm accounts

I have created a rust program to create https://mail.tm accounts, but I think there are things I could have done better. Are there things I can do to improve performance? Are there any unnecessary ...
cavalry1223's user avatar
1 vote
1 answer
3k views

How to continiously read data from a NetworkStream

So I'm currently learning about networking between a client and a server and I decided to try to write my own client and server. I implemented a way of receiving data and it goes as follows.. The ...
RileyDan's user avatar
  • 131
1 vote
1 answer
792 views

Program to continuously check availability of internet connection c#

I have a C# program to check if a hard coded host is available and if not, waits then checks again (this is a loop in form of recursion). How can it be enhanced? ...
user14773854's user avatar
1 vote
1 answer
69 views

Android APP FTP host profile class implementation

This is a follow-up question for Android APP connect to FTP server in Java. I am attempting to create a tiny FTP host manager with FTPHostProfile class and ...
JimmyHu's user avatar
  • 3,830
1 vote
1 answer
241 views

Gather all IP addresses of a host as a vector

I have the following working code to get IPv4/v6 addresses from host names: ...
Richard Neumann's user avatar
4 votes
0 answers
2k views

Android APP connect to FTP server in Java

I am attempting to build an Android APP with the ability to connect specified FTP server in Java. The connection operation has been performed in FTPconnection class ...
JimmyHu's user avatar
  • 3,830
2 votes
2 answers
262 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'...
Maxim Voloshin's user avatar
2 votes
1 answer
95 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 ...
user avatar
4 votes
0 answers
178 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 ...
JeremiahDixon's user avatar
4 votes
1 answer
499 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 ...
MarekR's user avatar
  • 141
1 vote
1 answer
107 views

Networking library for c++ linux

...
The Masked Rebel's user avatar
1 vote
1 answer
586 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 ...
Chase's user avatar
  • 197
4 votes
2 answers
320 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 (...
Carcigenicate's user avatar
1 vote
0 answers
85 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 ...
Carcigenicate's user avatar
4 votes
1 answer
131 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 ...
ernestum's user avatar

1
2 3 4 5
8