Skip to content

Instantly share code, notes, and snippets.

View DarkPanth3r's full-sized avatar

Marcos Pais DarkPanth3r

  • FCUP
  • Portugal
View GitHub Profile
@DarkPanth3r
DarkPanth3r / Get-KerberosTGT.ps1
Last active December 15, 2020 19:03 — forked from jaredcatkinson/Get-KerberosTicketGrantingTicket.ps1
Kerberos Ticket Granting Ticket Collection Script and Golden Ticket Detection Tests
function Get-KerberosTicketGrantingTicket
{
<#
.SYNOPSIS
Gets the Kerberos Tickets Granting Tickets from all Logon Sessions
.DESCRIPTION
Get-KerberosTicketGrantingTicket uses the Local Security Authority (LSA) functions to enumerate Kerberos logon sessions and return their associate Kerberos Ticket Granting Tickets.
@DarkPanth3r
DarkPanth3r / Compare-XmlDocs.ps1
Created May 7, 2020 14:18 — forked from ctigeek/Compare-XmlDocs.ps1
Powershell - Compare two XML documents.
function Compare-XmlDocs($actual, $expected) {
if ($actual.Name -ne $expected.Name) {
throw "Actual name not same as expected: actual=" + $actual.Name
}
##attributes...
if ($actual.Attributes.Count -ne $expected.Attributes.Count) {
throw "attribute mismatch for actual=" + $actual.Name
}
for ($i=0;$i -lt $expected.Attributes.Count; $i =$i+1) {
@DarkPanth3r
DarkPanth3r / PS_MultiThread_Example.ps1
Created February 10, 2020 17:43 — forked from aconn21/PS_MultiThread_Example.ps1
PowerShell MultiThreading Examples
#Make new CSV File
$CSVFileName = "\\networkshare\folder\filename.csv"
"CSV,Header,With,Well,Named,Data,Columns" > $CSVFileName
$Timestamp = get-date -format o
#Log file
$LogFileName = "\\networkshare\folder\logfile_$Timestamp.log"
#Function to do stuff with IP address
@DarkPanth3r
DarkPanth3r / ansible-summary.md
Last active May 6, 2023 06:17 — forked from andreicristianpetcu/ansible-summary.md
This is an ANSIBLE Cheat Sheet from Jon Warbrick

Ansible Summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of