Skip to content

Instantly share code, notes, and snippets.

View fpschultze's full-sized avatar
🐌
I may be slow to respond.

Peter Schultze fpschultze

🐌
I may be slow to respond.
View GitHub Profile
@fpschultze
fpschultze / wincred.py
Created March 18, 2021 10:47 — forked from exhuma/wincred.py
Retrieve Windows Credential via Python
"""
Access windows credentials
Credentials must be stored in the Windows Credentials Manager in the Control
Panel. This helper will search for "generic credentials" under the section
"Windows Credentials"
Example usage::
result = get_generic_credential('foobar')
@fpschultze
fpschultze / PoshWebHarness.ps1
Created February 4, 2021 09:42 — forked from pmolchanov/PoshWebHarness.ps1
Simple PowerShell HTTP/HTTPS web server useful for mocking web services
# Use the following commands to bind/unbind SSL cert
# netsh http add sslcert ipport=0.0.0.0:443 certhash=3badca4f8d38a85269085aba598f0a8a51f057ae "appid={00112233-4455-6677-8899-AABBCCDDEEFF}"
# netsh http delete sslcert ipport=0.0.0.0:443
$HttpListener = New-Object System.Net.HttpListener
$HttpListener.Prefixes.Add("http://+:80/")
$HttpListener.Prefixes.Add("https://+:443/")
$HttpListener.Start()
While ($HttpListener.IsListening) {
$HttpContext = $HttpListener.GetContext()
$HttpRequest = $HttpContext.Request