Skip to content

Instantly share code, notes, and snippets.

View patriklindstrom's full-sized avatar
🖼️
At home

Patrik Lindström patriklindstrom

🖼️
At home
View GitHub Profile
@patriklindstrom
patriklindstrom / Get-MsdnKeys.ps1
Created July 26, 2017 13:06 — forked from Jaykul/Get-MsdnKeys.ps1
PowerShell + Selenium Demo: Getting Started, and reusing cookies with Invoke-Request
# It might work in 4, but I'm not testing there. Lower you'll have to tweak code
#requires -Version 5.0
param(
# Your Live ID for MSDN login
[Parameter(Mandatory)]
[PSCredential]
[System.Management.Automation.CredentialAttribute()]
$Credential,
# Pick a browser to use. Defaults to Firefox (which doesn't seem to require an external Driver file)
@patriklindstrom
patriklindstrom / FindPrivateKey.cs
Last active September 26, 2016 21:01 — forked from haf/gist:5629584
Finding the private key of a Windows certificate from PowerShell/C#.
using System;
using System.Runtime.InteropServices;
using System.IO;
using System.Text;
using System.Security.Cryptography.X509Certificates;
namespace PKI
{
class Results : IEquatable<Results>
{
internal static readonly Results NotFound = new Results