Skip to content

Instantly share code, notes, and snippets.

@ohforest
ohforest / Netfilter-IPTables-Diagrams.md
Created January 11, 2024 04:13 — forked from nerdalert/Netfilter-IPTables-Diagrams.md
Linux NetFilter, IP Tables and Conntrack Diagrams

Linux NetFilter, IP Tables and Conntrack Diagrams

IPTABLES TABLES and CHAINS

IPTables has the following 4 built-in tables.

1) Filter Table

Filter is default table for iptables. So, if you don’t define you own table, you’ll be using filter table. Iptables’s filter table has the following built-in chains.

@ohforest
ohforest / flask_dump_request_response.py
Created August 24, 2023 08:48 — forked from TheWaWaR/flask_dump_request_response.py
Flask dump request and response example
#!/usr/bin/env python
# coding: utf-8
import os
import sys
import json
import uuid
import tempfile
from flask import Flask, request, Response, g

I’m looking for any tips or tricks for making chrome headless mode less detectable. Here is what I’ve done so far:

Set my args as follows:

const run = (async () => {

    const args = [
        '--no-sandbox',
        '--disable-setuid-sandbox',
        '--disable-infobars',
@ohforest
ohforest / crossover.md
Created April 4, 2023 03:41 — forked from Nathaniel100/crossover.md
crossover在mac系统字体模糊解决方法

先从windows系统复制文件simsun.ttf到你的虚拟机下(c:\windows\fonts\),在CrossOver下打开regedit(命令行方式) 找到HKEY_CURRENT_USER\Software\Wine\Fonts\Replacements,删除下面的项目simsun 宋体 新宋体

@ohforest
ohforest / crossover.md
Created April 4, 2023 03:40 — forked from mcxiaoke/crossover.md
crossover在mac系统字体模糊解决方法

先从windows系统复制文件simsun.ttf到你的虚拟机下(c:\windows\fonts\),在CrossOver下打开regedit(命令行方式) 找到HKEY_CURRENT_USER\Software\Wine\Fonts\Replacements,删除下面的项目simsun 宋体 新宋体

@ohforest
ohforest / chn_fonts.reg
Created March 31, 2023 06:39 — forked from swordfeng/chn_fonts.reg
Chinese font settings in wine
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink]
"Arial"="wqy-microhei.ttc"
"Arial Black"="wqy-microhei.ttc"
"Arial CE,238"="wqy-microhei.ttc"
"Arial CYR,204"="wqy-microhei.ttc"
"Arial Greek,161"="wqy-microhei.ttc"
"Arial TUR,162"="wqy-microhei.ttc"
"Courier New"="wqy-microhei.ttc"
@ohforest
ohforest / curl_range.md
Created February 21, 2023 10:58 — forked from mocchira/curl_range.md
HTTP GET with Range header by curl
  • normal(explicitly specified start AND end)
  curl -v -X GET -H "range: bytes=1-8" http://localhost:8080/bbb/test
  • specified ONLY start(end will be specified at the end of file)
  curl -v -X GET -H "range: bytes=10-" http://localhost:8080/bbb/test
  • specified ONLY one negative value(last N bytes of file will be retrieved)
@ohforest
ohforest / readme.md
Created February 17, 2023 10:46 — forked from fengyuentau/readme.md
Enable X11 forward for ssh to load images from remote server on MacOS Mojave

Enable X11 forward to load images from remote server on MacOS Mojave

Steps

  1. Install Xquartz to get X11 support on MacOS. You can google Xquartz and download it from its official site, or install using HomeBrew.

    brew cask install xquartz
  2. Launch Xquartz. Go to Preference -> Security, click the box Allow connections from clients. NOTE: You have to lauch Xquartz with Allow connections from clients enable everytime you want to ssh to remote server with X11 forwarding support.

#!/bin/bash
set -e
cf_ips() {
echo "# https://www.cloudflare.com/ips"
echo "geo \$realip_remote_addr \$cloudflare_ip {"
echo "default 0;"
for type in v4 v6; do
@ohforest
ohforest / README.md
Created January 30, 2023 06:53 — forked from mrtns/README.md
Docker Host and Container User Mapping