Решил узнать, как ломают популярный форумный движок Invision Power Board. Для этого исключительно в ознакомительных целях я загрузил последнюю релизную версию 3.4.5 (Retail, ENG) и точно такую же версию, только нуленую и русифицированную от IPBMafia.ru.
Для того, чтобы найти изменения, сделанные при нулении, необходим инструмент для сравнения изменений файлов. То, что было у меня под рукой — это Git. Первым коммитом пошел IPB 3.4.5 (Retail, ENG), вторым — IPB 3.4.5 (Nulled, RUS).
И вот какие изменения предстали:
admin\applications\core\extensions\enhancements\ipscdn.php
- $ping = $file->getFileContents( "http://license.invisionpower.com/?a=cdn&key=" . ipsRegistry::$settings['ipb_reg_number'] );
+ $return = NULL; |
- $ping = $file->getFileContents( "http://license.invisionpower.com/?a=cdn&key=" . ipsRegistry::$settings['ipb_reg_number'] );
+ $return = NULL;
admin\applications\core\extensions\enhancements\viglink.php
- $return = $cfm->getFileContents( "http://license.invisionpower.com/viglink/?subId=" . urlencode( $subId ) );
+ $return = NULL; |
- $return = $cfm->getFileContents( "http://license.invisionpower.com/viglink/?subId=" . urlencode( $subId ) );
+ $return = NULL;
\admin\applications\core\modules_admin\tools\licensekey.php
- {
- /* If we don't have a key, an empty array is fine */
- if ( !$this->settings['ipb_reg_number'] )
- {
- $this->cache->setCache( 'licenseData', array(), array( 'array' => 1 ) );
- return;
- }
-
- /* Query the api */
- $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classFileManagement.php', 'classFileManagement' );
- $classFileManagement = new $classToLoad();
- $response = $classFileManagement->getFileContents( "http://license.invisionpower.com/?a=info&key={$this->settings['ipb_reg_number']}&url={$this->settings['board_url']}" );
-
- /* Is it valid? */
- if ( $response == 'NO_KEY' )
- {
- IPSLib::updateSettings( array( 'ipb_reg_number' => '' ) );
- $this->cache->setCache( 'licenseData', array(), array( 'array' => 1 ) );
- return;
- }
-
+ {
/* Save */
- $licenseData = json_decode( $response, true );
+ $licenseData = darkLAE::getLicenseData();
$licenseData['_cached_date'] = time();
$licenseData['key']['_expires'] = $licenseData['key']['_expires'] ? $licenseData['key']['_expires'] : 9999999999;
$licenseData['key']['expires'] = $licenseData['key']['expires'] ? $licenseData['key']['expires'] : 9999999999;
$this->cache->setCache( 'licenseData', $licenseData, array( 'array' => 1 ) );
-
- /* Copyright Removal? */
- if ( $licenseData['cr'] )
- {
- IPSLib::updateSettings( array( 'ipb_copy_number' => $licenseData['cr'], 'ips_cp_purchase' => 1 ) );
- }
- elseif ( $this->settings['ips_cp_purchase'] )
- {
- IPSLib::updateSettings( array( 'ips_cp_purchase' => 0 ) );
- } |
- {
- /* If we don't have a key, an empty array is fine */
- if ( !$this->settings['ipb_reg_number'] )
- {
- $this->cache->setCache( 'licenseData', array(), array( 'array' => 1 ) );
- return;
- }
-
- /* Query the api */
- $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classFileManagement.php', 'classFileManagement' );
- $classFileManagement = new $classToLoad();
- $response = $classFileManagement->getFileContents( "http://license.invisionpower.com/?a=info&key={$this->settings['ipb_reg_number']}&url={$this->settings['board_url']}" );
-
- /* Is it valid? */
- if ( $response == 'NO_KEY' )
- {
- IPSLib::updateSettings( array( 'ipb_reg_number' => '' ) );
- $this->cache->setCache( 'licenseData', array(), array( 'array' => 1 ) );
- return;
- }
-
+ {
/* Save */
- $licenseData = json_decode( $response, true );
+ $licenseData = darkLAE::getLicenseData();
$licenseData['_cached_date'] = time();
$licenseData['key']['_expires'] = $licenseData['key']['_expires'] ? $licenseData['key']['_expires'] : 9999999999;
$licenseData['key']['expires'] = $licenseData['key']['expires'] ? $licenseData['key']['expires'] : 9999999999;
$this->cache->setCache( 'licenseData', $licenseData, array( 'array' => 1 ) );
-
- /* Copyright Removal? */
- if ( $licenseData['cr'] )
- {
- IPSLib::updateSettings( array( 'ipb_copy_number' => $licenseData['cr'], 'ips_cp_purchase' => 1 ) );
- }
- elseif ( $this->settings['ips_cp_purchase'] )
- {
- IPSLib::updateSettings( array( 'ips_cp_purchase' => 0 ) );
- }
\admin\index.php
+require_once( IPS_ROOT_PATH . 'sources/base/darkLAE.php' );/*noLibHook*/ |
+require_once( IPS_ROOT_PATH . 'sources/base/darkLAE.php' );/*noLibHook*/
\admin\install\index.php
+require_once( IPS_ROOT_PATH . 'sources/base/darkLAE.php' );/*noLibHook*/ |
+require_once( IPS_ROOT_PATH . 'sources/base/darkLAE.php' );/*noLibHook*/
\admin\upgrade\index.php
+require_once( IPS_ROOT_PATH . 'sources/base/darkLAE.php' );/*noLibHook*/ |
+require_once( IPS_ROOT_PATH . 'sources/base/darkLAE.php' );/*noLibHook*/
\index.php
+require_once( IPS_ROOT_PATH . 'sources/base/darkLAE.php' );/*noLibHook*/ |
+require_once( IPS_ROOT_PATH . 'sources/base/darkLAE.php' );/*noLibHook*/
Файл darkLAE.php содержит класс-заглушку, которая как раз и отвечает за то, чтобы движок думал, что он активирован с помощью легального ключа. Содержимое этого файла, по понятным причинам, я выкладывать не буду, а кому надо, тот и так найдет.
Я в свою очередь в предвкушении линейки IPB 4.x. Говорят, там шаблоны будут переписаны с учетом HTML5 🙂