Skip to content

Instantly share code, notes, and snippets.

@rotemtam
rotemtam / airodump-on-pi
Created October 25, 2014 13:15
Installing airodump-ng on Raspberry Pi
wget http://download.aircrack-ng.org/aircrack-ng-1.2-beta3.tar.gz
sudo apt-get -y install libssl-dev libnl-genl-3-dev libnl-3-dev iw
tar -zxvf aircrack-ng-1.2-beta3.tar.gz
cd aircrack-ng-1.2-beta3/
make
sudo make install
@rotemtam
rotemtam / activate_airodump.sh
Created October 25, 2014 13:23
activate-airodump-on-pi
#!/bin/bash
# put wlan0 in monitoring mode
sudo airmon-ng start wlan0
# activate airodump and have it output data to /tmp directory
sudo airodump-ng --output-format csv --write /tmp/capture mon0
@rotemtam
rotemtam / push_data.py
Last active August 13, 2017 16:42
Send airodump-ng csv data to firebase db
import subprocess, StringIO, csv
from simplejson import dumps
from firebase import Firebase
from time import sleep, time
# to install Firebase, pip install -e git://github.com/mikexstudios/python-firebase.git#egg=python-firebase
firebase = Firebase('https://<your_app>.firebaseio.com/stations')
def fetch_data():
@rotemtam
rotemtam / pi-mac-monitor-view-snippet.html
Last active August 29, 2015 14:08
Angular controller and view for pi-mac-monitor
<table class="table table-striped" ng-if="stations.length">
<thead>
<tr>
<th>Station MAC</th>
<th>First Seen</th>
<th>Last Seen</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="station in stations">
@rotemtam
rotemtam / pi-mac-monitor.js
Created October 25, 2014 15:45
pi-mac-monitor controller
angular.module('monitorApp')
.controller('MonitorCtrl', function ($scope, fbutil, $timeout) {
$scope.stations = fbutil.syncArray('stations', {limit: 15});
// display any errors
$scope.stations.$loaded().catch(alert);
@rotemtam
rotemtam / shareOnWhatsApp.js
Created February 28, 2015 17:45
Whatsapp link creation
var shareOnWhatsApp = function(msg) {
window.location.href = 'whatsapp://send?text=' + encodeURIComponent(msg);
}
mkdir kahootClone
cd kahootCLone
yo angularfire:app kahootClone
var underscore = angular.module('underscore', []);
underscore.factory('_', ['$window', function($window) {
return $window._; // assumes underscore has already been loaded on the page
}]);
angular.module('kahootCloneApp', [
'ngAnimate',
'ngCookies',
'ngResource',
bower install --save underscore
<div class="jumbotron">
<h1>Let's play trivia.</h1>
<p class="lead">
In real time!
</p>
<p><a ng-if="!creatingGame" class="btn btn-lg btn-success" ng-click="newGame()">Start new Game</a></p>
<p><a ng-if="creatingGame" ng-disabled="true" class="btn btn-lg btn-success" ng-click="newGame()">Creating game..</a></p>
<p><a class="btn btn-lg btn-success" ng-href="#/player">Join Existing Game</a></p>
</div>