Archive for the ‘PHP script’ Category

Decoding $_F=__FILE__;$_X=’…’; eval base64_decode()

Wednesday, February 1st, 2012

This is a further supplement to my posts Decoding eval gzinflate base64_decode and Decoding eval gzinflate base64_decode str_rot13. To decode files obfuscated by SourceCop that look roughly like this: <?php $_F=__FILE__;$_X=’encoded text’;eval(base64_decode(‘pointless crud’)); ?> I might make an automated script to decode this sort of thing and post it up on this blog once I [...]

Decoding eval gzinflate base64_decode str_rot13

Wednesday, February 1st, 2012

This is sort of a supplement to the the blog post I made with the PHP snippet on decoding code encrypted via eval(gzinflate(base64_decode(’encoded text‘))); over at: Decoding eval gzinflate base64_decode The following code snippet is a simple PHP class found at the post by macosbrain entitled Decode Function: eval gzinflate base64_decode str_rot13 Contrary to this [...]

PHP Shell Script for Backups your database

Wednesday, February 1st, 2012

On Mac servers I love the advent of a neat feature called Time Machine.  Time Machine does incremental backups without having to deal with 3rd-party software, or custom shell scripts like the one I’m about to show.  Unfortunately, on the Linux side there’s always some degree of elbow grease that’s required.  Which isn’t to say [...]

Output shell script output via php and web browser

Wednesday, February 1st, 2012

How could I output the shell scripted output with PHP to a web browser? The script runs for 2 minutes and prints out several lines during the execution of the script on the command line. Need a way to run this with PHP and print the output of the shell script as the script executes [...]

How to run php script in shell?

Wednesday, February 1st, 2012

If you want to run php script in shell, simply put the following line at the beginning of your php file. #!/path/to/php #!/path/to/php is the path you installed php in linux. If you don’t know where php is installed in your linux. Type the following command which php This will output the php path from [...]

Downgrade or install php 5.2.x on Ubuntu 10.x

Monday, August 8th, 2011

If you have the package “python-software-properties” installed, you can easily add the repository using the command: add-apt-repository ppa:txwikinger/php5.2 That will install the GPG key for security verification. If you are using apt-get, then you need to create a file called /etc/apt/preferences.d/php for pinning the versions, so they remain at 5.2 and don’t get upgraded to [...]

Simple PHP Code Send Email

Tuesday, July 5th, 2011

I’ve just order a Cloud and is setting my virtual server on that cloud. After installed LAMP (Apache, MySQL and PHP) on CentOS server, I continue to check whether the PHP mail() function is working. Below is the content of the test email PHP file. It’s just for testing purpose so the recipient is hard [...]