Saturday 29 December 2012

ZD1211RW

Right playing around with pwnpi a lovely little security distro for the raspberry pi

had issues with a Zydas 1211 adaptor (belkin).

airmon-ng start wlan0


Found 2 processes that could cause trouble.
If airodump-ng, aireplay-ng or airtun-ng stops working after
a short period of time, you may want to kill (some of) them!

PID     Name
885     dhclient3
1527    dhclient3
Process with PID 1527 (dhclient3) is running on interface wlan0


Interface       Chipset         Driver

wlan0           Zydas   zd1211rw - [phy0]SIOCSIFFLAGS: No such file or directory

                                (monitor mode enabled on mon0)

Found a lovely fix

wget http://downloads.sourceforge.net/project/zd1211/zd1211-firmware/1.4/zd1211-firmware-1.4.tar.bz2
tar xvjf zd1211-firmware-1.4.tar.bz2
mv zd1211-firmware zd1211
mv zd1211 /lib/firmware

and now you can do packet injection on the pi.

 

Tuesday 28 August 2012

Raspberry Pi Samba & Transmission seedbox


Raspberry Pi as Budget BitTorrent Server


The raspberry pi is a surprisingly powerful and cost-efficient computing device. Yesterday I put together this simple setup script to turn your new raspberry into a mean green downloading machine. The only requirement is an existing internet router and a working raspberry with SD-card.
The guys on the official raspberry site have some nice images for downloading, but since we won’t be using the graphical UI, we can use a the slim image put together by darkbasic on his site linuxsystems.it. Just follow his instructions to download, extract and install the image to a compatible SD-card. A list of tested and compatible SD-cards is available from the official site.
While installing make sure to enable SSH-access by renaming the boot-enable-ssh.rc boot.rc
Once your raspberry has booted, you need to find out its IP by looking at the router’s DHCP table. Just look for a device name raspberry-pi.
Next just create a new text file by typing vi setup.sh in your terminal window while logged into the RP. Then just copy the script provided with this blog post to your clipboard. Press “i” to go into editing mode and paste the script with Ctrl/Cmd+v. Then save it with ESC, : x. Execute the script by issuing sh setup.sh. As opposed to the default Debian image, the darkbasic image gives you root access by default. When using another image, execute the script with sudo sh setup.sh.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env bash

# Installs all components needed for a nice seedbox on your new raspberry pi.
# Base image: http://www.linuxsystems.it/2012/06/debian-wheezy-raspberry-pi-minimal-image/
# Prepared by manu (at) snapdragon.cc

echo "[+] Updating packages"
apt-get update ; apt-get -y upgrade

echo "[+] Installing Samba and Transmission packages"
apt-get -y install transmission-daemon samba avahi-daemon

echo "[+] Configuring Transmission"
service transmission-daemon stop
sed -i -re 's/(rpc-authentication-required\":\ )([a-z]+)*/\1false/g' /etc/transmission-daemon/settings.json
sed -i -re 's/(rpc-whitelist-enabled\":\ )([a-z]+)*/\1false/g' /etc/transmission-daemon/settings.json
sed -i -re 's/(download-dir\":\ )([a-z]+)*(.*)/\1\"\/srv\/media\",/g' /etc/transmission-daemon/settings.json
service transmission-daemon start

echo "[+] Setting up public Samba share"
mkdir /srv/media
chown debian-transmission /srv/media

echo "[public]
comment = Public Shares
browsable = yes
path = /srv/media
public = yes
writable = yes
guest ok = yes"
>> /etc/samba/smb.conf
service samba restart
Now just sit back and wait for all components to install. Depending on the speed of your SD-card, this can take up to an hour. The script will first update your package manager, then install the required applications and dependencies and settings. If you’re using a different image, you might need to adapt some package names.
If all went well, you should be able to access the transmission web interface via your Mac on the following URL: http://raspberry-pi.local:9091. On Microsoft Windows, you can try http://raspberry-pi:9091. In case neither name resolution should work, just use the IP address, you found out via your router before. The inteface should always be available on http://<raspberry pi IP>:9091.
On the transmission web interace, you can add and manage all your (legal) torrent downloads. Depending on the size of your SD-card you might need to delete old downloads from time to time.
To access your downloads, you can mount it via CIFS/SMB. On your Mac go to the Finder and connect to a new network folder by pressing CMD+k. Then type smb://raspberry-pi.local, choose to connect as guest and you should see the right folder. On Windows you can enter \\YOUR RASPBERRY IP\public in Windows Explorer. If you are a heavy Windows user, you can also enable WINS address resolution in smb.conf
If everything went well, you should now have a basic BitTorrent server. In case something doesn’t work, just start over with a new image and do the steps found in the setup script one by one. If your downloads work OK, but you can’t access them there might be a permissions issue. This is easily correctable by logging in doing a chmod -R 777 /srv/media.
Please note that you can only use this setup in a trusted network, because all user authentication and security mechanisms are disabled. If you want to access your torrent server from the public internet, you need to proxy it via a proper webserver, enable HTTPS and password authentication.
Since the whole system is running on a standard Debian image, you could add all kinds of cool features like:
  • adding torrents automatically with Flexget
  • downloading from cyberlockers, like Rapidshare with PyLoad
  • share files via HTTP with Apache and h5ai
Post taken from - http://blog.snapdragon.cc/raspberry-pi-as-bittorrent-server/


Saturday 11 August 2012

UK TV addons

Iplayer
sudo wget http://xbmc-iplayerv2.googlecode.com/files/iPlayer-v2.4.17.zip
Download  / Watch 4OD
sudo sudo apt-get install build-essential git-core checkinstall libssl-dev rtmpdump -y
sudo wget http://nibor-xbmc-repo.googlecode.com/files/plugin.video.4od-1.0.2.zip
sudo wget https://mossy-xbmc-repo.googlecode.com/files/repository.mossy.zip 
Five on Demand
sudo wget http://nibor-xbmc-repo.googlecode.com/files/plugin.video.demand5-1.0.2.zip
TV CATCH UP WILL REQUIRE CONFIG I.E YOUR LOGIN DETAILS!
sudo wget http://plugins.tvcatchup.com/~xbmc/addons/repository.tvcatchup.addons/repository.tvcatchup.addons-1.0.3.zip

Leave me some comments if there is anything i missed from major UK TV
Online Cashback


Tuesday 31 July 2012

My Hell With RT5370!

Online Cashback


Every had that one technical problem that you have tried everything you can think of but just can not get it to damm work well this past week has been my hell for the raspberry pi and the RT5370 wireless adapter.

ONLY TESTED ON RASPXBMC

1. - The package firmware-ralink from the Debian Squeeze install doesn't work - it doesn't contain the right firmware.


2 - Copy and paste

sudo wget http://ftp.uk.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-ralink_0.28+squeeze1_all.deb


3. - INSTALL THE FIRMWARE

CODE
sudo dpkg --install firmware-ralink_0.28+squeeze1_all.deb
4. -  reverse the comments in sources.list so that you put it back to squeeze and run apt-get update for good measure.

5. Install package wpasupplicant & usb utils and wireless tools for lsusb and iwconfig
CODE
sudo apt-get install wpasupplicant usbutils wireless-tools

6. Create a config file:

CODE
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

with the following content - dont forget to change the SSID to your wireless network name and the PSK to your wireless password

CODE
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1

network={
  ssid="network_id"
  psk="password"
  proto=WPA
  key_mgmt=WPA-PSK
  pairwise=TKIP
  group=TKIP
  id_str="Nickname"
}

NOTE: The critical change (for WPA-PSK) I had to make from those advised elsewhere was to change "proto=RSN" to "proto=WPA"

7. Modify the interfaces file:

CODE
sudo nano /etc/network/interfaces

to use the wpa configuration, like:

CODE
auto wlan0
  iface wlan0 inet dhcp
  wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

8 Then restart the interface:

CODE
sudo /etc/init.d/networking restart
If you get any failures please type  mkdir -p /var/run/network  and then do


CODE
sudo /etc/init.d/networking restart
This correctly obtained an IP address from the DHCP server and worked for me :)

Online Cashback


Amazon

Donate

Donate Towards More Raspberry PI's for Projects