Skip to content

Instantly share code, notes, and snippets.

View davidedg's full-sized avatar
🎯
Focusing

Davide Del Grande davidedg

🎯
Focusing
View GitHub Profile
@davidedg
davidedg / get_tds_cert.py
Created March 1, 2023 21:29 — forked from lnattrass/get_tds_cert.py
A terrible way to connect to MS SQL Server and dump the certificate as a PEM
import sys
import pprint
import struct
import socket
import ssl
from time import sleep
# Standard "HELLO" message for TDS
prelogin_msg = bytearray([ 0x12, 0x01, 0x00, 0x2f, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x06, 0x01, 0x00, 0x20,
0x00, 0x01, 0x02, 0x00, 0x21, 0x00, 0x01, 0x03, 0x00, 0x22, 0x00, 0x04, 0x04, 0x00, 0x26, 0x00,
@davidedg
davidedg / ssm_parameter_store.py
Created September 10, 2019 07:22 — forked from nqbao/ssm_parameter_store.py
Python class to provide a dictionary-like interface to access AWS SSM Parameter Store easily
# Copyright (c) 2018 Bao Nguyen <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
@davidedg
davidedg / ct-submit.py
Last active March 30, 2018 23:54 — forked from rraptorr/ct-submit.py
Simple Certificate Transparency certificate submission client
#!/usr/bin/python
import sys
import argparse, json, base64, struct
import urllib2
from datetime import datetime
## https://crt.sh/monitored-logs
LOGS = {
'rocketeer': 'https://ct.googleapis.com/rocketeer',