Skip to content

Instantly share code, notes, and snippets.

View xpl0t's full-sized avatar
🏠
Working from home

Johannes Weih xpl0t

🏠
Working from home
  • Germany
View GitHub Profile
#!/bin/sh
# Downloads the public certificate of the certificate authority
echo quit | openssl s_client -showcerts -servername example.com -connect example.com:443 2> /dev/null | awk '/BEGIN/,/END/{ if(/BEGIN/){c=""};c=c $0 "\n"}END{print c}'
@xpl0t
xpl0t / ObjectExtensions.cs
Last active May 29, 2024 16:26
Extension method capable of executing private/public methods on an object
using System;
using System.Reflection;
namespace MyProject.Unit.Tests.Extensions
{
public static class ObjectExtensions
{
/// <summary>
/// Invokes a private/public method on an object. Useful for unit testing.
/// </summary>