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
grep -lr --include=*.php "eval(base64_decode" /home | |
find /home -type f -name '*.php' | xargs grep -l "eval *(" --color | |
find /home -type f -name '*.php' | xargs grep -l "base64_decode *(" --color | |
find /home -type f -name '*.php' | xargs grep -l "gzinflate *(" --color | |
find /home -type f -name '*.php' | xargs grep -l "outdo" --color | |
find /home -type f -name '*.php' | xargs grep -l "eval*_POST" --color | |
find /home -type f -name '*.php' | xargs grep -l "$ptzrw" --color | |
find /home/*/domains/*/public_html/wp-content/uploads -type f -name '*.php' | |
find /home/ -type d -perm 777 -exec find {} -name "*.php" \; |
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
sudo su | |
Suppress lengthy login messages: | |
touch .hushlogin | |
Get the existing package metadata up to date, and upgrade all existing packages: | |
apt -y update | |
apt -y upgrade | |
apt -y install mlocate |
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
scp -P 22 root@185.xx.xx.xx:/var/www/html/backups.zip /var/www/html/davari |
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
sudo yum install -y epel-release | |
sudo yum install -y certbot-nginx | |
sudo firewall-cmd --add-service=http | |
sudo firewall-cmd --add-service=https | |
sudo firewall-cmd --runtime-to-permanent | |
sudo certbot --nginx -d example.com -d www.example.com |
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
rateLimit := time.Second / 100 // 100 messages per second | |
throttle := time.NewTicker(rateLimit) | |
for msg := range msgs { | |
<-throttle.C // Wait for the next tick | |
go handle(msg) // Process the message | |
} |
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
yum install -y openssl-devel libxml2-devel texlive-* m4 gcc-c++ make | |
yum-config-manager --disable mysql80-community | |
yum-config-manager --enable mysql57-community | |
yum install -y mysql-devel | |
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
package main | |
import ( | |
"context" | |
"io/ioutil" | |
"log" | |
"time" | |
"github.com/chromedp/chromedp" | |
) |
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
sudo systemctl enable mongodb | |
show dbs | |
use admin | |
db.dropUser("yyyy") | |
db.createUser({user:"zzzz", pwd:"xxxx", roles:[{role:"root", db:"admin"}]}) | |
mongo -u admin -p admin123 --authenticationDatabase admin | |
enabled within the security section of your mongod.conf file (like below). | |
security: |
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
ulimit | |
update os | |
install wget , zip , unzip , tcpdump | |
os limit | |
allow soduer | |
allow no password | |
swap 16 G |
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
addEventListener('fetch', event => { | |
event.respondWith(handleRequest(event.request)) | |
}) | |
/** | |
* Respond with hello worker text | |
* @param {Request} request | |
*/ | |
async function handleRequest(request) { | |
if (request.method !== 'POST') { | |
return new Response('Method Not Allowed', { status: 405 }) |