Skip to content

Instantly share code, notes, and snippets.

View danreb's full-sized avatar

Adolfo G. Nasol danreb

View GitHub Profile
@danreb
danreb / base64_finder.sh
Last active August 9, 2018 18:20
Find all PHP code with base64_decode - useful to find suspected hacker files
find /home/HOMEDIR/public_html \( -name "*.php" \) -type f -print0 | xargs -0 grep --binary-files=without-match -ir "base64_decode\s*("
@danreb
danreb / commercehook.module
Created September 15, 2012 18:24
Override the Drupal Commerce cart summary using the theme preprocess function in either module or theme.
<?php
/*
* Implementation of hook_preprocess_commerce_line_item_summary
*
*/
// Replace the name of the hook with your theme or module name.
function HOOK_preprocess_commerce_line_item_summary(&$variables) {
// Replace the label ( default to Total ) with your own label
@danreb
danreb / README.txt
Created August 3, 2012 09:55
This is a powerful scripts that will illiminate all bugs in your code, just make sure to backup as this code is powerful, shell_exec should be enabled to make this work. You can execute this file in command line ( shell or cmd )
USAGE:
First thing first - Make a backup of all your files. !Important
Execution Method 1
Just drop this line inside the folder where your PHP program or buggy scripts reside then open command line and go to this directory. Execute the scripts by typing the command "php bug_fixer.php" without a quote, then press enter and just wait, then VIOLA! all bugs are gone! Congrats!
Execution Method 2