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
nano /etc/my.cnf.d/server.cnf | |
[mysqld] | |
sql_mode="" | |
max_allowed_packet=512M | |
character-set-server = utf8mb4 | |
collation-server = utf8mb4_unicode_ci | |
max_connections = 10000 |
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
function mikrotik_ssh_to_array( $x ){ | |
$out_arr=array(); | |
$out_i=0; | |
$x=str_replace('"' , '' , $x); | |
preg_match_all('/([^:]*?):([^\r\n]*)\r\n?/', $x, $matches); | |
foreach( $matches[1] as $k ){ | |
$k=preg_replace('/\r\n/','' , $k); | |
$k = preg_replace('!\s+!', ' ', $k); | |
$k_arr=explode(' ', $k); |
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
for k in `find /usr/local/directadmin/data/users/ -type f -name 'crontab.conf' `; do echo"" > $k;done |
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
awk -F\" '($2 ~ "evtbxznx"){print $0$1$2}' /var/log/httpd/domains/*log |
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 | |
DATE=`date +%Y-%m-%d-%H-%M-%S` | |
LOCAL_BACKUP_DIR="/var/www/backup" | |
DB_NAME="xxxxxxxx" | |
DB_USER="xxxxxxxxx" | |
DB_PASSWORD="xxxx" | |
table=$1 | |
############### Local Backup ######################## |
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
npm install | |
npm test |
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
'use strict' | |
const express = require('express') | |
const bodyParser = require('body-parser') | |
var webshot = require('/root/node-webshot/lib/webshot') | |
var options = { shotSize: { height: 'all' } , renderDelay : 500 , quality : 75 }; | |
const app = express() | |
app.use(bodyParser.urlencoded({ extended: false })) | |
app.use('/images', express.static(__dirname + '/images')) | |
app.post('/web', function (req, res) { | |
const myurl = req.body.myurl ; |
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
function check_only_farsi_harf($data_string){ | |
if ( strpos( $data_string , '-' ) !==false ){ | |
return 'no'; | |
} | |
if ( strpos( $data_string , '@' ) !==false ){ | |
return 'no'; | |
} |
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 | |
$date=date('Y-m-d H:i:s'); | |
?> |
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
for k in ` tail -100000 /var/log/httpd/domains/omranifard.com.log | grep POST | awk '{print $1}' | uniq -c `; do sh /var/www/html/davari/ipblock.sh $k; done |
OlderNewer