This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} ^.*(.zip|.exe)$ | |
RewriteCond %{HTTP_COOKIE} !^.*wordpress_logged_in.*$ [NC] | |
RewriteRule . /not-loggedin [R,L] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Options All -Indexes | |
<files .htaccess> | |
Order allow,deny | |
Deny from all | |
</files> | |
<files readme.html> | |
Order allow,deny | |
Deny from all | |
</files> | |
<files license.txt> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// step 1 | |
// step 1.1 - url encode the consumer_key and consumer_secret in accordance with RFC 1738 | |
$encoded_consumer_key = urlencode($consumer_key); | |
$encoded_consumer_secret = urlencode($consumer_secret); | |
// step 1.2 - concatinate encoded consumer, a colon character and the encoded consumer secr et | |
$bearer_token = $encoded_consumer_key.':'.$encoded_consumer_secret; | |
// step 1.3 - base64-encode bearer token | |
$base64_encoded_bearer_token = base64_encode($bearer_token); | |
// step 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$user_agent = $_SERVER['HTTP_USER_AGENT']; | |
function getOS() { | |
global $user_agent; | |
$os_platform = "Unknown OS Platform"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'http_request_args', 'dm_prevent_update_check', 10, 2 ); | |
function dm_prevent_update_check( $r, $url ) { | |
if ( 0 === strpos( $url, 'http://api.wordpress.org/plugins/update-check/' ) ) { | |
$my_plugin = plugin_basename( __FILE__ ); | |
$plugins = unserialize( $r['body']['plugins'] ); | |
unset( $plugins->plugins[$my_plugin] ); | |
unset( $plugins->active[array_search( $my_plugin, $plugins->active )] ); | |
$r['body']['plugins'] = serialize( $plugins ); | |
} | |
return $r; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$dir = "*.jpg"; | |
//get the list of all files with .jpg extension in the directory and safe it in an array named $images | |
$images = glob( $dir ); | |
$count = 0; | |
echo "<table><tr>"; | |
//extract only the name of the file without the extension and save in an array named $find | |
foreach( $images as $image ): | |
$count ++; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
#install ruby - https://www.ruby-lang.org/en/documentation/installation/ | |
#------------------------------------------------------------------------------- | |
#Make a directory to contain all the generated vhost config files: | |
#sudo mkdir /etc/apache2/extra/vhosts | |
#Add this line to your /etc/apache2/httpd.conf file: | |
#Include /private/etc/apache2/extra/vhosts/*.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//This file has been modifed from running code if you have any problems contact info@wiseguystechnologies.com | |
//no direct access | |
if (!isset($_POST['sneaky'])) die("DIRECT ACCCESS NOT PERMITTED"); | |
error_reporting(E_ALL); | |
ini_set('display_errors', '1'); | |
$msg = ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#clean your posts | |
SELECT * FROM wp_posts WHERE post_content LIKE '%<iframe%' and post_status='publish' | |
UNION | |
SELECT * FROM wp_posts WHERE post_content LIKE '%<noscript%' and post_status='publish' | |
UNION | |
SELECT * FROM wp_posts WHERE post_content LIKE '%display:%' and post_status='publish' | |
UNION | |
SELECT * FROM wp_posts WHERE post_content LIKE '%<div%' and post_status='publish' | |
UNION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#---------------------------------------------------------------------------------------------------------------------- | |
#Install WP via SSH | |
#----------------------------------------------------------------------------------------------------------------------- | |
#install db for wp | |
mysql -u root -p r87g4fFfgFs4 | |
create database databasename; | |
CREATE USER 'myusername'@'localhost' IDENTIFIED BY 'mypasword'; | |
GRANT ALL ON databasename.* TO 'myusername'@'localhost'; |