Skip to content

Instantly share code, notes, and snippets.

View wongsyrone's full-sized avatar
😂
Babysitting

Syrone Wong wongsyrone

😂
Babysitting
View GitHub Profile
@wongsyrone
wongsyrone / ssl-cert.txt
Created August 24, 2022 23:35
Fix Slow HTTPS upload on IIS (Windows Server) by disabling Client Certificate Revocation (CRL) Check
View ssl-cert.txt
https://techcommunity.microsoft.com/t5/iis-support-blog/disable-client-certificate-revocation-crl-check-on-iis/ba-p/377134
C:\Users\Administrator>netsh http show sslcert
SSL 证书绑定:
-------------------------
IP:端口 : 0.0.0.0:8088
证书哈希 : 051103df1950988a8643134f68d9beaf9d149xxx
应用程序 ID : {4dc3e181-e14b-4a21-b022-59fc669b0xxx}
@wongsyrone
wongsyrone / tmux-cheatsheet.markdown
Created November 6, 2021 08:52 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@wongsyrone
wongsyrone / Correct_GnuPG_Permission.sh
Created July 26, 2021 03:29 — forked from oseme-techguy/Correct_GnuPG_Permission.sh
This fixes the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error while using Gnupg .
View Correct_GnuPG_Permission.sh
#!/usr/bin/env bash
# To fix the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error
# Make sure that the .gnupg directory and its contents is accessibile by your user.
chown -R $(whoami) ~/.gnupg/
# Also correct the permissions and access rights on the directory
chmod 600 ~/.gnupg/*
chmod 700 ~/.gnupg
@wongsyrone
wongsyrone / a.md
Created July 8, 2021 03:05
cargo best extensions
View a.md
$ cargo install cargo-edit cargo-expand cargo-audit
@wongsyrone
wongsyrone / dump-pyc-with-gdb.md
Created June 14, 2021 13:09 — forked from stecman/dump-pyc-with-gdb.md
Dumping all bytecode from a packaged Python application
View dump-pyc-with-gdb.md

This is a technique for extracting all imported modules from a packaged Python application as .pyc files, then decompiling them. The target program needs to be run from scratch, but no debugging symbols are necessary (assuming an unmodified build of Python is being used).

This was originally performed on 64-bit Linux with a Python 3.6 target. The Python scripts have since been updated to handle pyc files for Python 2.7 - 3.9.

Theory

In Python we can leverage the fact that any module import involving a .py* file will eventually arrive as ready-to-execute Python code object at this function:

PyObject* PyEval_EvalCode(PyObject *co, PyObject *globals, PyObject *locals);
@wongsyrone
wongsyrone / main.go
Created March 8, 2021 06:22
top TLS fingerprint
View main.go
// import tls "github.com/refraction-networking/utls"
tcpConn, err := net.Dial("tcp", "tlsfingerprint.io:443")
if err != nil {
fmt.Printf("net.Dial() failed: %+v\n", err)
return
}
config := tls.Config{ServerName: "tlsfingerprint.io"}
tlsConn := tls.Client(tcpConn, &tlsConfig, utls.HelloCustom)
clientHelloSpec := tls.ClientHelloSpec {
@wongsyrone
wongsyrone / gist:4f5b0562f5e4137ffa57c7596f882f4b
Created May 4, 2020 22:13
分享解密某Android电视adb后门方法
View gist:4f5b0562f5e4137ffa57c7596f882f4b
双十一,剁手入手某电视,“根据xxx法规,禁止安装该软件...”,开机有广告,
凭经验,智能设备一般情况下都有“后门”,
系统设置,没发现有adb选选项,
@wongsyrone
wongsyrone / musl-libc-trojan-linux.txt
Created January 2, 2020 11:07
build musl-libc trojan for linux x86 ubuntu 16.04 vps
View musl-libc-trojan-linux.txt
In Alpine linux, use bash shell
boost
bash bootstrap.sh
./b2 --stagedir=/home/wong/boost-stage architecture=x86 address-model=64 toolset=gcc variant=release link=static threading=multi --with-system --with-date_time --with-program_options stage
View gist:ba76ffb4fc9f78cac176204cdfa81444
public static class EnumExtensions
{
/// <summary>
/// Gets all items for an enum value.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="value">The value.</param>
/// <returns></returns>
public static IEnumerable<T> GetAllItems<T>(this Enum value)
{
@wongsyrone
wongsyrone / pacman-downloadhelper.sh
Created October 24, 2019 07:44
pacman show download URL
View pacman-downloadhelper.sh
#!/bin/sh
# You could also use a script as your XferCommand
# in pacman.conf: XferCommand = /usr/local/bin/pacman-downloadhelper.sh %o %u
# usage: pacman-downloadhelper %o %u
outfile=$1
url=$2
# print debug output for the xfercommand
set -x