Skip to content

Instantly share code, notes, and snippets.

View vector623's full-sized avatar

David Gallmeier vector623

View GitHub Profile
@dazinator
dazinator / FormsAuthenticationTicketHelper.cs
Last active December 27, 2023 09:46
Decrypt a Legacy ASP.NET Forms Authentication Cookie (that uses SHA1 validation, and AES encryption) - without horrendous dependencies on system.web.. This allows you to decrypt a forms authentication cookie that was created in ASP.NET 3.5, from an ASP.NET 5 application.
internal static class FormsAuthenticationTicketHelper
{
private const byte CURRENT_TICKET_SERIALIZED_VERSION = 0x01;
private const int MAX_TICKET_LENGTH = 4096;
// Resurrects a FormsAuthenticationTicket from its serialized blob representation.
// The input blob must be unsigned and unencrypted. This function returns null if
// the serialized ticket format is invalid. The caller must also verify that the
// ticket is still valid, as this method doesn't check expiration.
@mike-burns
mike-burns / .msmtp
Last active December 23, 2022 14:56
FastMail + mutt
account default
host mail.messagingengine.com
port 587
protocol smtp
auth on
from mike@mike-burns.com
user mikeburns@fastmail.fm
password topsecretpassword!
tls on
tls_nocertcheck