Skip to content

Instantly share code, notes, and snippets.

View lukapaunovic's full-sized avatar
🎯
Focusing

Luka Paunović lukapaunovic

🎯
Focusing
  • Serbia
  • 07:51 (UTC +02:00)
View GitHub Profile
@lukapaunovic
lukapaunovic / wp-update.sh
Last active August 25, 2018 22:02
Mass update WP core, themes & plugins - cPanel servers
#!/bin/bash
# Script will not be updating themes. If you want to update themes uncomment last two lines
#Get latest WP-CLI
rm -rf /home/wp
wget --quiet https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -O /home/wp
chmod +x /home/wp
sleep 2
#Color play
#!/bin/bash
# Installing prerequisites
yum -y group install "Development Tools"
yum -y install glibc-static libstdc++-static
# Install
wget ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit.tar.gz
disable_functions = "pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,exec,show_source,system,passthru,shell_exec,proc_open,popen,phpinfo"
@lukapaunovic
lukapaunovic / fix.php
Last active July 2, 2018 12:30
Beaver builder FIX - Call to undefined method FLBuilderAJAX::doing_ajax() in wp-content/plugins/bb-ultimate-addon/classes/class-uabb-backward.php:363
Fatal error: Uncaught Error: Call to undefined method FLBuilderAJAX::doing_ajax() in /home/user/public_html/wp-content/plugins/bb-ultimate-addon/classes/class-uabb-backward.php:363
To fix this error simply open
/home/user/public_html/wp-content/plugins/bb-ultimate-addon/classes/class-uabb-backward.php
Find:
if ( ! FLBuilderModel::is_builder_active() && FLBuilderAJAX::doing_ajax() ) {
@lukapaunovic
lukapaunovic / openbasedir-suphp-cpanel.sh
Created March 13, 2018 20:43
SUPHP cPanel open_basedir hardening
#!/bin/bash
value="open_basedir"
for USER in $(ls -I system /var/cpanel/users/)
do
if [ ! -f /home/$USER/.user.ini ]; then
sudo -H -u$USER bash -c "echo 'open_basedir = /home/$USER:/tmp:/opt/cpanel/composer/bin/composer:/var/cpanel/php/sessions/' >> /home/$USER/.user.ini"
chmod 0555 /home/$USER/.user.ini