Sunday 31 March 2013

Disable NTP sending out requests on Raspberry PI Linux

As beautiful as NTP is, NTP chatter can pollute your network traffic.

Forget removing NTP services, that is too dramatic for the system.  A simple hack is to edit the /etc/ntp.conf file and remove the servers.

sudo nano /etc/ntp.conf

scroll down and hash out the lines like below:

# You do need to talk to an NTP server or two (or three).
#server ntp.your-provider.example

# pool.ntp.org maps to about 1000 low-stratum NTP servers.  Your server will
# pick a different set every time it starts up.  Please consider joining the
# pool: <http://www.pool.ntp.org/join.html>
#server 0.debian.pool.ntp.org iburst
#server 1.debian.pool.ntp.org iburst
#server 2.debian.pool.ntp.org iburst
#server 3.debian.pool.ntp.org iburst


Control-X and yes to save

Restart NTP:
sudo /etc/init.d/ntp restart

Check syslog
cat /var/log/syslog



WindyCityTech Blogger
WindyWindyCityTech Wordpress

Saturday 30 March 2013

Compiling mdk3 on Raspberry Pi Raspberian for a wifi hell

Compiling mdk3 on Raspberry Pi Raspberian.  Tested on the on the stock upgraded Raspbian distro kernel 3.6.11+.

After you get aircrack-ng suite installed and working, this is a no-brainer.

wget http://homepages.tu-darmstadt.de/~p_larbig/wlan/mdk3-v6.tar.bz2

extract
tar -xvjf mdk3-v6.tar.bz2

cd mdk3-v6


make

then move the mdk3 file somewhere where the shell can pick it up like
/usr/local/bin/



 WindyCityTech Blogger
WindyWindyCityTech Wordpress

Compiling aircrack-ng suite on Raspberry Pi Raspbian



Why, because you can.  I'm doing this on the stock upgraded Raspbian distro kernel 3.6.11+.

Prerequisites are a brain, knowledge of Linux and Raspberry Pi.  Casual tech self-abusers should go and do some research first and yes the Pi is helping them come out the woodwork.

Compiling from the source down not work, it has not been upgraded for a while.  Just check out the SVN.


sudo apt-get upgrade
sudo apt-get update

sudo apt-get install libssl-dev subversion iw
svn co http://trac.aircrack-ng.org/svn/trunk aircrack-ng
cd aircrack-ng
make
sudo make install


airmon-ng is no longer compiled during make by the looks of it, but it is in aircrack-ng/scripts

You can make it executable by doing a chmod +x airmon-ng, then copying it to the same path where aircrack-ng is natively installed.  i.e
/usr/local/bin/

To get airodump-ng to work properly, you may need to kill all the services that airmon-ng complains about then it is running.
Go to /etc/init.d and
sudo ./ifplugd stop

then sudo killall all the rest of the processes that airmon-ng complains about

PID    Name
1589    ifplugd
1617    ifplugd
2380    dhclient
16076    ifplugd
16088    wpa_supplicant
16146    wpa_cli
Process with PID 16076 (ifplugd) is running on interface wlan0
Process with PID 16088 (wpa_supplicant) is running on interface wlan0
Process with PID 16146 (wpa_cli) is running on interface wlan0


Seems to work ok

pi@raspberrypi /etc/init.d $ sudo aireplay-ng -9 mon0
00:03:07  Trying broadcast probe requests...
00:03:07  Injection is working!
00:03:09  Found 2 APs

00:03:09  Trying directed probe requests...
00:03:09  ########### - channel: 6 - '#########'
00:03:10  Ping (min/avg/max): 1.637ms/22.619ms/103.341ms Power: -51.40
00:03:10  30/30: 100%

00:03:10  ########## - channel: 6 - '#####'
00:03:11  Ping (min/avg/max): 2.875ms/32.890ms/87.744ms Power: -54.83
00:03:11  30/30: 100%


WindyCityTech Blogger
WindyWindyCityTech Wordpress

Monday 18 March 2013

Disable Firefox Built in PDF Viewer and get your power back



Why do these fucks at Firefox implement shit that without asking permission first.  New in Firefox 19, a built-in pdf viewer that makes me wretch like watching the bad old win32 Adobe pdf plugin.  Worst of all it is selected to be on by default!

Heres how to get ones freedom of choice back.

Navigate to Edit -> Preferences -> Applications and search for 'pdf', Set it to 'Always Ask'.





WindyCityTech Blogger
WindyWindyCityTech Wordpress

Saturday 16 March 2013

Using crunch to create a word list containing all the mobile phone numbers in Australia

crunch 10 10 0123456789 -t 04%%%%%%%%

where:
"10 10" fixes the length to 10 digits
 "0123456789"  uses all these numbers in the % locations
"-t 04%%%%%%%%"  denotes the strings to contain 04XXXXXXXX

The same can be done with local phone numbers.
http://en.wikipedia.org/wiki/Telephone_numbers_in_Australia





WindyCityTech Blogger
WindyWindyCityTech Wordpress

Notes for configuring udev rules for em28xx USB capture card

Goal: 
to create static /dev/video10 for plug in USB capture device em28xx.  Static video card location using udev rules ensures that the correct video device is utilised during reboots.  Used for motion program www.lavrsen.dk

Soloution: 
auto create a symlink from kernel assigned video address to /dev/video10 when em28xx is plugged in.

Plug in device and note video number assignment i.e. video0
then use this command to search for variables that can uniquely identify this device.
udevadm info -a -p $(udevadm info -q path -n /dev/video0)

Create udev rule:
KERNEL=="video[0-9]*", DRIVERS=="em28xx", SYMLINK+="video10"

Where:
KERNEL=="video[0-9]*" binds this rule to only video devices
DRIVERS=="em28xx" bind the rule to devices using driver em28xx
SYMLINK+="video10" creates a symlink from /dev/videoX to /dev/video10

Does it work:
ls /dev/video*

sudo service udev restart

References:
http://www.mythtv.org/wiki/Device_Filenames_and_udev

WindyCityTech Blogger
WindyWindyCityTech Wordpress

Sunday 3 March 2013

How to disable FaceBook typeahead autocomplete using adblock

I find autocompletes sometimes useful, but it pissed me off when they modify the way I type or cause long pauses and unintuitive searches.

Facebook is no exception, their autocomplete search is crap and there is no way of disabling it in settings.


The autocomplete can be disabled using a simple adblock filter.

||facebook.com/ajax/typeahead/search.php*

Done.


WindyCityTech Blogger
WindyWindyCityTech Wordpress