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 python | |
# -*- coding: utf-8 -*- | |
from base64 import urlsafe_b64encode as b64encode | |
import random | |
random.seed() | |
pattern = "%%0%dX" | |
junk_len = 1024 |
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
-- Search for duplicate path: | |
SELECT c1.id,c1.path,c2.id,c2.path FROM `p5shp_categories` as c1, `p5shp_categories` as c2 WHERE c1.id != c2.id AND c1.path=c2.path; | |
-- Fix them all | |
UPDATE `p5shp_categories` SET path = CONCAT( path, CONCAT( '_', ( | |
FLOOR( 1 + RAND( ) *60 ) )) | |
) WHERE id IN ( | |
SELECT * |
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 python | |
# -*- coding: utf-8 -*- | |
from sslscan.ui import run | |
if __name__ == '__main__': | |
print 'Example of usage:' | |
print 'scan.py scan --scan=server.ciphers --report=term --tls10 docs.python.org' | |
run() |
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
import requests | |
import vk | |
from vk.exceptions import VkAPIError | |
from re import match, DOTALL | |
from django.conf import settings | |
access_token = settings.VK_TOKEN | |
token_user_id = settings.VK_USER_ID | |
part_of_phone = settings.VK_SECURITY_CHECK_CODE |
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 | |
# domain google.bit | |
DOMAIN="google" | |
DOMAINSPACE="bit" | |
expires=$(curl "https://peername.net/api/?name=$DOMAIN&namespace=$DOMAINSPACE" 2>&1 | grep expires_in | grep -oE '[0-9]+') | |
notify_via_telegram() | |
{ | |
MESSAGE=$1 | |
# your telegram ID | |
TELEGRAM_CHAT='10000000' |
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
# лимит соединений с ОС Linux | |
sysctl -a | grep conntrack_max | |
echo "net.netfilter.nf_conntrack_max=1048576" >> /etc/sysctl.conf | |
# максимальное количество соединений для работы механизма connection tracking | |
echo "net.ipv4.netfilter.ip_conntrack_max=16777216" >> /etc/sysctl.conf | |
# максимальное число открытых сокетов, ждущих соединения | |
echo "net.core.somaxconn=65535" >> /etc/sysctl.conf | |
# применить изменения | |
sysctl -p /etc/sysctl.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
#!/usr/bin/env bash | |
PUSHER_USERNAME=webpusher | |
PUSHER_PASSWORD="1O23%dv5d3}qaa2" | |
apt update && apt -y upgrade | |
# install requirements from apt | |
apt install -y mc htop php-gmp php-mbstring php-curl php-mysql openssl | |
# add user with ssh | |
useradd -m -p $PUSHER_PASSWORD $PUSHER_USERNAME |
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
cloudflare -> Crypto -> Origin Certificates | |
Create RSA Certificate | |
Save Certificate and Private Key | |
Add it to Vesta with authorities (Cloudflare Origin CA) from https://support.cloudflare.com/hc/en-us/articles/218689638-What-are-the-root-certificate-authorities-CAs-used-with-CloudFlare-Origin-CA- | |
-----BEGIN CERTIFICATE----- | |
MIID/DCCAuagAwIBAgIID+rOSdTGfGcwCwYJKoZIhvcNAQELMIGLMQswCQYDVQQG |
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 bash | |
function send_telegram { | |
echo "$1" | |
} | |
ver1path="$0.1.cache" | |
ver2path="$0.2.cache" | |
ver1=$(cat $ver1path) | |
curl --silent "https://9gag.com/gag/a2Z7Vpw" 2>&1 | grep 'fbq(' > "$ver2path" |
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 | |
cd "$(dirname "$0")" | |
inotifywait --format '%f' -m -e close_write -e moved_to "./" |\ | |
( | |
while read | |
do | |
FILE_TO_UNZIP=$(echo $REPLY | grep --only-matching --ignore-case -P "^.+\.(zip|rar|7z)$") | |
if [ "$FILE_TO_UNZIP" != "" ] | |
then |
OlderNewer