GithubHelp home page GithubHelp logo

tracyloisel / airchat Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chendo/airchat

0.0 1.0 0.0 23 KB

AirChat lets you chat to nearby users by abusing the AirDrop interface on OS X.

Ruby 100.00%

airchat's Introduction

AirChat

AirChat is a zero-dependency* P2P CLI chat tool that (ab)uses the AirDrop interface to allow chatting across WiFi networks (or no WiFi network).

A RailsCamp AU 20 project.

Screenshot

Features

  • Chat to other AirChat users in proximity without being on the same network
  • Self-contained - no gems, nothing else to download/install
  • Automatically keeps AirDrop active
  • Commands: /nick, /who, /me, /quit
  • User colours tied to their IPv6 address

Requirements

  • OS X with system Ruby 2+ with working AirDrop
  • Ruby 2.0 or higher (comes with OS X)
  • tcpdump (comes with OS X)

Usage

# Get it
curl -L https://github.com/chendo/airchat/raw/master/airchat.rb > airchat.rb && chmod +x airchat.rb
# or get someone to AirDrop it to you, etc.

# AirChat requires raw access to the /dev/bpf* interface.
# Run using sudo
sudo ./airchat.rb
# OR
# Give permission to /dev/bpf*
sudo chgrp staff /dev/bpf* && sudo chmod g+rw /dev/bpf*  # These permissions will reset on reboot
./airchat.rb

How does it work?

AirChat uses the awdl0 interface to talk to other machines with AirDrop active. However, OS X restricts binding to this interface, and non-AirDrop network traffic is rejected with ICMP Port Unreachable. AirChat gets around this by using tcpdump to receive UDP data, as OS X doesn't stop you from sending packets through that interface.

AirChat broadcasts JSON-encoded messages in UDP to ff02::fb on port 1337.

Caveats/TODO

  • Messages are transmitted in plain text.
  • No direct messaging
  • One channel only (you can specify a different port by modifying the source)
  • Message delivery is not guaranteed
  • No message repeater functionality

License

MIT.

ANSI RGB magic sauce from the paint gem.

airchat's People

Contributors

chendo avatar

Watchers

 avatar

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.