Skip to content

Instantly share code, notes, and snippets.

View ppisarczyk's full-sized avatar

Peter Pisarczyk ppisarczyk

  • Computech
  • United States
View GitHub Profile
@ppisarczyk
ppisarczyk / dirtywebserver.ps1
Created August 27, 2016 03:44 — forked from obscuresec/dirtywebserver.ps1
Dirty PowerShell Webserver
$Hso = New-Object Net.HttpListener
$Hso.Prefixes.Add("http://+:8000/")
$Hso.Start()
While ($Hso.IsListening) {
$HC = $Hso.GetContext()
$HRes = $HC.Response
$HRes.Headers.Add("Content-Type","text/plain")
$Buf = [Text.Encoding]::UTF8.GetBytes((GC (Join-Path $Pwd ($HC.Request).RawUrl)))
$HRes.ContentLength64 = $Buf.Length
$HRes.OutputStream.Write($Buf,0,$Buf.Length)
@ppisarczyk
ppisarczyk / 0_reuse_code.js
Created October 28, 2015 19:20
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console