Skip to content

Instantly share code, notes, and snippets.

@timdenholm
timdenholm / CheckMaxTokenSize.ps1
Created November 7, 2017 03:53
Query for all token items (groups, SIDs, SIDHistory) and calculate an estimated current token size for the logged on user. Calls out if the token is potentially too large for consistently successful use based on operating system defaults.
PARAM ([array]$Principals = ($env:USERNAME), $OSEmulation = $false, $Details = $false)
#************************************************
# CheckMaxTokenSize.ps1
# Version 2.0
# Date: 9/18/2014
# Author: Tim Springston [MS]
# Description: Query for all token items (groups, SIDs, SIDHistory) and calculate an
# estimated current token size for the logged on user. Calls out if the token is potentially too
# large for consistently successful use based on operating system defaults.
# KB http://support.microsoft.com/kb/327825
@timdenholm
timdenholm / reflect.py
Created June 29, 2017 07:02 — forked from huyng/reflect.py
A simple echo server to inspect http web requests
#!/usr/bin/env python
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE
# Written by Nathan Hamiel (2010)
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
from optparse import OptionParser
class RequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
@timdenholm
timdenholm / hb_all_books_dl.js
Created November 26, 2016 02:55 — forked from graymouser/hb_all_books_dl.js
Humble bundle book bundles - download all books at once
/*
After purchasing a humble book bundle, go to your download page for that bundle.
Open a console window for the page and paste in the below javascript
*/
$('a').each(function(i){
if ($.trim($(this).text()) == 'MOBI') {
$('body').append('<iframe id="dl_iframe_'+i+'" style="display:none;">');
document.getElementById('dl_iframe_'+i).src = $(this).data('web');
}
});
@timdenholm
timdenholm / get-sslSigningAlgorithm.ps1
Last active May 9, 2016 22:44 — forked from derekmurawsky/get-sslSigningAlgorithm.ps1
Check for certificate signing algorithm from a web server using powershell. Based on the Test-WebServerSSL cmdlet from http://en-us.sysadmins.lv/Lists/Posts/Post.aspx?List=332991f0-bfed-4143-9eea-f521167d287c&ID=60 which is the same as https://pspki.codeplex.com/wikipage?title=Test-WebServerSSL I think. Modified with input from the Philly Powers…
function get-SSLSigningAlgorithm {
[CmdletBinding()]
param(
[Parameter(Mandatory = $true, ValueFromPipeline = $true, Position = 0)]
[string]$URL,
[Parameter(Position = 1)]
[ValidateRange(1,65535)]
[int]$Port = 443,
[Parameter(Position = 2)]
[Net.WebProxy]$Proxy,