Skip to content

Instantly share code, notes, and snippets.

@michael-manley
michael-manley / gist:5945769
Last active December 19, 2015 11:09
Planning Dump
[AttributeUsage(AttributeTargets.Assembly,
Inherited = false, AllowMultiple = true)] public class PermissionDefineAttribute : Attribute {
public string PermissionKey { get; set; }
public string FriendlyName { get; set; }
public string Description { get; set; }
public bool PrivatePermission { get; set; }
public bool NonCriticalPermission { get; set; }
public PermissionDefineAttribute(string permissionKey) {
PermissionKey = permissionKey;
C:\Users\Administrator>repadmin /showconn
Repadmin: running command /showconn against full DC localhost
Base DN: CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=NASUTEK-CORE,DC
=nisn,DC=nasutek,DC=com
==== KCC CONNECTION OBJECTS ============================================
Connection --
Connection name : 686d7a46-c86a-4822-b846-4e1c8d6f5546
Server DNS name : ADMINISTRATOR2.NASUTEK-CORE.nisn.nasutek.com
Server DN name : CN=NTDS Settings,CN=ADMINISTRATOR2,CN=Servers,CN=Default-F
This file has been truncated, but you can view the full file.
2013-04-06 00:01:55, Info DISM API: PID=3260 TID=2176 DismApi.dll: - DismInitializeInternal
2013-04-06 00:01:55, Info DISM API: PID=3260 TID=2176 DismApi.dll: <----- Starting DismApi.dll session -----> - DismInitializeInternal
2013-04-06 00:01:55, Info DISM API: PID=3260 TID=2176 DismApi.dll: - DismInitializeInternal
2013-04-06 00:01:55, Info DISM API: PID=3260 TID=2176 DismApi.dll: Version 6.2.9200.16384 - DismInitializeInternal
2013-04-06 00:01:55, Info DISM API: PID=3260 TID=2176 DismApi.dll: Parent process command line: C:\Windows\system32\wbem\wmiprvse.exe - DismInitializeInternal
2013-04-06 00:01:55, Info DISM API: PID=3260 TID=2176 Enter DismInitializeInternal - DismInitializeInternal
2013-04-06 00:01:55, Info DISM API: PID=3260 TID=2176 Input parameters: LogLevel: 2, LogFilePath: (null)
@michael-manley
michael-manley / Use me bro
Created February 22, 2012 13:39
Locking to prevent a foreach exception
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading;
using System.Xml;
using System.Xml.Serialization;
namespace SharpIRC.API {
/// <summary>
Noticing such a huge issue on SSL Cert Validation, I thought I'd explain my 2 cents on the whole thing and some ideas on how to curve the whole issue, as SSL at an encryption level is superb, but at a validation level is flawed outright.
One thing is CRL's and OCSP's should be a way to validate, if a client cant access one, why should we automatically accept this certificate as valid, it could be revoked that second for all we know, if the client cant access the CRL/OCSP, or its mirrors, the certificate should be acted as if it was revoked.
Another idea to prevent fradulent certificates is a globally maintained list that acts as a "Verified Certificate" list. The idea is to have companies like Microsoft for example to make sure that only certs created by the CA were engaged by Microsoft, not some other person pretending to be Microsoft.
For the Validation of the Certificate by the Authority (ex Cert Registree):
1. Company gets a cert from CA which was signed by them and is technically valid if they wern't
Folder PATH listing for volume Data and Applications
Volume serial number is C03C-36B4
E:\VIDEOS\DOCTOR WHO
│ hai
│ layout.txt
└───2005 Series
├───Christopher Eccleston Era - Series 1
│ Episode 1 - Rose .avi
│ Episode 10 - The Doctor Dances.avi