Skip to content

Instantly share code, notes, and snippets.

View zthxxx's full-sized avatar
🐾
Nyaa~

zthxxx zthxxx

🐾
Nyaa~
View GitHub Profile
@zthxxx
zthxxx / init.sh
Last active August 2, 2018 04:39
server initialize - debian
apt update
apt install -y vim lrzsz python3 python3-dev python3-pip python3-venv
curl -SL# git.io/tvimrc -o ~/.vimrc
curl -sSL git.io/jovial | bash
# curl -sSL git.io/sslaunch | bash
@zthxxx
zthxxx / PoW-CTFjs
Created March 27, 2018 04:59
Proof of work in CTF-wirteup
cosnt crypto = require('crypto')
const md5sum = str => crypto.createHash('md5').update(str).digest('hex')
function PoW(target, start, end) {
while (true) {
let rand = Math.random().toString(36)
let hash = md5sum(rand).slice(start, end)
if (hash === target) return rand
}
}
@zthxxx
zthxxx / win-kms.bat
Last active January 31, 2024 05:32
win-kms
:: active win10 VL
:: ensure you are run as Administrator
cmd /c "slmgr /skms kms.03k.org && slmgr /ato"
:: active office VL
:: in Microsoft Office installed folder
:: office2016 64bit default in C:\Program Files\Microsoft Office\Office16
cd "C:\Program Files\Microsoft Office\Office16"
cscript ospp.vbs /sethst:kms.03k.org && cscript ospp.vbs /act
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active May 9, 2024 14:09
crack activate Office on mac with license file
@zthxxx
zthxxx / install-EFB.sh
Last active July 21, 2020 04:58
install ehForwarderBot 2.0
apt install -y python3-pip libopus0 ffmpeg libmagic1
pip3 install setuptools ehforwarderbot efb-telegram-master efb-wechat-slave
EFB_DATA_PATH="${HOME}/.ehforwarderbot"
EFB_PROFILE="${EFB_DATA_PATH}/profiles/default"
mkdir -p ${EFB_PROFILE}/blueset.telegram
cat > ${EFB_PROFILE}/config.yaml <<-EOF
master_channel: blueset.telegram
slave_channels:
@zthxxx
zthxxx / deb-install-docker.sh
Last active May 9, 2018 17:59
install docker with DEB package on debian / ubuntu
#!/usr/bin/env bash
# curl -sL https://gist.githubusercontent.com/zthxxx/772178f5393b07c1e1bb7536c5f95c3d/raw/deb-install-docker.sh | bash
specify_user="${1:-root}"
apt update
apt install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common
apt remove -y docker docker-engine docker.io
LSB=`lsb_release -is | tr '[:upper:]' '[:lower:]'`
curl -fsSL https://download.docker.com/linux/${LSB:-debian}/gpg | apt-key add -
@zthxxx
zthxxx / mongo-docker-init.sh
Last active December 30, 2019 13:48
mongodb docker init operate
# mongo docker init operate
mongo_data="/var/lib/mongo/db"
sudo mkdir -p "$mongo_data"
sudo chown -R $USER "$mongo_data"
docker run --rm -v "$mongo_data":/data/db mongo:3.6 init-db.js
docker run -d --rm -v "$mongo_data":/data/db -p 127.0.0.1:23333:27017 --name mongo -h mongodb mongo:3.6 --auth
docker logs -f mongo
@zthxxx
zthxxx / bundle.bat
Created April 17, 2018 12:22
bundle python package to win exe (support pandas)
@echo off
if not exist venv/ call init.bat
call venv\Scripts\activate.bat
pyinstaller -F main.py --hidden-import=pandas._libs.tslibs.timedeltas
call venv\Scripts\deactivate.bat
rd /s/q build
@zthxxx
zthxxx / crack-with-navicat-keygen.sh
Last active August 13, 2021 15:04
crack navicat premuim 12.04 with navicat-keygen
# make sure exist a keychain identity preference named "crack-for-navicat"
# ref: https://github.com/DoubleLabyrinth/navicat-keygen/tree/mac
# to gen a identity,
# https://github.com/DoubleLabyrinth/navicat-keygen/issues/50#issuecomment-416824334
# set the Name: crack-for-navicat
# set the Certificates Type: Code Signing
# after created, you need always trust this identity,
# then you can use this commad under to check:
# security find-identity -vp codesigning
const raw = require('fs').readFileSync('/dev/stdin', 'utf8').trim().split('\n')
let line
while (line = raw.shift()) {
console.log(line)
}