📜 ⬆️ ⬇️

IPod Touch Web Flash Drive

After playing with the iPod Touch, I wanted to give it a bit to gut it. This device has almost everything for experiments, including various servers (web, remote control, etc.). It was decided to do something "ala" web-usable. I thought of making a kind of web flash drive for writing files. Forward!

Hardware:
1. iPod Touch (v1.1.4) - unlocked
2. Wireless connection

Software:
1. Lighttpd v1.4.17-2
2. PHP v5.2.3-2
3. OpenSSH v4.6p1-2
4. Pure-FTPd v1.0.21
')
Ahtung!
- The following actions were tested on firmware 1.1.4, I can not say anything about other versions.
- All actions were done at my own risk and risk and responsibility for the ditched (due to the curvature of the hands) devices I do not carry =)
- Since the device is unlocked, then there should already be programs: BSD Subsystem, OpenSSH server. If not, then you need to install via the Installer.
- All deployment files are attached below

Step 1. Installing the software


To begin with, it is necessary to set up a remote access or ftp server in order to conveniently work with the device. There are 2 (I tried) methods: ftp and sshfs.
It was more convenient for me to use sshfs

To install from under Ubuntu 8.04:

$ sudo apt-get install sshfs

For convenience, I wrote a small script for mounting / unmounting.

$ ipodfs.sh mount -
$ ipodfs.sh umount -


Next, you need to install the following programs from the Installer (on the device):
1. Lighttpd
2. PHP
3. BossPrefs - for easy management of demons
3.1. BossPrefs Lighttpd module
3.2. BossPrefs Pure-FTPd module

Yes, by the way, to make it easier to access the device, you can write in / etc / hosts the line "192.168.x.xxx ipod"
So, sort of sorted out the software. Go to setting up services.

Step 2. Configuring


The first thing you need to do is configure the web server to go (Lighttpd). Ready config attached. It should be noted, the web server will work with php in cgi mode (not fastcgi) because we do not need wild performance. Our service will have a single client =).

Next, you need to configure php. There will be nothing military in the config, only some changes in the duration of the script and changes in some ways. The config is also attached.
Config to put in / opt / iphone / lib .

You need to create paths:

$ mkdir /var/www -
$ mkdir /var/tmp/php - php
$ mkdir /var/webfiles - "-"


Step 3. Installation


It is necessary to download and unpack the contents of the webflash.tar.gz archive to / var / www

define("BASE_PATH","/var/www"); - -
define("DB_PATH",BASE_PATH."/files.db"); -
define("FILE_PATH","/var/webfiles"); -


It looks like this:


Files:


Project Archive
Ipodschip sshfs script
Config Lighttpd
PHP config

Total:


Now you can drop small files just by going to our player’s web interface. Of course, the implementation is far from ideal, it took no more than an hour. But I generally liked the idea. Since the player has a flash memory of 8-16 GB, it is quite an interesting solution.
In the next topic I will talk about another extreme perversion of this player.

Source: https://habr.com/ru/post/38505/


All Articles