• Stars
    star
    168
  • Rank 223,750 (Top 5 %)
  • Language
    Ruby
  • Created over 7 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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.

More Repositories

1

lifx-http

A HTTP API for controlling LIFX devices.
Ruby
91
star
2

sense-api.cr

Crystal
17
star
3

buildkite-rspec-formatter

Ruby
16
star
4

drawrect

drawrect is a CLI debugging OS X tool that draws NS/CGRects on screen
Ruby
15
star
5

filepath

`which` for open files
Objective-C
15
star
6

geonames

A ruby wrapper for geonames database at www.geonames.org for importing country, prov/state, city info into your application database. (not my project, added for easier rails rumble stuff)
14
star
7

dmap-ng

An improved version of the dmap gem that allows really easy parsing and building of DMAP structures for DAAP/DACP projects.
Ruby
14
star
8

ObjCRubyMotionIntegration

A sample project that embeds Ruby classes via RubyMotion into an Objective-C project
Objective-C
14
star
9

BufferBuddy

An Octoprint plugin that aims to improve print quality when printing over USB by ensuring the buffers stay filled.
Python
14
star
10

docstrings

docstrings is a gem that adds the ability to use Python-like docstrings in Ruby
Ruby
13
star
11

cuke-kit

"Have a break; have a cuke-kit." - A set of useful cucumber steps
12
star
12

mdns

A Ruby gem that allows you to publish your own .local records to the local network
Ruby
11
star
13

lifx-console

A Pry-enabled REPL for interacting with LIFX devices
Ruby
11
star
14

cora

Interface-agnostic context and state-aware agent. Conceived for SiriProxy
Ruby
11
star
15

ping-statsd

A tool to ping hostnames and send stats to Statsd.
Crystal
10
star
16

yoga_pants

Lightweight ElasticSearch ruby gem.
Ruby
7
star
17

log16

Structured JSON logger
Ruby
6
star
18

rsynology

Ruby gem to interact with Synology DSM API
Ruby
5
star
19

lifx-ping

A script to "ping" LIFX devices through the mesh
Ruby
5
star
20

priority_filter

priority_filter allows filters to be executed out of order, i.e., a parent controller's filter can be executed after a child controller filter.
Ruby
4
star
21

todo-provider

An example OAuth 1.0a provider, see todo-consumer.
Ruby
4
star
22

todo-consumer

An example OAuth 1.0a consumer for todo-provider
Ruby
4
star
23

translinkrss

translinkRSS grabs the latest bus and train times and converts it into an RSS feed for displaying in XBMC.
Ruby
4
star
24

pretty_activerecord

Makes printing ActiveRecord objects pretty (via #inspect method)
3
star
25

SensorTagTool

A OS X command line utility that grabs data from TI SensorTags
Objective-C
3
star
26

acl

Access Control List plugin
Ruby
3
star
27

daapr

Very alpha code for using dmap-ng to quickly pull song data from a DAAP share. Intended for dukejour
Ruby
3
star
28

ezchart

A DSL for outputting JSON for OFC2
JavaScript
3
star
29

solar-flux-api

A simple API that returns the newest solar flux data from NOAA.
Ruby
2
star
30

inferred_routes

Plugin for rails that makes resource url generation more magic
2
star
31

project_euler

My solutions to problems on projecteuler.net
Ruby
2
star
32

trouter

Terminal Router
2
star
33

rails-test-serving

Makes unit tests of a Rails application run instantly
Ruby
2
star
34

spdy-up

Go
2
star
35

heretic

Ruby
2
star
36

neo

A configurable ruby visualisation library that uses gosu to render matrix code streams
Ruby
2
star
37

bungee

Elasticsearch Backup/Restore utility
Ruby
2
star
38

metlinkr

Ruby
2
star
39

telefrag

SIMBL plugin for Teleport that lets you have custom keymaps so you can pair with people using different keyboard layouts i.e., Colemak, Dvorak
Objective-C
2
star
40

tictactoe

Refactorbating https://github.com/sandal/tictactoe/
Ruby
1
star
41

fish

The fish shell (cloned from the official repo with darcs-to-git).
C
1
star
42

merovingian

A matrix rain visualisation daemon that allows any service to push trail information to it, generating a live feed of matrix code
1
star
43

lifx.cr

Crystal
1
star
44

amazing

Ruby
1
star
45

melbjpapi

Ruby
1
star
46

nats-client

Ruby
1
star
47

dmap

A ruby dmap library that encodes and decodes dmap data structures found in the DAAP protocol
Ruby
1
star
48

benches

Set of mini-benchmarks
Ruby
1
star
49

coffee-testing-roman-numerals

Dev learning for this friday afternoon - fork it and play
Ruby
1
star
50

hashboard

home dashboard
Ruby
1
star
51

structle

Packed C structure wire protocol.
Ruby
1
star
52

qutaccess

Objective-C
1
star
53

romato

TODO: one-line summary of your gem
Ruby
1
star
54

escape

Github mirror of Escape (http://www.a-k-r.org/escape/)
1
star
55

marlin-compile-action

A Github action that compiles Marlin firmware
Shell
1
star
56

rumour

A simple ruby-based Mumble/Murmur channel viewer
Ruby
1
star