Blog

Region Free MacPro

After hunting the internet I finally managed to confirm how to change my MacPro to region free.

For this I have to give many thanks for www.rpc1.org and the administrator puma.

NB: The posting assumes that your DVR is a PIONEER DVD-RW DVR-112D and I offer no guarantees this will work or worse render your DVR unusable.

For simplicy I have attached a zip file with all the tools you’ll need.

First things first download zip file onto your mac.

dvrflash_mac.zip

The open a Terminal window in the same folder  and unpack the zip file :

mac-pro:Downloads mick$ unzip dvrflash_mac.zip
Archive: dvrflash_mac.zip
 creating: dvrflash_mac/
 inflating: dvrflash_mac/A0013000.115
 inflating: dvrflash_mac/A0013001.124
 inflating: dvrflash_mac/DVRFlash
 inflating: dvrflash_mac/Readme.DVR112D.txt
 inflating: dvrflash_mac/Readme.txt

mac-pro:Downloads mick$ cd dvrflash_mac
mac-pro:dvr_flash_mac mick$

The Readme.txt is the original from the author I have added the Readme.DVR112D.txt with some basically this article.

Next check to see that your drive is RPC-2 (region locked) as follows :

mac-pro:dvrflash_mac mick$ ./DVRFlash -v
DVRFlash v2.6.0: Pioneer DVR firmware flasher
by Agent Smith, et al., July 2008

Commandline:
 ./DVRFlash -v

Device parameter was not given, detecting all DVR drives:
 Device : A:
 Vendor : PIONEER
 Model : DVD-RW DVR-112D
 Revision : BC14
 Status : RPC-2 (region locked)
 Region : 2
 Changes : 4 region changes remaining
           4 vendor resets remaining
           state is 'Region set’
Now run DVRFlash again, from the command prompt, using
one of the device(s) listed above as first parameter

Press the Return key to exit

mac-pro:dvrflash_mac mick$

Now assuming you are happy to proceed continue with flashing the drive.

mac-pro:dvrflash_mac mick$ ./DVRFlash -ff PIONEER A0013000.115 A0013001.124

DVRFlash v2.6.0: Pioneer DVR firmware flasher
by Agent Smith, et al., July 2008

                  DISCLAIMER

THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE.

THE ENTIRE RISK AS TO THE ABILITY OF THIS PROGRAM TO FLASH A
PIONEER OR COMPATIBLE DVR DRIVE IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
SERVICING, REPAIR OR CORRECTION.

THIS PROGRAM IS NOT ENDORSED BY PIONEER CORPORATION OR ANY
COMPANY RESELLING PIONEER EQUIPMENT AS THEIR OWN BRAND

IF YOU UNDERSTAND THE RISKS ASSOCIATED WITH THIS PROGRAM AND
DISCHARGE BOTH THE AUTHOR AND PIONEER CORPORATION FROM ANY
DAMAGE OCCURING AS THE RESULT OF ITS USE, PLEASE INDICATE SO
BY ANSWERING THE FOLLOWING QUESTION:

Do you understand and agree to the statement above (y/n)? y

Commandline:
     ./DVRFlash -ff PIONEER A0013000.115 A0013001.124

Drive Information:
  Description  : PIONEER DVD-RW DVR-112D
  Firmware Rev : BC14
  Firmware Date : 07/09/27
  Manufacturer : PIONEER
  Drive is in normal mode.

Firmwares and Drive type mismatch
Continue because force option was specified
WARNING: Hardware and Firmware really don't match!
Continue because superforce option was specified
Are you sure you want to flash this drive (y/n)? y

Switching drive to Kernel mode:
  Description : PIONEER DVD-RW DVR-112
 Firmware Rev. : 0000
 Firmware Date : 06/08/11
 Manufacturer : PIONEER
 Drive is now in Kernel mode

Now sending the Kernel part:
Now internal Kernel reflashing. Please wait... OK.

Now sending the Normal part:
0%          25%          50%          75%         100%
|============|============|============|============|
Please hold your breath for about 30 seconds…

Now internal reflashing. Please wait... OK.

Updated Information:
   Description : PIONEER DVD-RW DVR-112
 Firmware Rev. : 1.24
 Firmware Date : 07/08/08
 Manufacturer : PIONEER

Flashing operation successful ;)

mac-pro:dvrflash_mac mick$

If everything has worked out you will now be able to play DVD’s from any region on your MacPro.

Mick

Man in the middle - ARP Poisoning on OSX

At the core of all investigation in relation to a networks is the need to sniff packets. If you have a switch with SPAN port capabilities then you can listen in from where ever you wish. However if for whatever reason this is not practical a network wiretap may be the answer.

From the PC under windows the proverbial Swiss army knife would be “Cain & Able” but on the unix front ettercap is your tool of choice.

My platform is current OSX so I have added notes of pulling down the MacPorts (see previous post for installing the environment).

To install ettercap :

sudo port install ettercap

Assuming that the default gateway on the network is 192.168.2.1 then to tap all traffic heading leaving the local LAN try the following :

sudo ettercap -T -M arp:remote /192.168.2.1/ /192.168.2.2-99/

Because you are running ettercap as root it will alter the permissions of the devices you’ll monitor from. So you need to change the permissins back so that for example Wireshark can open them. To open these devices up for Wireshark try the following:

chmod 666 /dev/bfp*

Now if you fire up Wireshark you will be able to select the relavent interface and sniff the traffic.

I found that applying an initial filter to ignore duplicate IP address messages make the view a little clearer.

Mick

Dynamic DNS using Bind9

I was looking to install some remote services to my server connected to my home ADSL line. The problem I have is that I have got a dynamic IP address with my DSL line. After trying a number of the public services with varying degrees of sucess and flexibility I decided to build my own solution.

Our companies DNS servers run Bind9 and also the server I run at home also runs Bind9 which means that could use the supplied dns update service with encryption.

Three things are required to achieve this :

1. Method of getting your public IP address
2. Adding a dynamic zone to a dns server (bind9) capable of receiving secure updates
3. Scripting at the ADSL site to tie it all together.

Step 1 – Getting public IP address

There are a number of ways of achieving this – for me I setup a script to return my IP address on our companies servers. Script as follows :

<? // getipaddress.php
 if( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] )) {
    $my_ip = $_SERVER['HTTP_X_FORWARDED_FOR’];
 } else {
    $my_ip =  $_SERVER['REMOTE_ADDR’];
 }
 echo $my_ip;
?>

Step 2 – Adding dynamic Zone

First you need to create a key for the zone on your DNS server :

cd /var/named/etc/namedb/ dnssec-keygen -b 512 -a HMAC-MD5 -n HOST dynamic.com

This will generate two files with names like :

Kdynamic.com.+157+34532.key Kdynamic.com.+157+34532.private

Create the zone file dynamic.com in the dynamic folder

$ORIGIN   dynamic.com.
$TTL      3600  ; 1 hour
@         IN SOA ns.domain.com. hostmaster.domain.com. (
            2009042001 ; Serial
            900        ; refresh (15 mins)
            600        ; retry (10 mins)
            86400      ; expire (1 day)
            3600       ; min (1 hour)
            )
            NS ns.domain.com.
$TTL      600    ; 10 mins

Add the keys and define the new zone by editing the named.conf file. For this you will need to open the .key file created using dnssec-keygen.

key "dynamic.com" { algorithm hmac-md5; secret "<key from .key file>"; };
zone "dynamic.com” {
 type master;
 file "dynamic/dynamic.com”;
 allow-update { key dynamic.com; };
};

Step 3 – Scripting on the client server tying it all together

Securely transfer the two generated key/private files to you home server and place them in the folder /etc/namedb

You need to ensure you have installed the CURL library with OpenSSL support. The following script is one I use to send the updates:

#!/usr/local/bin/php -q
<?
$hostname = "dynamic.com";
$keyfile = "Kdynamic.com.+157+34532.key";
$auto_update_delay = 3600; // 1 Hour
$userpwd = "Username:Password";
$dns_server = "100.100.100.100";
$url = "https://myserver.com/getipaddress.php?hostname=".$hostname;
$datfile = "/home/scripts/".$hostname.".nsupdate";
$nsupdate = "/usr/bin/nsupdate -k /var/named/etc/namedb/".$keyfile;
$ch = curl_init();
curl_setopt( $ch, CURLOPT_URL,$url );
curl_setopt( $ch, CURLOPT_HEADER, 0);
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt( $ch, CURLOPT_TIMEOUT, 30 );
curl_setopt( $ch, CURLOPT_USERPWD, $userpwd );

$response = curl_exec( $ch );
if ( curl_errno($ch) ) {
 print curl_error($ch).”\n";
 exit;
} else {
 $ipaddress = curl_exec($ch);
}
if( $ipaddress == "" ) {
 echo "No ip address returned\n”;
 exit;
}
if ( strlen( $ipaddress ) > 15 ) {
 echo "We got garbage\\n”;
 exit;
}
$cmds = "server ".$dns_server.”\n”.
        "update delete ".$hostname.”\n”.
        "update add ".$hostname." 600 A ".$ipaddress.”\n”.
        “send\\n”;

$update = TRUE;
if( file_exists( $datfile )) {
 $fp = fopen( $datfile, "r" );
 if( $fp ) {
   $info = fstat( $fp );
   if( $info['ctime'] + $auto_update_delay < time()) {
     $update = TRUE;
   } else {
     $saved_cmds = fread( $fp, 1024 );
     if( $cmds == $saved_cmds ) {
      $update = FALSE;
     }
   }
   fclose( $fp );
 }
}
if( $update == TRUE ) {
 $fp = fopen( $datfile, "w" );
 fputs( $fp, $cmds );
 fclose( $fp );
 $cli = $nsupdate." < ".$datfile;
 system( $cli );
 echo $cli."n”;
 echo "Updated DNS - ".$hostname." = ".$ipaddress.”\n”;
} else {
 echo "No change DNS - ".$hostname." = ".$ipaddress.”\n”;
}
?>

I have called this script setipaddress.php and I have added it to my crontab and run this every two minutes.

Mick

© Mick Vaites 2018