Skip to content

Instantly share code, notes, and snippets.

@fnky
fnky / ANSI.md
Last active May 2, 2024 03:47
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@stewartadam
stewartadam / main.py
Last active March 5, 2024 16:02 — forked from gear11/main.py
Simple Python proxy server based on Flask and Requests with support for GET and POST requests.
"""
A simple proxy server, based on original by gear11:
https://gist.github.com/gear11/8006132
Modified from original to support both GET and POST, status code passthrough, header and form data passthrough.
Usage: http://hostname:port/p/(URL to be proxied, minus protocol)
For example: http://localhost:5000/p/www.google.com
"""
import re
@mtigas
mtigas / 0-hidden-service-subdomains.md
Last active April 14, 2023 02:06
Example code for running a (HTTP/HTTPS) Tor hidden service supporting subdomains.

The following files show an example of how to create subdomains for onion site hidden services. (This hasn't been tested for hidden services for anything other than HTTP/HTTPS.)

(You might also want to read our blog post about ProPublica’s Tor hidden service, including a tutorial and notes on running a hidden service: https://www.propublica.org/nerds/item/a-more-secure-and-anonymous-propublica-using-tor-hidden-services )

In general, this works (maybe just in recent Tor clients) because Tor will handle the connection to www.xxxxxxxxxxxxxxxx.onion as a connection to xxxxxxxxxxxxxxxx.onion. The encapsulated HTTP/HTTPS connection contains the subdomain in the Host: header (and in the case of HTTPS, the SNI

@slippycheeze
slippycheeze / obfuscate.rb
Created April 16, 2011 03:42
Obfuscated Ruby for producing Obfusctated Ruby.
c = "\n !\"#'()*+,./01234678;<=ABCDEGINOPRSTUVY[\\]_abcdefghijlmnopqrstuvxy{|}".split('')
i = <<'EOT' .gsub(/\n/, '').to_i(36)
cuwnbkpknpgvndxhiywcb8v7r6px9dgwojmf4inpx5a0irzlmxiaisomq7ir6zx1yhrkk42gltj7vy
nibeul3djwhv9hy0jcjptfh9vvwmnw3xyn4k32gjflrdbb3f1t1xt3w690js9ri5idnch6f9y1ym6r
a2e9okgnsrofg1ztnq9zdbtfh7qmhy22psuo3cdxv1aaq3bf7q0bv12nj8ld7tshysxekfz8jwmff7
k0okucxt2abkmapldjqb6m2vzo43r3g4j9zscr8svoi3ktv63jddl5dokfgl1rmi9sygylc8jor243
ywnovju7t8kvuf2bpy33zkp6w7k97lok9ymo8shfs9m83rq85snkiex96hjykqkf8noaeap18b2rvo
4vrmdy6a7pm28m5b7ye9e58i0xp89ckgx9xuth43ngwfgmoomp2v5dau2ep3hovpthhmklo47j7ds4
714qvy44hmzk24v95gycadjnqkvrbqqip3k7ap901q0eiuvouweg9mlsm4r6y78rpamf8rlqzltyw8
3uf9qqs9sz0au0hyjicqiu3m5xb40yydj6qfigauo1wlmdctonk3a3e9s5vyhrxqmmck89fsupxprp