Skip to content

Instantly share code, notes, and snippets.

@santaklouse
santaklouse / ext.js
Created February 6, 2025 20:52
remove chrome tab duplicates
// Utils
const parseUrl = (url, options) => {
const { origin, hash, search } = url
const pathname = url.pathname.replace(/\/index\.(x?html?|php|cgi|aspx)$/, "/")
return {
origin,
hash: options?.ignoreHash ? "" : hash,
search: options?.ignoreQuery ? "" : search,
pathname: options?.ignorePathname ? "" : pathname
@santaklouse
santaklouse / sshj
Last active December 24, 2024 11:15
bash help scripot for https://ssh-j.com/
#! /usr/bin/env bash
# sshj # Generates a random tunnel ID [e.g. 5dmxf27tl4kx] and keeps the tunnel connected
# sshj foobarblahblub # Creates tunnel with specific tunnel ID
# sshj foobarblahblub 192.168.0.1 2222 # Tunnel to host 192.168.0.1:2222 on the LAN
sshj()
{

license crossover:

  1. chmod +x license.tool
  2. ./license.tool
@santaklouse
santaklouse / gist:41a59e0c79374cf479ffbdddd280328d
Created November 15, 2024 16:06
chisel inside container share
on vps (proxy.wrtc.pp.ua):
$ chisel server --proxy https://proxy-seller.com/ --auth foo:bazz -v --socks5 --port 8080 --reverse
on target machines:
(inside container)
limactl start \
--containerd=user \
--name=default \
--cpus=4 \
@santaklouse
santaklouse / Dockerfile
Created August 31, 2024 20:21
php-8.2 Dockerfile
FROM php:8.2-fpm
WORKDIR /var/www
RUN apt-get update && apt-get install -y \
build-essential \
libpng-dev \
libjpeg-dev \
libfreetype6-dev \
libonig-dev \
import socket
import os
import logging
import psutil
WOL_PORT = 9
INTERFACE_NAME = 'Ethernet 4'
logging.basicConfig(format='%(levelname)s: %(asctime)s %(message)s', level=logging.INFO)
logger = logging.getLogger(__name__)
version: '3'
services:
socks5:
image: serjs/go-socks5-proxy
restart: always
depends_on:
- zerotier-one
ports:
- 1080:1080
zerotier-one:
@santaklouse
santaklouse / bashrc.sh
Created April 12, 2024 12:40
logs user input to log (add to /etc/bash.bashrc)
function log2syslog
{
declare COMMAND
COMMAND=$(fc -ln -0)
logger -p local1.notice -t bash -i -- "${USER}:${SUDO_USER}:${COMMAND}"
}
trap log2syslog DEBUG
@santaklouse
santaklouse / README.md
Last active January 12, 2024 12:50
gsocket ssh using disposable thc servers

create segfault server configuration (details: https://www.thc.org/segfault/)

$ ssh root@segfault.net # The password is 'segfault'

~/.ssh/config