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 / git_branch_in_Linux_terminal.md
Last active November 7, 2021 09:36
How to show the git branch in Linux terminal

This article will explain how to see the git branch on linux terminal.

  1. Go to ~/.bashrc
  2. Make an copy of the bashrc file before doing the changes(only for security reasons).
  3. Open bashrc with sudo and between lines 59 and 64 wich originaly look like this: image

Should be replaced by:

@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