Skip to content

Instantly share code, notes, and snippets.

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

@santaklouse
santaklouse / index.md
Created December 8, 2023 01:53 — forked from paj28/index.md

Unicode XSS via Combining Characters

Most application security practitioners are familiar with Unicode XSS, which typically arises from the Unicode character fullwidth-less-than-sign. It’s not a common vulnerability but does occasionally appear in applications that otherwise have good XSS protection. In this blog I describe another variant of Unicode XSS that I have identified, using combining characters. I’ve not observed this in the wild, so it’s primarily of theoretical concern. But the scenario is not entirely implausible and I’ve not otherwise seen this technique discussed, so I hope this is useful.

Recap of Unicode XSS

Lab: https://4t64ubva.xssy.uk/

A quick investigation of the lab shows that it is echoing the name parameter, and performing HTML escaping:

@santaklouse
santaklouse / README.md
Created October 3, 2023 20:58
share text or images (tmp store on free anon file servers)

Create patch

create raw binary git patch file for untracked files only (exclude: zip archives/files/ directory/*.patch files)

$ { for next in $( git ls-files --others --exclude-standard --exclude=*.zip --exclude=files/* -x '*.patch') ; do git --no-pager diff -p --ignore-space-change --ignore-cr-at-eol --raw --binary -b -w --no-index /dev/null $next; done; } > untracked.patch

Apply patch

show information about changes that will be applied

import { pipeline } from 'node:stream/promises'
import { Writable } from 'node:stream'
import fs from "fs";
import StreamObject from "stream-json/streamers/StreamObject.js";
return new Promise(async (resolve) =>
await pipeline(
fs.createReadStream(this.cacheFileFullPath(filename)),
StreamArray.withParser(),
new Writable({
class WorkerWrapper extends EventEmitter {
#worker;
#ee = new EventEmitter();
constructor(worker) {
super();
this.#worker = worker;
console.log(`worker.js `, worker);
@santaklouse
santaklouse / rsync.sh
Last active September 8, 2023 01:05
copy missed files with rsync
rsync --ignore-existing -a --progress -W -v -r --include="*/" --include="*.jpg" --exclude="*" /home/fignelim/tools/Fignel-tools/export-elements/out/ /home/fignelim/tools/feature_test/out/
#get all images count in dir
find ./feature_test/out/ -type f -name '*.jpg' | wc -l
diff -qr Fignel-tools/export-elements/out/ feature_test/out/