Skip to content

Instantly share code, notes, and snippets.

View LucaFilipozzi's full-sized avatar

Luca Filipozzi LucaFilipozzi

View GitHub Profile
os_http_be.map and os_sni_passthrough.map are both just empty files

Keybase proof

I hereby claim:

  • I am LucaFilipozzi on github.
  • I am lucafilipozzi (https://keybase.io/lucafilipozzi) on keybase.
  • I have a public key whose fingerprint is CE98 F258 BB34 4F29 F4F5 AF45 B575 4A69 B6BE 608C

To claim this, I am signing this object:

@LucaFilipozzi
LucaFilipozzi / get_unix_socket_peer_info.py
Last active March 30, 2017 07:59
python implementation of getpeereid() and getpeerpid() for darwin
#!/usr/bin/python
# vim: set ts=4 sw=4 et ai si:
import socket
import struct
def getpeereid(sock):
LOCAL_PEERCRED = 0x001
fmt = struct.Struct('2Ih16I') # see /usr/include/sys/ucred.h struct xucred
res = tuple(fmt.unpack(sock.getsockopt(0, LOCAL_PEERCRED, fmt.size)))
@LucaFilipozzi
LucaFilipozzi / foo.py
Last active September 24, 2017 19:22
exploring python transitions
#!/usr/bin/env python
# exploring all the callbacks
from transitions import Machine, State, Transition
class Matter(Machine):
def __init__(self, *args, **kwargs):
Machine.__init__(
self,
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFLjL34BEADtX6MrSOfKGUNEEIZz6fii28XaUmPtWf4UGxL7g5kRS/KvKYsc
fG4hQB7sxf0+Ogyqc+lsaDy5vUksJSLn187mRjlCpKhj+6TPvh7W3avwOtJ5279V
wKerKkhv+eBEnAW0tBfdVYwrbTS74MSV9DTAs89r2+ROysA2jvela0oeMemuLhpu
Njme4IONmrKJo1RAFPWXHEPDDrtNapPdE1i3rMyQS7/A8Yp0Cr1jOYARM/PnepFS
uiWB5mAXw4wC1K/meQpwJBbio+mxPXjJfzBlxLEOC22Sbf1w3PZ+ZSCzRxqo0kBZ
RoU2pIWmI1Zt3bzHirywuxsZvVeHeYZEEEbrZH+2XFkyZ7GuT+uPWa2c7FIU42ro
XYoHGPAPFzbZ2slZvZy4VHJnAPTWVR8HLFyyr2pJ+K2IoP3WYL9n2u9GDI0gbmB4
Lpmk7HEdMM54m83GhtyJ5b9j9skrgnLe7mfGFAtBotD+WYIfWszetPeaToFfLNLo

acme4bigip

The purpose of these scripts is to help implement HTTPS Everywhere using acmetool and F5 BigIP LTM.

Usage

Set up acmetool as normal.

DNS

@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 / 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
@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 / essential_utilities.md
Last active August 1, 2021 16:47
essential utilities

essential cli utilities: