Skip to content

Instantly share code, notes, and snippets.

View BobDu's full-sized avatar
🎯
Focusing

Bob Du BobDu

🎯
Focusing
View GitHub Profile
@BobDu
BobDu / google_translate.py
Created April 24, 2020 03:48
google translate api
import time
import hashlib
import html
from urllib import parse
import logging
import urllib3
import requests
import execjs
#! usr/bin/env python3
# pip install --force-reinstall https://github.com/Bob-Du/selenium-wire/archive/header_overrides.zip
import time
import hashlib
import toml
from seleniumwire import webdriver
@BobDu
BobDu / test_mayiproxy.py
Created April 10, 2019 06:09
mayi proxy
import hashlib
import time
import requests
import toml
from requests.packages.urllib3.exceptions import InsecureRequestWarning # pylint: disable=import-error
requests.packages.urllib3.disable_warnings(InsecureRequestWarning) # pylint: disable=no-member
cfg = toml.load('test.toml')
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class UrlRe {
public static void main(String[] args){
String html_str = "<html>\n" +
" <head>\n" +
" <meta content=\"always\" name=\"referrer\"> \n" +
" <script>\n" +
" var url = '';\n" +
@BobDu
BobDu / vcode.py
Last active April 10, 2019 06:10
Draw vcode
def vcode(request):
# 引入绘图模块
from PIL import Image, ImageDraw, ImageFont, ImageFilter
# 引入随机函数模块
import random
r = random.randrange
# 定义变量,用于画面的背景色、宽、高
bgcolor = (r(150, 200), r(150, 200), r(150, 200))
width = 100
height = 30