Home arrow Forum JSMF Registration Key and Copyright Notice
  Welcome, Guest. Please login or register.
Did you miss your activation email?
December 03, 2008, 03:50:43 AM
Home New Posts Search Calendar


Login with username, password and session length
+  Joomla Forum
|-+  Joomla Hacks
| |-+  Joomla-SMF Forum Support
| | |-+  Joomla-SMF 2.0.x (Moderators: -Wolverine, kai920)
| | | |-+  JSMF Registration Key and Copyright Notice
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: JSMF Registration Key and Copyright Notice  (Read 2847 times)
WhiteGhost
Joomla Newbie
*

Karma: +5/-1
Offline Offline

Posts: 17


View Profile WWW
JSMF Registration Key and Copyright Notice
« on: July 01, 2007, 04:36:23 AM »

While I am all for giving credit to copyright holders of GPL code and for a system to encourage donations, I feel that making someone donate to get rid of the "Joomla Bridge by Joomlahacks.com" copyright notice is not right. So I have created a tool for users to get the registration key to enter into their site if the wish. You can find it here: http://www.parkerhome.org/component/option,com_wrapper/Itemid,45/.

All you need to do is enter your URL for your Joomla site. Note this is not the URL to your SMF directory but to your root Joomla site. This has only been tested with the 2.0.2 version of the JSMF Bridge since this is the version that I run. If there is interest for testing of other versions please let me know and I will see if this works with them.

I have done this for 2 reasons:

1. To encourage the maintainers of this GPL'd code to remove the check for this which adds a ton of unnecessary overhead to the execution of this script. I will gladly provide patch files to them that removes the offending code.

2. Because normal non-hacker end users can not easily find the obscured code and find out how to remove it like I have. They should at least be able to remove the copyright notice on the output which is not required under the GPL of any version.

Logged

WhiteGhost
apc
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 15


View Profile
Re: JSMF Registration Key and Copyright Notice
« Reply #1 on: July 01, 2007, 09:41:36 AM »

While I am all for giving credit to copyright holders of GPL code and for a system to encourage donations, I feel that making someone donate to get rid of the "Joomla Bridge by Joomlahacks.com" copyright notice is not right. So I have created a tool for users to get the registration key to enter into their site if the wish. You can find it here: http://www.parkerhome.org/component/option,com_wrapper/Itemid,45/.

All you need to do is enter your URL for your Joomla site. Note this is not the URL to your SMF directory but to your root Joomla site. This has only been tested with the 2.0.2 version of the JSMF Bridge since this is the version that I run. If there is interest for testing of other versions please let me know and I will see if this works with them.

I have done this for 2 reasons:

1. To encourage the maintainers of this GPL'd code to remove the check for this which adds a ton of unnecessary overhead to the execution of this script. I will gladly provide patch files to them that removes the offending code.

2. Because normal non-hacker end users can not easily find the obscured code and find out how to remove it like I have. They should at least be able to remove the copyright notice on the output which is not required under the GPL of any version.



Excellent -thanks - and it works great!

Having sent a donation in good faith and not received the code after numerous private messages and emails, I feel totally justified in using this.

As you say, it is not in keeping with the GPL licence anyway.

If JoomlaHacks wants to make it commercial then that is a different issue, but to request donations under false pretences is just plain unethical.

Thanks again!
Logged
WhiteGhost
Joomla Newbie
*

Karma: +5/-1
Offline Offline

Posts: 17


View Profile WWW
Re: JSMF Registration Key and Copyright Notice
« Reply #2 on: July 03, 2007, 03:54:21 AM »

Since I have had a few people ask "where is it in the code" already.

Those of you who know how to read php well, below is the non-obscured functions and sections of code that rewrite the copyright and check for the existence and verification of the registration code. The code you receive and enter is stored in the jsmf_config database schema under the "code" option. After you save the entry in the install screen it adds it to the data base entry which is defaulted to "code=". Feel free to find these on your own in their obscured form, I will give you a hint: convert hex data into ascii strings. For those who don't know how to read php take this an exercise on boning up on php. A hint for you the php online manual at www.php.net.

These examples remove all of the obscuring and I do not include the code used to make the code non-obscured to the program, but it is trivial and easy to find if you can find these lines anyway.

Code in 3 different places of smf.php is as follows:
1.
Code:
if (!defined('_SMF_')) {
    /**#@+
     * Constants
     */
    /**
     * _SMF_
     */
    define ('_SMF_', "<br/>Joomla Bridge by <a href="http://www.JoomlaHacks.com" title="JoomlaHacks.com" target="_blank">JoomlaHacks.com</a>");
    /**#@-*/
}

2.
Code:
$last = $jsmfConfig->code;

3.
Code:
if (defined(_SMF1_) || run($last)) {
    if ($jsmfConfig->pathway) {
        $jsmf->setPathway();
    }
    if ($jsmfConfig->pagetitles && $mosConfig_pagetitles) {
        $jsmf->setTitle();
    }
    if ($jsmfConfig->css) {
        $jsmf->setCSS();
    }
    if ($jsmfConfig->description) {
    $jsmf->setDescription();
    }
    if ($jsmfConfig->def_keywords) {
    $jsmf->setDefaultKeywords();
    }
    if ($jsmfConfig->keywords) {
        $jsmf->setKeywords();
    echo $buffer;
    unset($buffer);

}

In the smf.class.php file there is this 1 section of code in the fixbuffer function and one additional function:
1.
Code:
$code = $jsmfConfig->code;

global $forum_copyright;
if(!(run($code)))
    $buffer = str_replace($forum_copyright, _SMF1_($forum_copyright, _SMF_), $buffer);
    str_replace($forum_copyright, _SMF1_($forum_copyright), $buffer);
Code:

2.

function _SMF1_($a, $b)
{
    /**#@+
     * Constants
     */
    /**
     * _SMF1_
     */
    defined( '_SMF1_' ) or define('_SMF1_', 1);
    /**#@-*/
    return $a.$b;
}

And in the admin.smf.class.php there is this function:
Code:
function run($debug) {
    $debug=substr($debug,1);
    if(substr($debug,0,1))
        $debug=strrev($debug);
    $debug = substr($debug,0,1) . pack('H*', $debug);
    global $mosConfig_live_site;
    return strpos($debug,$mosConfig_live_site . md5(_JSMF_)) ? 1 : 0;
}

This above function in the admin.smf.class.php file is what does the code verification. I leave it up to you to decipher the trivial method used to encode the keys they send out. When you have you can create a php script that does the same thing that mine on my site does. NO I will not give out the source to my script but the information I have given above should be enough spoon feeding to get you to be able to make one yourself if you wish. A hint on this is don't forget the leading extra bit.


[EDIT1: Added missing line from smf.class.php]
[EDIT2: Oops forgot one function out of the smf.class.php]
[EDIT3: Fix type-o in run function]
« Last Edit: July 03, 2007, 04:31:51 AM by WhiteGhost » Logged

WhiteGhost
V3nn3tj3
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 1


View Profile
Re: JSMF Registration Key and Copyright Notice
« Reply #3 on: July 05, 2007, 08:31:43 AM »

Does not work for me ?
Plz, send me a pm with what, how, ...

Greets V3n
Logged
exrace
Joomla Newbie
*

Karma: +5/-3
Offline Offline

Posts: 48


View Profile
Re: JSMF Registration Key and Copyright Notice
« Reply #4 on: July 05, 2007, 06:48:47 PM »

Ahhh...share the script. Grin
Logged
WhiteGhost
Joomla Newbie
*

Karma: +5/-1
Offline Offline

Posts: 17


View Profile WWW
Re: JSMF Registration Key and Copyright Notice
« Reply #5 on: July 06, 2007, 08:22:45 AM »

I will not share the script. The information I have given you above is all the information that you need to make the same script. Take the time to understand the logic that is in the bridge. I have done the hard part for you and given you the non-obscured code and even told you which function was doing the checking. All you need to do is read the f***ing function. Take some pride in yourself. If you can't read php I gave you some links to where to learn everything that is going on in the function. If you don't want to educate yourself that is ok too. I gave you a place to get the registration code for free on my site. You don't have to do anything to get access to it and it costs you nothing to use.

If everyone noticed my first post to these forums it was the announcement of the code generator on my site. I did not sit here and ask around to find out if anyone can bypass this. I read the code and figured out what it was doing. The beauty of the GPL software is access to the source code and the right to modify and redistribute the code. I personally on my site have removed all of the code in the bridge that checks for the code. I felt it was an unnecessary overhead in the script. If I wanted I could redistribute the code with my changes, but their is no requirement to do so. I don't feel that forking a project over something this trivial is worth it. Hence the access to the generator, the airing of the functions to everyone else. This is my effort to get the maintainers of this software to remove this from the code. Otherwise every time they send out  a new version I will have to redo all of the hard work to remove it again.

I am not trying to sound like an a**, just trying to wake people up to the need to read what they are using. What would have happened had this been a backdoor hack allowing the maintainers of this code into your site. You would not have known, since you didn't read the code they where distributing. I personally don't use code on my site that I don't know what the heck is going on in it. If you care about your site you would not either. Being diligent in understanding the technologies that you are using is a requirement if you want to run a site that isn't going to be hacked to pieces. Not that my site hasn't had problems in the past. I had someone's poor coding cause a problem in my site which allowed others to deface my site. Now I read the code I use. Hence when I was reading this code and realized what that they where obscuring code, I made it public.

Well enough of my rant. I hope people now realize I am not going to give out the source to my script.

BTW...exrace you where not the only person to ask for the script, just the proverbial straw the broke the camel's back. This is nothing personal about you.
« Last Edit: July 06, 2007, 08:43:32 AM by WhiteGhost » Logged

WhiteGhost
Oka Knopfler
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 1


View Profile
Re: JSMF Registration Key and Copyright Notice
« Reply #6 on: December 18, 2007, 01:11:23 PM »

Doesn't seem to work for me and I do have the same 2.0.2 version. I have donated but haven't received the code so this seemed to be the solution, but well...
Logged
woodle
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 1


View Profile
Re: JSMF Registration Key and Copyright Notice
« Reply #7 on: April 24, 2008, 10:26:50 AM »

I don't know which is lamer, promising an unlock key for a "donation" and not ever delivering one or the pathetic key generation algorithm.  I actually made two donations for different sites.
Logged
Drakkim
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 2


View Profile
Re: JSMF Registration Key and Copyright Notice
« Reply #8 on: October 01, 2008, 04:31:02 PM »

I didn't examine all the code completely, it was enough to disable the heaviest of the decoding, mainly to lower CPU usage...

I did notice, however, that this line should have single quotes:
Code:
define ('_SMF_', "<br/>Joomla Bridge by <a href="http://www.JoomlaHacks.com" title="JoomlaHacks.com" target="_blank">JoomlaHacks.com</a>");

should be:
Code:
define ('_SMF_', '<br/>Joomla Bridge by <a href="http://www.JoomlaHacks.com" title="JoomlaHacks.com" target="_blank">JoomlaHacks.com</a>');
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Joomla Forum | Powered by SMF 1.1 RC1.
© 2001-2005, Lewis Media. All Rights Reserved.
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!

Joomla Hacks is a Joomla Components, Joomla Modules, Joomla Templates, & Joomla Mambots resource portal. None of the text or images in this public website may be copied without the expressed written consent of the authors. Copyright 2005 by JoomlaHacks.com. Powered by Joomla. All rights reserved.
Terms of Use
Joomla Hacks



Joomla Hacks
German Lang French Lang Italian Lang Spanish Lang Japanese Lang Chinese Lang
Search Contact About Advertise Blogs Topsites Submit News Register Login