Skip to content

Instantly share code, notes, and snippets.

@pimbrouwers
pimbrouwers / PowerShellNTFSStaticFileServer.ps1
Created November 14, 2019 23:36 — forked from Tiberriver256/PowerShellNTFSStaticFileServer.ps1
This script starts a small web server listening on localhost:8080 that will impersonate the authenticated user and serve static content. This means if they do not have NTFS permissions to the file they will get an access denied or a 404 file not found if they do not have NTFS access to list contents of the directory.
function Get-DirectoryContent {
<#
.SYNOPSIS
Function to get directory content
.EXAMPLE
Get-DirectoryContent -Path "C:\" -HeaderName "poshserver.net" -RequestURL "http://poshserver.net" -SubfolderName "/"
@pimbrouwers
pimbrouwers / App.csproj
Last active March 17, 2020 11:41 — forked from davidfowl/Program.cs
A minimal fully asynchronous C# ASP.NET Core 3.x application with routing
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>
</Project>