Skip to content

Instantly share code, notes, and snippets.

interfaces {
lo0 {
unit 0 {
family inet {
filter {
input-list [ discard-ip-options discard-frags accept-single-hop-bfd-v4 accept-multi-hop-bfd-v4 accept-bgp-v4 accept-ospf2 accept-vrrpv3-v4 accept-established-v4 accept-common-services-v4 discard-all-v4 ];
}
}
family inet6 {
filter {
@httpsx
httpsx / WireGuard DPI обход РКН - Windows.md
Last active April 26, 2025 12:40
WireGuard DPI обход РКН - Windows

Для обхода блокировки достаточно отправить 1 любой udp пакет, тем самым нарушим начальное определение протокола WireGuard
Способ с использованием Windows PowerShell. Без скачивания Nmap и подобного софта.

Шаг 0: Отключитесь от всех туннелей.

Шаг 1: Редактируем Клиент конфиг

Добавим в него "ListenPort", это позволит иметь статичный порт на котором будет работать WireGuard
Нажмите ПКМ на нужный "туннель" и выберите "Редактировать выбранный туннель..." Step1

После DNS добавляем новую строку

@smarteist
smarteist / sshproxy.sh
Last active October 17, 2024 19:31
This script runs ssh proxy in local socks5 port 1080
#!/bin/bash -i
user="root"
pass="@PASS@@@@"
ip_address="111.111.11.11"
ssh_port=22
sudo_pass_file="/tmp/sshpass"
proxy_port=1080

Uninstall Microsoft Edge

Important

Working on the latest supported Windows versions. Run Windows Update before following this guide.

1. Open Powershell > RUN AS ADMIN

2. Paste in irm https://gist.github.com/ave9858/c3451d9f452389ac7607c99d45edecc6/raw/UninstallEdge.ps1 | iex and press enter

3. Microsoft Edge will be completely uninstalled.

@denisgolius
denisgolius / install-victoriametrics-single-ubuntu.sh
Last active April 5, 2025 17:25
install VicotriaMetrics Single on ubuntu 20.04
#!/bin/bash
set -e
system_set_hostname "$HOSTNAME"
apt update && apt upgrade -y && apt install -y curl wget net-tools traceroute jq
# Generate files
mkdir -p /etc/victoriametrics/single
mkdir -p /var/lib/victoria-metrics-data
@pintoXD
pintoXD / crc16_arc.py
Created April 27, 2020 11:32
CRC16/ARC Python implementation
def crc16(data, offset, length):
if data is None or offset < 0 or offset > len(data) - 1 and offset+length > len(data):
return 0
crc = 0x0000
for i in (range(0, length)):
# crc = crc << 8
crc ^= data[i]
# print(hex(data[i]))
print(bin(crc))
for j in range(0, 8):
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active April 25, 2025 14:19
set -e, -u, -o, -x pipefail explanation
@1st1
1st1 / example.py
Last active October 20, 2024 19:56
asyncio queues example
import asyncio
import random
import time
async def worker(name, queue):
while True:
# Get a "work item" out of the queue.
sleep_for = await queue.get()
@DominicBreuker
DominicBreuker / iptables.md
Last active June 18, 2024 13:59
iptables firewall

iptables cheat sheet

Concepts

iptables defines tables, which group features:

  • filter: use it to filter traffic
  • nat: use it to implement NAT
  • raw: use it to define which connections iptables should track (stateful firewall)
  • mangle: use it to change some fields in packets (e.g., TTL)
  • security: use it to define access control
@candlerb
candlerb / addresses.py
Last active April 2, 2024 00:07
Netbox report to check for missing Primary IP Addresses
from extras.reports import Report
from dcim.models import Device
from virtualization.models import VirtualMachine
from ipam.constants import *
from ipam.models import IPAddress, Prefix
LOOPBACK_ROLES = [
IPADDRESS_ROLE_LOOPBACK,
IPADDRESS_ROLE_ANYCAST,
IPADDRESS_ROLE_VIP,