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 asyncio | |
import tornado | |
from tornado import gen | |
from tornado.httpclient import AsyncHTTPClient | |
class MainHandler(tornado.web.RequestHandler): | |
@gen.coroutine | |
def get(self): | |
url = self.get_argument('url') | |
filename = self.get_argument('filename') |
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
##Scrape_Clouflare_Protected_Site | |
## More Info: https://pypi.org/project/undetected-chromedriver/ | |
## pip install undetected-chromedriver selenium | |
## https://stackoverflow.com/questions/68289474/selenium-headless-how-to-bypass-cloudflare-detection-using-selenium | |
import undetected_chromedriver as uc | |
from selenium import webdriver | |
options = webdriver.ChromeOptions() | |
options.headless = True | |
driver = uc.Chrome(options=options) |
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 i in *;do inpt="$i"; arrIN=(${inpt//./ }); convert $i ./webp/${arrIN[0]}.webp;done | |
#convert command comes in handy if you have imagemagick and webp installed or else run | |
#sudo apt-get install webp imagemagick |
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
#Purpose of this code is to test your flask app for jinja2 rendering issue | |
#If you have a large database and your jinja2 code can break due to uneven db rows, this will serve the purpose | |
from flask import Flask, request, session, g, redirect, url_for, \ | |
abort, render_template, flash,send_from_directory | |
import MySQLdb,json | |
import datetime | |
app = Flask(__name__, static_url_path='/static') |
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
#pip install suds-jurko | |
#CC=clang sudo -E pip install pycrypto | |
from suds.client import Client | |
url="https://test.pegasus.co.ug:8019/pegpaytelecomsapi/PegPayTelecomsApi.asmx?WSDL" | |
client = Client(url) | |
print client ## shows the details of this service | |
from Crypto.Util.asn1 import DerSequence |
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
Add SSL ciphers : | |
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA'; | |
Fix OpenSSL Padding Oracle vulnerability : | |
https://gist.github.com/ArturT/bc8836d3bedff801dc324ac959050d12 | |
ADD SSL protocols: | |
ssl_protocols TLSv1.2 TLSv1.1 TLSv1; |
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
from gdata import service | |
import gdata | |
import atom | |
import feedparser | |
from time import * | |
banner = """ | |
Blogger Automatic Content Generation and Publication | |
Coded by Ricky L. Wilson | |
Post entries from RSS feeds to a blogger blog using Googles Blogger API. |
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
# -*- coding: utf-8 -*- | |
""" | |
Скрипт для скачивания музыки с сайта vkontakte.ru (vk.com) | |
Запуск: | |
python vkcom_audio_download.py | |
Принцип работы: | |
Скрипт проверяет сохраненный access_token. Если его нет или срок истек, | |
то открывается страница в браузере с запросом на доступ к аккаунту. |
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 | |
### Setup a wifi Access Point on Ubuntu 12.04 (or its derivatives). | |
### make sure that this script is executed from root | |
if [ $(whoami) != 'root' ] | |
then | |
echo " | |
This script should be executed as root or with sudo: | |
sudo $0 | |
" |