Πέμπτη 31 Ιανουαρίου 2013

WordPress :: A Dirty Hack

Aah, WordPress...
So well known, well coded, well designed, well... not really!

When it comes to solve a problem you have to be a hacker to find and open the secret back door. This is what happened. While I was trying to solve an issue the other day I came up with an idea to counter pass the problem in a... dirty way, he he he :-), to upload my site. The problem was a misconfigured path to the web server. I built the site in my local LAMPP installation in a subfolder and I had to set explicitly non-relative paths. So, when I uploaded the site on the web server it was like a devastated building. You get the picture right? 
No CSS, Javascript and images loaded plus the fact that my admin panel was inaccessible and redirected to my localhost. A disaster!

So, although the straight way is to install a new WordPress on the server side and transfer all needed templates, data, set paths and do all the mambo jumbo I had this dirty idea: 
What if I go to General --> Settings menu in my local installation and change the localhost paths to my website URL?

So, I did... and guess what? It worked! I was redirected to my website administration panel which now works perfectly and also all the non-relative paths in the front-end are now fine and the site is up and running.


«Don't learn to Hack... Hack to learn!»

Τρίτη 29 Ιανουαρίου 2013

Joomla - Missing Menus in front-end and back-end

Is'n it obvious? It's a bug or a code written the wrong way. It's a Joomla after-all...

OK, Joomla is crap I know but, we and you, use it a lot and you may have come to this unfortunate, yet easy to solve, problem that all your menus in the frond-end and/or back-end are missing after you transferred the site to another server.

There are numerous forums and a few thousand chimps out there that will tell ya:
"Oh really? Then your site is screwed! So, just backup everything and either install a new Joomla and input everything from the beginning or try again and again... Or change permissions maybe? Wait, there is more...."

LOL, these guys never give up!!!

Now, we all know as engineers that there is always our way or the high way...and we like OUR way! ;-)

So, the whole "trick" is only inside two files. The only thing you need to do is to add an ampersand (&) in front of two variables and everything will work as they should be!
See below for the files and the lines where you need to add the ampersand in front of the variables.


Back-end
Directory: libraries/joomla/html/
File: html.php
Line: 87
Code: return call_user_func_array(array($className, $func), &$args);


Front-end
Directory: modules/mod_mainmenu/
File: helper.php
Line: 72
Code: function &getXML($type, $params, $decorator);

or

Directory: libraries/joomla/cache/handler/
File: callback.php
Line: 99
Code: $result = call_user_func_array($callback, $args);

The bug is this. The variables "$arg" and "$params" or "$args" are passed by value to the functions as parameters. But, they have to pass by reference. This happens because when a new class object is being registered in the Joomla code, which was previously created or accessed by reference, it returns a null if requested by value.
So, the solution is to write this: "&$arg", this: "&$params" and this: "&$args".


Enjoy Reversing and continue giving total solutions where others hit walls. Happy Hacking!

Παρασκευή 18 Ιανουαρίου 2013

Il Pulcino Pio - Tweets (A DSP and image engineering to sound engineering)


Hello there guyz!

This is a fancy hack from an old idea that a friend of mine had. We started playing around this idea when we were at high school. My good friend and I began about 12 years and today having an engineering background I advanced it by also giving a funky tone..
So, let's see what is this about by having engineering lesson that are FUN :-)

See the video to get the idea:


Generally the software we developed is useless, it's only for fun, but you never know... maybe someone will find it other than amusing a great tool for productions :-P


In order to understand it you have to know the basics of:
1. Mathematics
2. Physics
3. Programming (any language)
4. A bit of Sound Engineering
5. Time for hacking!

You may also read these:

And these:

Finally, download GoldWave to test it:


Now, lets go for it...

This software is tweeting aka transmitting - playing - sound files which were previously engineered in a way that Capital letters and numbers can be seen into a spectrum analyzer.

The idea behind the process is simple yet smart. A properly modulated, in amplitude and frequency, signal can be propagated in time and space in a way that we can depict it in a spectrum analyzer. But, although the idea is easy we have somehow to make this tiny wave to have the wideness that the human eye can see. So, for every pixel of the character we transmit we add many waves on top of each other and voila! We can choose an effective frequency range and have the results.
In our example for instance, all the words can be depicted in the range of 3500Hz - 4200Hz.
In order to see the messages you have to configure Gold Wave's spectum analyzer range to the above range and start a recording or monitoring. 
Now, if you "Tweet" with Il Pulcino Pio you will see in the spectrum analyzer your message. 


Enjoy after downloading the file!

If an error occurs make sure you have the "MSVBVM50.DLL" in your system. 
If not, download it from the Internet.

P.S:
Greetings to my old friend P. Gasteratos (we developed a crazy thing... But I like crazy things. Hehehe...)