Skip to content

Instantly share code, notes, and snippets.

@lbr77
lbr77 / Dockerfile
Last active April 3, 2020 02:24
aria2docker
# Dockerfile to build aria2 Windows binary using ubuntu mingw-w64
# cross compiler chain.
#
# $ sudo docker build -t aria2-mingw - < Dockerfile.mingw
#
# After successful build, windows binary is located at
# /aria2/src/aria2c.exe. You can copy the binary using following
# commands:
#
# $ id=$(sudo docker create aria2-mingw)

Keybase proof

I hereby claim:

  • I am lbr77 on github.
  • I am lbr77 (https://keybase.io/lbr77) on keybase.
  • I have a public key whose fingerprint is 5662 9CE9 1E3C 4E14 9421 F81F B7CB C14B 9515 95E9

To claim this, I am signing this object:

@lbr77
lbr77 / 🎮 最近我在玩…
Last active June 23, 2021 00:56
steam活动记录
🚫 啊哦,最近好像没有玩过游戏呢
C++ 🕓 6h36m █████████████████████▏░░░░░░ 75.9%
YAML 🕓 29m █▌░░░░░░░░░░░░░░░░░░░░░░░░░░ 5.6%
JavaScript 🕓 28m █▌░░░░░░░░░░░░░░░░░░░░░░░░░░ 5.5%
Python 🕓 20m █░░░░░░░░░░░░░░░░░░░░░░░░░░░ 3.9%
Other 🕓 16m ▉░░░░░░░░░░░░░░░░░░░░░░░░░░░ 3.1%
@lbr77
lbr77 / index.js
Created May 22, 2021 10:53
CDN开源
addEventListener("fetch", event => {
event.respondWith(handleRequest(event))
})
const BUCKET_NAME = "lbr77/CDN@main"
const BUCKET_URL = `http://cdn.jsdelivr.net/gh/${BUCKET_NAME}`
async function serveAsset(event) {
const url = new URL(event.request.url)
const cache = caches.default
@lbr77
lbr77 / index.js
Created May 29, 2021 07:01
基于CF-Workers的站点PV统计
addEventListener("fetch", (event) => {
event.respondWith(
handleRequest(event)
);
});
async function handleRequest(event){
const url = new URL(event.request.url);
const method = event.request.method;
if(method === "GET"){
let record = await JSON.parse(await KV.get("RECORD"))
@lbr77
lbr77 / install.sh
Created August 10, 2022 14:29
Scripts for Synology DS120j or similar machines to install docker
#!/usr/bin/env bash
# Description: Install docker-aarch64 for ds120j
# System Required: Synology
# Author: lbr77
# some scrpts from github.com/P3TERX
#
# MIT License
#
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
@lbr77
lbr77 / solve.py
Last active December 31, 2023 14:11
Game
import base64 as b64
def bintotext(ress, count=7):
res = ""
for i in range(0, len(ress), count):
res += chr(int(ress[i : i + count], 2))
return res
@lbr77
lbr77 / README.md
Last active February 17, 2024 16:25
HashExtensionExploit

PyMd5 from https://github.com/Utkarsh87/md5-hashing/blob/master/md5.py

Usage:

from hash_ext_exp import HashExtensionExploit
import hashlib
key = b"test"
old_msg = b"1234555"
old_hash = hashlib.md5(key+old_msg).hexdigest()
nhash,nmsg = HashExtensionExploit(old_msg,old_hash,len(key),b"1234").run();