A PHP class to help calculate the combination to your masterlock combination lock.

0.4.0 2015-06-20 20:58 UTC

This package is not auto-updated.

Last update: 2020-01-10 15:24:57 UTC


        ,,101,:ti:;i::f0i;:          A PHP class to calculate the
       ,,0t::         :,C01i         combination for a masterlock.
      :;0t:             :f01;
     iLGL;               t0Li,       Uses a technique by Samy Kamkar
     tL0L1               1L01;
     1L0Li               iL8f;
     tL0L;               iL0L;
     tL0L;               iL8Li
LtttG888888 ~~~~~~~~~~~ 888880Gt111
:ttC008:i00 MASTERCRACK 0tLC0GCCii:
.::LGC0:fGG ~~~~~~~~~~~ GG:1GLGL;:.



MasterCrack requires PHP 5.4 or higher.

Composer (directly)

The easiest way to install this tool is via composer

composer require access9/mastercrack

Composer (via your composer.json)

Add the following to your composer.json

"access9/mastercrack": "*"

When either of the two composer installation methods completes, you can run mastercrack with:



Of course you can always clone the repository:

git clone

Make sure you get the required vendor dependencies using composer:

composer update -o --prefer-dist



1. Find the "First Locked Position"
  1. Set the dial to 0.
  2. Apply full pressure upward on the shackle as if trying to open it.
  3. Rotate dial to the left (towards 10) hard until the dial gets locked.
  4. Notice how the dial is locked into a small groove.
     a. If you're directly between two digits such as 3 and 4,
        release the shackle and turn the dial left further until
        you're into the next locked groove.
     b. However, if the dial is between two half digits (e.g., 2.5 and 3.5),
        then enter the digit in-between (e.g., 3) into First Locked Position below.

First Locked Position: 4

2. Find the "Second Locked Position"
  Do all of the above again until you find the second digit below 11 that is
  between two half digits (e.g., 5.5 and 6.5), and enter the whole number (e.g., 7)
  into Second Locked Position below.

Second Locked Position: 7

3. Find the "Resistant Location"
  1. Apply half as much pressure to the shackle so that you can turn the dial.
  2. Rotate dial to the right until you feel resistance.
     - Rotate the dial to the right several more times to ensure you're feeling
       resistance at the same exact location.
  3. Enter this number into Resistant Location below.
     - If the resistance begins at a half number, such as 14.5, enter 14.5.

Resistant Location: 27

First:  32
Second: 2, 6, 10, 14, 18, 22, 26, 30, 34, 38
Third:  4, 24


Only the PHP code was written by me. The forumla and help text were taken from the website How to crack any master combination lock in 8 tries or less