Skip to content

Instantly share code, notes, and snippets.

@UserExistsError
UserExistsError / winpty.go
Created September 5, 2020 18:14
Windows Pseudo Console (ConPTY) in Golang
package main
// Windows pty example
// https://devblogs.microsoft.com/commandline/windows-command-line-introducing-the-windows-pseudo-console-conpty/
import (
"io"
"os"
"fmt"
"log"

Keybase proof

I hereby claim:

  • I am userexistserror on github.
  • I am userexistserror (https://keybase.io/userexistserror) on keybase.
  • I have a public key whose fingerprint is 2E35 844F D0C2 906B B238 4C77 27DF DE1B AF70 854F

To claim this, I am signing this object:

@UserExistsError
UserExistsError / run.xml
Last active November 8, 2019 16:33
msbuild.exe run shellcode
<!-- https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild-inline-tasks?view=vs-2017 -->
<!-- original work by @subTee on twitter -->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="RunShellCode" TaskFactory="CodeTaskFactory" AssemblyFile="C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Build.Tasks.v4.0.dll" >
<ParameterGroup />
<Task>
<Using Namespace="System" />
<Code Type="Class" Language="cs">
<![CDATA[
using System;
#include <Windows.h>
#include <ntsecapi.h>
#include <ntstatus.h>
/*
Documentation
https://docs.microsoft.com/en-us/windows/desktop/SecMgmt/management-functions#password-filter-functions
*/
extern "C" __declspec(dllexport)