Skip to content

Instantly share code, notes, and snippets.

@caothu159
caothu159 / mitmproxy.md
Last active April 17, 2024 01:52 — forked from avoidik/README.md
Run mitmproxy on Raspberry Pi

Run mitmproxy on Raspberry Pi as service

Steps

Install prerequisites

sudo apt-get update
sudo apt-get install python3-pip
sudo pip3 install --ignore-requires-python mitmproxy==6.0.2
@caothu159
caothu159 / .. MediaCreationTool.bat ..md
Created September 30, 2021 16:56 — forked from AveYo/.. MediaCreationTool.bat ..md
Universal MediaCreationTool wrapper for all MCT Windows 10 versions from 1507 to 21H1 with business (Enterprise) edition support

Not just an Universal MediaCreationTool wrapper script with ingenious support for business editions,
Preview
A powerful yet simple windows 1X deployment automation tool as well!

awesome gui dialogs to pick windows version and preset action
Auto Setup choice for upgrade directly without prompts, with edition change / intelligent fallback
Create ISO choice for authoring iso file directly via DIR2ISO snippet, including any 'oem' customizations
Create USB choice for authoring usb via native MCT, including any 'oem' customizations (prompts once)
Select in MCT choice for vanilla MCT processing without 'oem' modifications, script quits straightway
control via set script vars, commandline parameters or rename script like iso 21H2 Pro MediaCreationTool.bat

@caothu159
caothu159 / iptables.sh
Created August 3, 2021 03:39
UFW ban countries
# sudo apt install iptables-dev xtables-addons-common libtext-csv-xs-perl pkg-config -y --purge --auto-remove
sudo apt install xtables-addons-common libtext-csv-xs-perl -y --purge --auto-remove
sudo mkdir -p /usr/share/xt_geoip
cd /usr/share/xt_geoip
sudo /usr/src/xtables-addons-3.9/geoip/xt_geoip_dl
sudo /usr/lib/xtables-addons/xt_geoip_build -D /usr/share/xt_geoip dbip-country-lite.csv
sudo iptables -A INPUT -m geoip --src-cc CN -j DROP
sudo iptables -A INPUT -m geoip --src-cc RU -j DROP
@caothu159
caothu159 / zimbra.sh
Last active September 4, 2019 10:50
Email server
#################################
## Install Dnsmasq
#################################
echo "nameserver 8.8.8.8" > /etc/resolv.conf
echo "10.138.0.2 example.com" > /etc/hosts
sudo apt install dnsmasq
# edit dnsmasq.conf
sudo nano /etc/dnsmasq.conf
@caothu159
caothu159 / cloudSettings
Last active January 23, 2021 08:13
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-01-23T08:12:43.909Z","extensionVersion":"v3.4.3"}
/**
* Returns an string clean of UTF8 characters. It will convert them to a similar ASCII character
* www.unexpectedit.com
*/
function cleanString($text) {
// 1) convert á ô => a o
$text = preg_replace("/[áàâãªä]/u","a",$text);
$text = preg_replace("/[ÁÀÂÃÄ]/u","A",$text);
$text = preg_replace("/[ÍÌÎÏ]/u","I",$text);
$text = preg_replace("/[íìîï]/u","i",$text);
@caothu159
caothu159 / .jsbeautifyrc
Last active September 1, 2021 05:58
sublime text
{
"custom":
{
"*.vue":
{
// This will add initial indent for each vue segment
"indent_scripts": "normal",
// Any additional config here
"js": {
"max_preserve_newlines": 1
@caothu159
caothu159 / crack.bat
Last active November 9, 2017 00:22
Windows
# clear key
# slmgr -upk
# slmgr /ckms
# win 10
# 1. slmgr /ipk PW48G-MNG8W-B9978-YWBRP-76DGY
# 1.1 KWWVF-VNVFM-HTVTP-YP824-WFDHC
# 1.2 T6R8N-X9P9Q-K9W99-7G7KQ-B9492
# 2.