Skip to content

Instantly share code, notes, and snippets.

View jordantrizz's full-sized avatar

Jordan jordantrizz

View GitHub Profile
Sometimes the web run fails. Currently, mine fails when using SSL and a few other things. So I created a way to run exploit scanner from the command line using the following code. I got no errors but a proper scan. The issue then is most likely the feed back via Javascript that happens not the actual exploit scanner. I named this 'exploitscan.php' and put it in my utility directory of other useful tools.
<?php
$_SERVER['SERVER_NAME'] = "your.serverurl.com";
include("/usr/share/wordpress/wp-load.php");
error_reporting(E_ERROR|E_PARSE);
$fsl = 400;
$dis = 1;
set_time_limit(0);

Keybase proof

I hereby claim:

  • I am jordantrizz on github.
  • I am c0mm (https://keybase.io/c0mm) on keybase.
  • I have a public key ASBH3HoXM1qCAG_67dSh6pLffseAR_FqkAt4EtrhLFWMtgo

To claim this, I am signing this object:

@jordantrizz
jordantrizz / booster_hidden_item_meta_fix.php
Last active April 23, 2019 21:14
Booster for WooCommerce Short Codes Showing Hidden Item Meta like _wc_cog and _reduced_stock
<?php
/*
* Plugin Name: Booster Hidden Item Meta Fix
* Plugin URI: https://www.geektank.net/2019/04/booster-for-woocommerce-showing-hidden-item-meta/
* Description: This plugin fixes hidden item meta from showing on specific Booster for WooCommerce shortcodes
* Author: Jordan
* Version: 0.1
The following code will hide meta for the following plugins which should not be shown as they're
suppose to be hidden.
@jordantrizz
jordantrizz / class-wp-snow-effect-public.php.patch
Created December 17, 2019 03:09
Patching wp-snow-effect to work with WooCommerce
--- class-wp-snow-effect-public.php 2019-12-17 03:06:06.842908469 +0000
+++ class-wp-snow-effect-public.php.patch 2019-12-17 02:53:58.666773426 +0000
@@ -106,7 +106,9 @@
$show = true;
if (wp_is_mobile() && $this->settings['settings_show_on_mobile'] != 'mobile') $show = false;
if (is_home() && $this->settings['settings_show_on_home'] != 'home') $show = false;
- if (is_page() && $this->settings['settings_show_on_pages'] != 'pages') $show = false;
+ if (is_page() && $this->settings['settings_show_on_pages'] != 'pages') {
+ if(is_front_page() && $this->settings['settings_show_on_home'] = 'home') $show = true; else $show = false;
+ }
@jordantrizz
jordantrizz / gist:fd058cca6f2c832e4776392348a00aed
Last active December 20, 2019 03:07
Patch File for Including Taxes in Booster for WooCommerce Minimum Orders
--- booster-plus-for-woocommerce/includes/class-wcj-order-min-amount.php 2019-12-12 19:27:10.073916633 +0000
+++ booster-plus-for-woocommerce/includes/class-wcj-order-min-amount.php 2019-12-20 02:41:28.750399681 +0000
@@ -105,7 +105,8 @@
if ( 'yes' === get_option( 'wcj_order_minimum_amount_exclude_shipping', 'no' ) ) {
$shipping_total = isset( WC()->cart->shipping_total ) ? WC()->cart->shipping_total : 0;
$shipping_tax_total = isset( WC()->cart->shipping_tax_total ) ? WC()->cart->shipping_tax_total : 0;
- $cart_total -= ( $shipping_total + $shipping_tax_total );
+ $tax_total = isset( WC()->cart->tax_total ) ? WC()->cart->tax_total : 0;
+ $cart_total -= ( $shipping_total + $shipping_tax_total + $tax_total);
}
@jordantrizz
jordantrizz / ngix-helper-role-purge-cache.php
Last active June 10, 2020 13:36
Nginx Helper - Role Purge Cache
<?php
/**
* Plugin Name: Nginx Helper - Role Purge Cache
* Plugin URI: https://rtcamp.com/nginx-helper/
* Description: Allows store manager role to purge page and site cache.
* Version: 0.1
* Author: Hubert, Koen Adams, Jordan Trask
* Author URI: https://
* Text Domain: nginx-helper-store-manager
@jordantrizz
jordantrizz / divi-nginx-helper-cache.php
Last active June 11, 2020 23:21
Divi Purge Cache with nginx-helper plugin
<?php
/*
Plugin Name: Divi Plugin for Nginx Helper
Description: This is a GP helper plugin created for our customers.
Author: GridPane
Network: true
There is another function that you can use and assign it to the save page hook:
et_core_page_resource_auto_clear()
<?php
// Don't disable on dev
if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) {
// Disable core update checking
add_filter( 'pre_site_transient_update_core', create_function( '$a', "return null;" ) );
remove_action( 'admin_init', '_maybe_update_core' );
remove_action( 'wp_version_check', 'wp_version_check' );
@jordantrizz
jordantrizz / gist:d636803b33d9fa4f2ede0cee5968d73a
Created February 16, 2021 20:34
SQL Truncate on Log Table within cleantalk-spam-protect/lib/Cleantalk/ApbctWP/Firewall/SFW.php
300 /**
301 * Sends and wipe SFW log
302 *
303 * @param $db
304 * @param $log_table
305 * @param string $ct_key API key
306 *
307 * @return array|bool array('error' => STRING)
308 */
309 public static function send_log( $db, $log_table, $ct_key ) {
@jordantrizz
jordantrizz / gist:520da7b14b4bfa26d4d0821dd021f21b
Created December 3, 2021 13:55
Prestashop Default .htaccess
# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums
<IfModule mod_rewrite.c>
<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE On
</IfModule>
RewriteEngine on