Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Phil Taylor PhilETaylor

🎯
Focusing
Block or report user

Report or block PhilETaylor

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@PhilETaylor
PhilETaylor / gist:4054005
Created Nov 11, 2012
bfNetwork Audit Result Row
View gist:4054005
{
"data":
[
{
"id": 690,
"site_id": 11122681,
"user_id": 12364,
"status": "BLOB",
"killflag": null,
"scanerrormsg": null,
@PhilETaylor
PhilETaylor / example.php
Created Nov 29, 2012
Example Audit Results Stored Detail
View example.php
<?php
$data = array(
"id" => 155, // Our internal id number for the audit
"site_id" => 123, // Your sites ID reference
"user_id" => 456, // Your User ID reference
"status" => "COMPLETE", // Used during audit progress - shows status of the audit
"killflag" => null, // Used during audit progress - allows us to kill an audit
"scanerrormsg" => null, // Used during audit progress - Any error your site gives us
"step" => "", // Used during audit progress - What step of the audit we are on
"version" => "2.5.7", // Your exact Joomla version identified
@PhilETaylor
PhilETaylor / gist:4450994
Created Jan 4, 2013
get a word from the british dictionary
View gist:4450994
<?php
function getWord(){
return trim(str_replace("'",'',shell_exec('awk -v lineno="'.rand(0,5000).'" \'lineno==NR{print;exit}\' /usr/share/dict/british-english')));
}
@PhilETaylor
PhilETaylor / gist:5165488
Created Mar 14, 2013
on change do something!
View gist:5165488
// When the page has loaded...
jQuery(document).ready(function(){
// bind to the form element
jQuery('#FormElementId').onChange(function(){
// and on change do something!
});
});
View gist:5984738
function setcookie7(e, d, c) {
var b = new Date();
var a = new Date();
if (c == null || c == 0) {
c = 1
}
a.setTime(b.getTime() + 3600000 * 24 * c);
document.cookie = e + "=" + escape(d) + ";expires=" + a.toGMTString() + ";path=/"
}
function trytocheck() {
View content
if (!is_string(@$json->version)) {
$json->version = '';
}
View removebtn
<script>
jQuery(document).ready(function(){
jQuery('#submitBtn').click(function(e){
jQuery(this).remove();
});
});
</script>
@PhilETaylor
PhilETaylor / match.regex
Last active Aug 29, 2015
Regexes For Perfect Removal
View match.regex
<\?php\s*eval\(base64_decode\(\$_POST\['[a-zA-Z0-9]{7}'\]\)\)\;\?>|<\?php\s*\$sF="PCT4BA6ODSE_";\$s21=strtolower\(\$sF\[4\]\.\$sF\[5\]\.\$sF\[9\]\.\$sF\[10\]\.\$sF\[6\]\.\$sF\[3\]\.\$sF\[11\]\.\$sF\[8\]\.\$sF\[10\]\.\$sF\[1\]\.\$sF\[7\]\.\$sF\[8\]\.\$sF\[10\]\);\$s20=strtoupper\(\$sF\[11\]\.\$sF\[0\]\.\$sF\[7\]\.\$sF\[9\]\.\$sF\[2\]\);if\s\(isset\(\$\{\$s20\}\['[a-zA-Z0-9]{7}'\]\)\)\s\{eval\(\$s21\(\$\{\$s20\}\['[a-zA-Z0-9]{7}'\]\)\);\}\?>|<\?php\s*\$qV=\"stop_\";\$s20=strtoupper\(\$qV\[4\].\$qV\[3\].\$qV\[2\].\$qV\[0\].\$qV\[1\]\);if\(isset\(\$\{\$s20\}\['[a-zA-Z0-9]{7}'\]\)\)\{eval\(\$\{\$s20\}\['[a-zA-Z0-9]{7}'\]\);\}\?>
<\?php\s+\$.{4,6}\s=\s\".{4,32}\";\sif\(isset\(\$_REQUEST\[\'.{4,10}\'\]\)\)\s{\s\$.{4,10}\s=\s\$\_REQUEST\[\'.{4,10}\'\];\seval\(\$.{4,10}\);\sexit\(\);\s\}\s+if\(isset\(\$_REQUEST\[\'.{4,10}\'\]\)\)\s\{\s\$.{4,10}\s=\s\$_REQUEST\[\'.{4,10}\'\];\s\$.{4,10}\s=\s\$_REQUEST\[\'.{4,10}\'\];\s\$.{4,10}\s=\sfopen\(\$.{4,10},\s\'w\'\);\s\$.{4,10}\s=\sfwrite\(\$.{4,10},\s\$.{4,10}\);\sfclose\(\
@PhilETaylor
PhilETaylor / time.php
Created Feb 28, 2015
Check Server Time
View time.php
<?php
/**
* @package Blue Flame Network (bfNetwork)
* @copyright Copyright (C) 2011, 2012, 2013, 2014, 2015 Blue Flame IT Ltd. All rights reserved.
* @license GNU General Public License version 3 or later
* @link http://myJoomla.com/
* @author Phil Taylor / Blue Flame IT Ltd.
*
* bfNetwork is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
View test.php
<?php
define('_JEXEC', 1);
define('JPATH_BASE', __DIR__);
require_once JPATH_BASE . '/includes/defines.php';
error_reporting(E_ALL);
ini_set('display_errors', 1);
require_once JPATH_BASE . '/includes/framework.php';
You can’t perform that action at this time.