Skip to content

Instantly share code, notes, and snippets.

@fbion
fbion / full-subnet-proxy.md
Created September 5, 2022 04:21 — forked from KaraRyougi/full-subnet-proxy.md
IPv6 完全随机化连接

使用整段 IPv6 以避免被墙的设置方案:

服务端

假设我们拥有 2602:feda:db8::/48 这段 IPv6 地址,且该段地址被静态路由至我们的服务器。

首先配置防火墙,详略。

将整段 IPv6 地址配置至服务器:

package main
import (
"crypto/tls"
"flag"
"fmt"
"io"
"log"
"net"
"net/http"
@fbion
fbion / wgcf-tutorial.md
Created March 25, 2022 13:12 — forked from phlinhng/wgcf-tutorial.md
WGCF 筆記

1. 更換內核至 5.6 以上版本

Debian / Ubuntu 系可直接運行以下指令,安裝 xanmod-edge 內核後重啟。此內核安裝完後會自動啟用 BBR,無需手動配置。

echo 'deb http://deb.xanmod.org releases main' | tee /etc/apt/sources.list.d/xanmod-kernel.list
wget -qO - https://dl.xanmod.org/gpg.key | apt-key --keyring /etc/apt/trusted.gpg.d/xanmod-kernel.gpg add -
apt update && apt upgrade -y && apt install linux-xanmod-edge -y

2. 安裝 wireguard-tools 與 resolvconf

apt install wireguard-tools resolvconf -y
@fbion
fbion / poc.c
Created March 2, 2022 03:39 — forked from jakeajames/poc.c
CVE-2021-30955 PoC
#include <stdlib.h>
#include <stdio.h>
#include <pthread/pthread.h>
#include <mach/mach.h>
struct ool_msg {
mach_msg_header_t hdr;
mach_msg_body_t body;
mach_msg_ool_ports_descriptor_t ool_ports[];
};
@fbion
fbion / CVE-2022-21371
Created January 27, 2022 01:17 — forked from picar0jsu/CVE-2022-21371
Oracle WebLogic Server 12.1.3.0.0 / 12.2.1.3.0 / 12.2.1.4.0 / 14.1.1.0.0 Local File Inclusion
# Exploit Title: Oracle WebLogic Server 12.1.3.0.0 / 12.2.1.3.0 / 12.2.1.4.0 / 14.1.1.0.0 Local File Inclusion
# Date: 25/1/2022
# Exploit Author: Jonah Tan (@picar0jsu)
# Vendor Homepage: https://www.oracle.com
# Software Link: https://www.oracle.com/middleware/technologies/weblogic-server-installers-downloads.html
# Version: 12.1.3.0.0, 12.2.1.3.0, 12.2.1.4.0 and 14.1.1.0.0
# Tested on: Windows Server 2019
# CVE : CVE-2022-21371
# Description
source: http://182.43.249.225:19735/sdsj.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- saved from url=(0014)about:internet -->
<head>
<meta http-equiv="expires" content="0">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
@fbion
fbion / yubitouch.sh
Created April 24, 2020 10:15 — forked from a-dma/yubitouch.sh
Bash script for setting or clearing touch requirements for cryptographic operations in the OpenPGP application on a YubiKey 4.
#!/bin/bash
# Bash script for setting or clearing touch requirements for
# cryptographic operations the OpenPGP application on a YubiKey 4.
#
# Author: Alessio Di Mauro <alessio@yubico.com>
GCA=$(which gpg-connect-agent)
DO=0
UIF=0
vim: ft= hls et ai sr sts=4 sw=4 fdm=marker nowrap
0-1 [Installation] Create USB Installer {{{
Download Mavericks 10.9.1 from App Store, you'll get "/Applications/Install OS X Mavericks.app/"
The file size of the tarball "Install OS X Mavericks.app.tar" is 5,312,274,432 bytes
Create USB Installer METHOD #1
$ cd /Applications/Install\ OS\ X\ Mavericks.app/
$ sudo ./Contents/Resources/createinstallmedia \
@fbion
fbion / gpg-tour.md
Created April 16, 2020 15:39 — forked from jhjguxin/gpg-tour.md
GPG 加密解密简明教程 </br> 作者: riku / 本文采用CC BY-NC-SA 2.5协议 授权

GPG 加密解密简明教程

大家都知道,互联网上充斥着大量的明文传输方式,可以说绝对是不安全地带。那么,我们如何保证在不安全的互联网中更可靠的传输重要数据呢?个人认为最好的方式之一就是使用 GPG 工具进行加密。此文只是简单介绍了 GPG 的常规用法,重在推广和普及 GPG 加密工具,详细的使用请参见 GPG 手册。

名词解释

RSA / DSA / ElGamal : 是指加密算法

GPG :(全称 GnuPG ) 是一款非对称加密(PGP)的免费软件,非对称加密方式简单讲就是指用公钥加密文件,用私钥解密文件。如果你想给谁发送加密信息,首先你要得到他的公钥,然后通过该公钥加密后传给他,对方利用自已的私钥就可解密并读取文件了。

@fbion
fbion / encrypt_openssl.txt
Created April 14, 2020 13:37 — forked from crazybyte/encrypt_openssl.txt
File encryption using OpenSSL
For symmetic encryption, you can use the following:
To encrypt:
openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt
To decrypt:
openssl aes-256-cbc -salt -a -d -in encrypted.txt -out plaintext.txt
For Asymmetric encryption you must first generate your private key and extract the public key.