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 | |
//Just uploading photo or attachments | |
require_once(ABSPATH . "wp-admin" . '/includes/image.php'); | |
require_once(ABSPATH . "wp-admin" . '/includes/file.php'); | |
require_once(ABSPATH . "wp-admin" . '/includes/media.php'); | |
$file_handler = 'upload_attachment' //Form attachment Field name. | |
$attach_id = media_handle_upload( $file_handler, $post_id ); |
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
#!/bin/bash | |
# All users from all domains from all accounts in /home | |
MAILDIRS=$(find /home/*/mail/ -type d) | |
# Only .Trash .Junk .Spam folders | |
INBOXFOLDERS=(.Trash .Junk .spam) | |
for basedir in $MAILDIRS; do | |
for ((i = 0; i < ${#INBOXFOLDERS[*]}; i++)); do | |
# Only cur and new folders | |
for dir in cur new; do | |
# Only if the full path to the folder exists |
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 | |
// ADD LOGIN / LOGOUT FUNCTION TO MENU | |
add_filter('wp_nav_menu_items', 'add_login_logout_link', 10, 2); | |
function add_login_logout_link($items, $args) { | |
ob_start(); | |
wp_loginout('index.php'); | |
$loginoutlink = ob_get_contents(); | |
ob_end_clean(); | |
$items .= '<li>'. $loginoutlink .'</li>'; return $items; | |
} |
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 | |
//BLOCK USERS EXCEPT ADMIN FROM DASHBOARD / WP-LOGIN | |
add_action( 'init', 'blockusers_init' ); | |
function blockusers_init() { | |
if ( is_admin() && ! current_user_can( 'administrator' ) && | |
! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) { | |
wp_redirect( home_url() ); | |
exit; | |
} | |
} |
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 | |
//DISABLE TOP BAR FOR ALL USERS EXCEPT ADMIN | |
add_action('after_setup_theme', 'remove_admin_bar'); | |
function remove_admin_bar() { | |
if (!current_user_can('administrator') && !is_admin()) { | |
show_admin_bar(false); | |
} | |
} |
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
# Lista de AS´s (Autonomous System) | |
# Gamas de IP servidores / ISP / networking nacionais | |
# Obtido em: http://www.zon.pt/Internet/Detalhe.aspx?detail=XzU29K | |
Allow from 193.64.0.0/24 | |
Allow from 195.245.234.0/24 | |
Allow from 194.140.238.0/24 | |
Allow from 84.39.0.0/16 | |
Allow from 195.95.236.0/23 | |
Allow from 193.16.103.0/24 |
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 | |
RewriteCond %{HTTP_HOST} !^www\. | |
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] | |
<ifModule mod_rewrite.c> | |
# mod rewrite redirects | |
RewriteEngine On | |
# LIST1 provided by hackers |
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
egrep -R -l '$OOO0O0O00|r0nin|m0rtix|r57shell|c99shell|phpshell|void\.ru|phpremoteview|directmail|bash_history|\.ru/|brute *force|MultiViews|cwings|bitchx|eggdrop|guardservices|psyBNC|DALnet|CASPER|RFI|CRACK|casper|rfi|crack|scanner' /home/sites/*/web | grep .php | grep -v phpThumb | grep -v index.php | grep -v admin. | grep -v lang_ >> /root/scripts/hax.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
#! /bin/bash | |
# Test an IP address for validity: | |
# Usage: | |
# valid_ip IP_ADDRESS | |
# if [[ $? -eq 0 ]]; then echo good; else echo bad; fi | |
# OR | |
# if valid_ip IP_ADDRESS; then echo good; else echo bad; fi | |
# | |
function valid_ip() | |
{ |
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
# | |
# DFIX Configuration File. | |
# | |
# Dovecot Process limits | |
# | |
# When the number of Dovecot processes exceeds the MAX value, dfix will stop dovecot until the number of processes | |
# drops beliw the MIN value. | |
MIN=10 | |
MAX=50 |
OlderNewer