Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
# encoding: utf-8
import sys
import execjs
def runjs(password):
js = execjs.compile("""
var k = RSAUtils = {}
@xl7dev
xl7dev / DnsHelper.py
Created February 6, 2018 10:49
AsyncResolver for python3.5+
#!/usr/bin/env python
# encoding: utf-8
"""
@author: xl7dev
@time: 2018/2/6 上午11:40
for Python3.5+
"""
import random
import string
@xl7dev
xl7dev / request_c.py
Last active October 16, 2018 11:17
python request文件下载续传
#!/usr/bin/env python
# encoding: utf-8
"""
@author: xl7dev
"""
import sys
import os
import cgi
import re
#!/usr/bin/env python
# encoding: utf-8
"""
@author: xl7dev
"""
from aiohttp import ClientSession
import asyncio
import optparse
from pymongo import MongoClient
curl -s -XPOST https://www.hackthebox.eu/api/invite/generate | jq .data.code|sed 's/"//g'|base64 -d
@xl7dev
xl7dev / logsdk.py
Created February 7, 2022 07:39
python logging & colorlog
import logging
import os
from logging.handlers import RotatingFileHandler #
import colorlog # 控制台日志输入颜色
log_colors_config = {
'DEBUG': 'cyan',
'INFO': 'green',
'WARNING': 'yellow',
'ERROR': 'red',
@xl7dev
xl7dev / bypassheadless.js
Created February 7, 2022 15:19
bypass headless javascript
// overwrite the `languages` property to use a custom getter
Object.defineProperty(navigator, "languages", {
get: function() {
return ["zh-CN","zh"];
}
});
// Overwrite the `plugins` property to use a custom getter.
Object.defineProperty(navigator, 'plugins', {
// get: () => [1, 2, 3, 4, 5],