Skip to content

Instantly share code, notes, and snippets.

View Schm1tz1's full-sized avatar
πŸ‡ΊπŸ‡¦
#StandWithUkraine

Roman Schmitz Schm1tz1

πŸ‡ΊπŸ‡¦
#StandWithUkraine
View GitHub Profile
@ajosephau
ajosephau / XMLSec2PEM.java
Created November 2, 2017 02:29
Porting function to contemporary Java libraries from http://www.platanus.cz/blog/converting-rsa-xml-key-to-pem
import java.io.*;
import java.math.BigInteger;
import java.security.*;
import java.security.spec.*;
import java.security.cert.*;
import java.security.interfaces.*;
import java.util.Base64;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
@utek
utek / wildcard-ssl-certificate.md
Created August 31, 2018 06:25 — forked from talyguryn/wildcard-ssl-certificate.md
How to get a wildcard ssl certificate and set up Nginx.

Request a new certificate

Get certbot

Go to any directory and clone repo with sources.

cd ~
git clone https://github.com/certbot/certbot
@cnlohr
cnlohr / esp32_aes_example.c
Created November 7, 2018 19:50
Example of using hardware AES 256 Crypto in CBC mode on the ESP32 using ESP-IDF
#include <string.h>
#include <stdio.h>
#include <hwcrypto/aes.h>
/*
For Encryption time: 1802.40us (9.09 MB/s) at 16kB blocks.
*/
static inline int32_t _getCycleCount(void) {
int32_t ccount;
@kekru
kekru / 01nginx-tls-sni.md
Last active April 24, 2025 10:07
nginx TLS SNI routing, based on subdomain pattern

Nginx TLS SNI routing, based on subdomain pattern

Nginx can be configured to route to a backend, based on the server's domain name, which is included in the SSL/TLS handshake (Server Name Indication, SNI).
This works for http upstream servers, but also for other protocols, that can be secured with TLS.

prerequisites

  • at least nginx 1.15.9 to use variables in ssl_certificate and ssl_certificate_key.
  • check nginx -V for the following:
    ...
    TLS SNI support enabled
@TarlogicSecurity
TarlogicSecurity / kerberos_attacks_cheatsheet.md
Created May 14, 2019 13:33
A cheatsheet with commands that can be used to perform kerberos attacks

Kerberos cheatsheet

Bruteforcing

With kerbrute.py:

python kerbrute.py -domain <domain_name> -users <users_file> -passwords <passwords_file> -outputfile <output_file>

With Rubeus version with brute module:

@EddiG
EddiG / wireshark.md
Last active April 11, 2025 19:32
How to decrypt SSL/TLS traffic in Wireshark on MacOS

The main point is to save the SSL/TLS keys those used by the web browser (SSLKEYLOGFILE=/tmp/tmp-google/.ssl-key.log).
In the example below we run brand new instance of Google Chrome (--user-data-dir=/tmp/tmp-google do the trick):
SSLKEYLOGFILE=/tmp/tmp-google/.ssl-key.log /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir=/tmp/tmp-google
Then run the Wireshark and open the Preferences -> Protocols -> SSL, where we put the path to the SSL keys log file into the (Pre)-Master-Secret log filename field.
Now all SSL/TLS traffic from this browser instance will be decrypted.

@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active May 2, 2025 21:46
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

@Hakky54
Hakky54 / openssl_commands.md
Last active April 25, 2025 10:21 — forked from p3t3r67x0/openssl_commands.md
OpenSSL Cheat Sheet

OpenSSL Cheat Sheet πŸ”

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@mitchese
mitchese / speedwire.py
Last active June 7, 2024 20:20
SMA Speedwire python interpreter
# SMA Speedwire interpreter
#
# This little script interprets SMA's speedwire as multicasted from the Sunny Home Manager 2
# and will print out the energy flow total, and for each phase
import socket
import struct
MULTICAST_IP = "239.12.255.254"
MULTICAST_PORT = 9522