Giter Site home page Giter Site logo

arpchat's Introduction

arpchat

so... you know arp? the protocol your computer uses to find the mac addresses of other computers on your network? yeah. that.

i thought it would be a great idea to hijack it to make a chat app :)

built in two days because i was sick and had nothing better to do.

screenshot of the tool in action

motivation

  1. once a year, i'm on a client isolated network that i want to chat with friends over
  2. i'm completely insane
  3. i'm a programmer

(i swear, i might actually briefly have a use for this! it might not be entirely useless! ... and other lies i tell myself)

limitations

yes

things i made arpchat do

you can send messages tens of thousands of characters long because i implemented a (naive) generalizable transport protocol on top of arp. there's also a bit of compression.

if you wanted, you could probably split off the networking part of this and use it instead of udp. please don't do this.

not only are join and leave notifications a thing, i built an entire presence discovery and heartbeat system to see an updated list of other online users. ironically, part of this serves a similar purpose to arp itself.

for more information on how this all works technically, check out the little article i wrote.

running

if you actually want to install this for some reason, you can get it from the releases page.

on windows, you probably need npcap. make sure you check "Install Npcap in WinPcap API-compatible Mode" in the installer!

on linux, you might have to give arpchat network privileges:

sudo setcap CAP_NET_RAW+ep /path/to/arpchat

interface selector

then just run the binary in a terminal. you know it's working properly if you can see your own messages when you send them. if you can't see your messages, try selecting a different interface or protocol!

have any issues? that really sucks. you can make an issue if it pleases you.

building

you don't really want to build this. anyway, it's tested on the latest unstable rust.

on windows, download the WinPcap Developer's Pack and set the LIB environment variable to the WpdPack/Lib/x64/ folder.

cargo build

banner

arpchat's People

Contributors

kognise avatar proudmuslim-dev avatar skyfaller avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arpchat's Issues

Feature request: Push notifications

Lets say your colleague happens to be offline. What now?

You could ask them to get towards their computer, but that is lame and requires a bit of social skills. Instead we go for a overly complicated technical solution.

  1. Clients exchange MAC and IP information (despite not required for chatting)
  2. One of the machines in the "network" goes offline
  3. Other clients try to send messages but fail
  4. They send a regular directed ARP packet that will wake up the computer
  5. Try step 3 again and succeed (hopefully)

In case the machine doesnt have wake-on-arp supported in hardware, theres my shameless plug

Error: error getting channel, might be missing permissions

Hello,

I wanted to try out the program, but I noticed that it does not work for me, even though I set the appropriate permissions.

I try to run the program, select the network interface. Then I want to change the name and no matter what I press, it appears the message error getting channel, might be missing permissions.

(Same when running as sudo/root, same for selecting another interface)
(Compiled from git, compiled from v1.0.0 results in #9)

$ getcap /home/marek/.cargo/bin/arpchat
/home/marek/.cargo/bin/arpchat cap_net_raw=ep

Possibly switch to using latest pnet

Very cool program!

I changed Cargo.toml to use the latest version of pnet -

pnet = "0.34.0" 

This seemed to fix a small issue I go when running on my Pi, where the channel couldn't be created.

Use Ethertype reserved for experimentation instead of IPv4 Ethertype

i'm planning on experimenting with and adding settings for different arp packet types, since some routers might filter out the malformed ip packets i'm currently using.

Looking at the list of Ethertype values, it appears that 88B5 and 88B6 are reserved for experimentation. From https://standards-oui.ieee.org/ethertype/eth.txt and referring to 88B5:

Local Experimental EtherType 1 as defined in IEEE Std 802.  This EtherType
value is available for public use and for prototype and vendor-specific    
protocol development. 

I think it would probably make more sense to use one of these as the protocol type in the ARP packet instead of IPv4. Thoughts?

Duplicated messages on same host

Again! Really fun project! πŸš€πŸš€πŸš€

If you run two instances on same host you receive duplicated messages (ONLY on receiver side)

image

Env

cargo +nightly build
cargo 1.60.0-nightly (95bb3c92b 2022-01-18)
Ubuntu 20.04.4 5.4.0-104-generic

"Error getting channel" on linux (CAP_NET_RAW)

Really cool and fun project! Thanks! πŸš€

Issue

  • Run arpchat
  • Select interface
  • On any key pressing Error getting channel

image

Solution

Seems executable file should have CAP_NET_RAW capability and solved via:

sudo setcap CAP_NET_RAW+ep /path/to/arpchat

It would be good to add this to documentation.

Env

cargo +nightly build
cargo 1.60.0-nightly (95bb3c92b 2022-01-18)
Ubuntu 20.04.4 5.4.0-104-generic

Fandom

Just wanted to say... I'm a massive fan! I want to be you when I'm all grown up and things!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.