Tuesday, 14 January 2014

Fail 2 ban Raspberry Pi

Raspberry Pi SSH security - Fail2ban

There are a lot of shady 
people on the internet, scanning IP ranges for vulnerable machines/raspberry pi's.
With a simple program called Fail2ban you can kick out the bruteforcers.
After 6 non non succeeded ssh login's the IP of the client will be blocked by default for 10 minutes.
Your raspberry pi is a lot safer now!
How to:

sudo apt-get update
[ENTER]
sudo apt-get install fail2ban
[enter]

Now fail2ban is installed! Easy isn't it ?
You can change settings @ /etc/fail2ban/jail.conf
1st picture are the common settings, 2nd picture is specific for SSH.






Wednesday, 8 January 2014

Android 4.3 Jelly Bean Enable Developer Mode

Random Post for me really

To enable USB debugging or developer mode in android 4.3 do the following

Settings > About Phone > Tap Build Number a few times > It will say your a developer now > Go back and you will see developer options above About Phone > Check USB Debugging option in Developer Options

Tuesday, 7 January 2014

Raspberry Pi Cam to MMS or Email or Tweet

PiCam-image-requester

Install this script on your Pi with Picam and portforward your http port.
enter the details in the settings on your textlocal inbox.
once you have set it up
send a text to your inbox with either "MMS" or "email" or "tweet" and you will get an image back!
I have used apache for this and setup postfix to send the email.
Does require a Textlocal account.
Contact me if you need to use a different providers API.
Click here to go to the github - https://github.com/txt3rob/PiCam-image-requester

config.php

// Textlocal account details
$txtusername = '';  // Your textlocal username/email
$hash = '';   // Your Textlocal API hash
$keyword = ''; // Your Inbox Keyword ensure you add a space

// MMS Message details
$mmsmessage = "Your Requested Image";  // MMS message with pic
$sender = 'Pi Cam';  // Sender ID
$test = "TRUE";  // Set to FALSE to send the MMS true is set to test it's working

//Authorised Numbers array
$auth = array('447741256987');  // add your number or any other numbers here to allow them to use the service

//Twitter Config
// Get your details from http://dev.twitter.com
$consumer_key = '';  
$consumer_secret = '';
$access_token = '';
$access_token_secret = '';
$tweetstatus = '';

//Email Config
$efrom = "PI CAM <FROM EMAIL ADDRESS>";  // Sender email address 
$eto = "Email test <TOEMAILADDRESS>"; // email address to send all pics to
$subject = "Pi Cam"; // Email subject

Run the following command as root
sudo echo "www-data ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
This repo includes codebird - https://github.com/jublonet/codebird-php
Hopefully all is clear for you to set this up.
Any help or donations send to txt3rob@gmail.com

Friday, 3 January 2014

Easy installer for hamachi for your raspberry pi

Install Hamachi on your Raspberry Pi
copy and paste the below
sudo wget https://raw.github.com/txt3rob/hamachi-pi/master/hamachi.sh
sudo chmod 777 hamachi.sh
sudo ./hamachi.sh
follow the on screen instructions and your raspberry pi will be added to your hamachi network.
Need any help or wish to donate to me my email address is txt3rob@gmail.com

Thursday, 12 December 2013

SMS Command Server

I've been a little busy with loads of different projects recently and also entering a API competition
So I made this nice little script.


You can text a keyword to the raspberry pi and then it will execute the command associated with it.
It also has for a bit of security only allow from 1 number (could be altered to use an array of numbers)

Please review and let me know!

This does use the textlocal API but I can use the SMSPI api as well to control things :)

Monday, 9 December 2013

Turn Off Red LED on Raspberry Pi Ca,

The Pi camera module includes a red LED in one corner of the PCB. This lights up when the camera is active. It’s really useful in giving a visual indication that the camera is doing something and most of the time you will be glad it is there.

In my testing here are some of the reasons it can get in the way :
  • Pi Camera Module Red LEDIt can cause reflections on objects you are trying to photograph giving them a red glow.
  • For nature photography it scares animals.
  • For security applications it may draw unnecessary attention to the device.
  • It consumes power.

To disable the red LED you simply need to add the following line to your config.txt file :
disable_camera_led=1
To edit the config.txt file you can use Nano :
sudo nano /boot/config.txt
Use the arrow keys to scroll to the end of the file and add “disable_camera_led=1″ to the last line. Press “CTRL-x” to quit. If prompted press “Y” followed by “Return” or “Enter”.
Reboot your Pi with “sudo reboot” and when you next use the camera the red LED will be disabled.

Monday, 2 December 2013

Kindle As your raspberry pi monitor

I could mod my Kindle so I can now use it as screen for the RaspberryPi. KindleberryPi makes it possible to have a terminal only, but with my guide you can use it as a complete screen!

How-To for Kindle 4 NT:

1) jailbreak your Kindle: http://wiki.mobileread.com/wiki/Kindle4NTHacking#Jailbreak
2) install USBNetwork: http://wiki.mobileread.com/wiki/Kindle4NTHacking#SSH
3) install KindleVNC viewer: http://www.mobileread.com/forums/showthread.php?t=150434
4) now you can connect to your Kindle (the root password doesn't exist, you can type anything) by doing 
CODE: SELECT ALL
sudo ifconfig usb0 192.168.15.2
ssh root@192.168.15.244

5) start the vnc viewer with
CODE: SELECT ALL
/mnt/us/kindlevncviewer/kvncviewer.sh 192.168.15.2:0 &


6) to autostart the Kindle's viewer once the Pi boots up, link to this script (you need to have sshpass and x11vnc installed!):
CODE: SELECT ALL
sudo ifconfig usb0 192.168.15.2
sudo x11vnc -scale 800x600 -display :0 &
sleep 8
sshpass -p asdf ssh root@192.168.15.244 /mnt/us/kindlevncviewer/kvncviewer.sh 192.168.15.2:0 &

with
CODE: SELECT ALL
[Desktop Entry]
Type=Application
Exec=/home/pi/kindlestart.sh

from ~/.config/autostart/kindlestart.desktop (create the folder if it doesn't exist).

Happy hacking!

taken from - http://www.raspberrypi.org/phpBB3/viewtopic.php?f=41&t=62139

Amazon

Donate

Donate Towards More Raspberry PI's for Projects