Skip to content

Instantly share code, notes, and snippets.

View kodi-python-assert-ignored-fml.md

addon.py

def log(msg):
    print('[test] %s' % msg)

data = {'key1':1, 'key': 2}
try:
    assert 'key3' in data, 'no key'
except Exception as e:
    log(str(e))
@4ft35t
4ft35t / pdfaddtext.py
Created Apr 2, 2018 — forked from ficapy/pdfaddtext.py
网页版本使用(20页使用限制) https://ocr.ficapy.com
View pdfaddtext.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: ficapy
import io
from urllib.parse import urlencode
from base64 import b64encode
from pdf2image import convert_from_bytes
from PyPDF2 import PdfFileWriter, PdfFileReader
@4ft35t
4ft35t / OpenWrt detect new device and send text message.md Detect new network devices connecting to OpenWrt and send text message
View OpenWrt detect new device and send text message.md
@4ft35t
4ft35t / who-weibo.js
Created Sep 5, 2017 — forked from zh-h/who-weibo.js
是谁发的微博微博图片
View who-weibo.js
function decodeBase62(number) {
var alphabet = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
var out = 0
var len = number.length - 1
for (var t = 0; t <= len; t++) {
out = out + alphabet.indexOf(number.substr(t, 1)) * Math.pow(62, len - t)
}
return out
}
@4ft35t
4ft35t / jq.fullpage.html
Last active Aug 23, 2017
jquery.fullPage.min.js DOM XSS
View jq.fullpage.html
<script src="jquery.min.js"></script>
<script src="jquery.fullPage.min.js"></script>
<script>
$(document).ready(function() { $.fn.fullpage({ anchors: ['page1'], }); })
</script>
jquery.fullPage.min.js < 2.6.5 DOM XSS
https://github.com/alvarotrigo/fullPage.js/issues/1747
View export-chrome-cookie.sh
@4ft35t
4ft35t / udp2tcp_dns.py
Created Feb 22, 2017 — forked from korc/udp2tcp_dns.py
Convert DNS UDP to TCP
View udp2tcp_dns.py
#!/usr/bin/python
import socket, os, select, struct
import errno
import logging
from logging import info, warn, error
logging.root.setLevel(logging.INFO)
@4ft35t
4ft35t / mokee.sh
Created Feb 13, 2017
mokee rom download
View mokee.sh
# javascript:downloadPost('ad-dl.php', { get:'183e4f6a9d104dcaff479b8dc9d21556' })
curl 'https://download.mokeedev.com/link.php' -d 'key=183e4f6a9d104dcaff479b8dc9d21556' | aria2c -i-
@4ft35t
4ft35t / http-benchmark.md
Created Feb 10, 2017 — forked from denji/http-benchmark.md
HTTP(S) Benchmark Tools / Toolkit for testing/debugging HTTP(S) and restAPI (RESTful)
View http-benchmark.md

Tools

Located in alphabetical order (not prefer)

  • ab – slow and single threaded, written in C
  • apib – most of the features of ApacheBench (ab), also designed as a more modern replacement, written in C
  • baloo – Expressive end-to-end HTTP API testing made easy, written in Go (golang)
  • bombardier – Fast crossplatform HTTP benchmarking tool, written in Go (golang)
  • curl-loader – performance loading of various application services and traffic generation, written in C
  • fasthttploader – benchmark (kinda ab) with autoadjustment and charts based on fasthttp library, write in Go (golang)
@4ft35t
4ft35t / subtitle_downloader.py
Created Nov 17, 2016 — forked from ihciah/subtitle_downloader.py
Xunlei subtitle downloader
View subtitle_downloader.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
# __author__ = 'ihciah'
# cid_hash_file function from https://github.com/binux/lixian.xunlei/blob/master/libs/tools.py
import hashlib
import inotify.adapters
import os
import requests
import re