Skip to content

Instantly share code, notes, and snippets.

View LucaFilipozzi's full-sized avatar

Luca Filipozzi LucaFilipozzi

View GitHub Profile
@LucaFilipozzi
LucaFilipozzi / snippet.tf
Created October 6, 2019 22:55
terraform - find debian buster
data "aws_ami" "buster" {
most_recent = true
owners = ["136693071363"]
filter {
name = "name"
values = ["debian-10-amd64-*"]
}
}
@LucaFilipozzi
LucaFilipozzi / 00-ssh-tls-tunnel_and_ssh-port-knock.md
Last active March 21, 2024 00:30
ssh-tls-tunnel and ssh-port-knock

ssh-tls-tunnel

stuck behind a firewall that allows only http/https connections? offer ssh over a TLS tunnel!

configure haproxy server to accept TLS connections with ALPN ssh/2.0

configure ssh client to create TLS connections with ALPN ssh/2.0 using ProxyCommand

ssh-port-knock

@LucaFilipozzi
LucaFilipozzi / tracing.md
Last active July 13, 2021 19:58
tracing

tracing

The W3C Trace-Context Specification defines two headers, traceparent and tracestate, that provide the ability to trace an interaction across an application stack.

traceparent

traceparent is used to convey trace_id and parent_id from parent to child. For example, from a WAF (F5 BigIP, say) to a Web Server (Apache httpd, say).

Its format is <version>-<trace_id>-<parent_id>-<trace_flags> where (HEXDIGLC = lowercase hexadecmial digit [0-9a-f]):

@LucaFilipozzi
LucaFilipozzi / HowToGetHighQualysAndObservatoryScores.md
Last active March 21, 2021 23:01
how to get high Qualys and Observatory scores

how to get an A+ with ssllabs.com and observatory.mozilla.org

apache things

global

  SSLProtocol -all +TLSv1.2 +TLSv1.3
  SSLCipherSuite SSL ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384
  SSLCipherSuite TLSv1.3 TLS_CHACHA20_POLY1305_SHA256:TLS_AES_256_GCM_SHA384
#!/usr/bin/env python3
from base64 import urlsafe_b64decode as b64decode
from box import Box
from jwcrypto.jwk import JWKSet
from jwcrypto.jws import JWS
from orjson import dumps, loads, OPT_INDENT_2
from PIL import Image
from pyxtension.streams import stream
from pyzbar.pyzbar import decode as qrdecode
@LucaFilipozzi
LucaFilipozzi / woot.sh
Last active October 22, 2025 00:53
woot.sh
echo "no, bad, don't do this"