Skip to content

Instantly share code, notes, and snippets.

View danzek's full-sized avatar
Listening to meowzek

Dan danzek

Listening to meowzek
View GitHub Profile
View macoslogginqgsubsystems
class Logging(object):
__name__ = ''
plist = '/System/Library/Preferences/Logging/Subsystems/'
def __init__(__name__, plist, *args, **kwargs):
super(getLogger/, self).__init__()'Input parameters:\n'
'accessibility: "{}"\n'
View FixAbsoluteHyperlinksInExcelToRelative.vba
Sub FixLinks()
Dim wks As Worksheet
Dim hl As Hyperlink
Dim sOld As String
Dim sNew As String
Set wks = ActiveSheet
sOld = "G:\MyOriginalFolderIWantToReplaceInPath\"
sNew = ".\"
For Each hl In wks.Hyperlinks
hl.Address = Replace(hl.Address, sOld, sNew)
View rot13Reader.go
// solution to rot13Reader exercise in golang tour
package main
import (
danzek / fibonacci_closure.go
Created October 23, 2020 04:32
Solution to Golang tour Fibonacci closure exercise
View fibonacci_closure.go
// go tour fibonacci closure exercise solution
package main
import "fmt"
// fibonacci is a function that returns
// a function that returns an int.
func fibonacci() func() int {
danzek / deobfuscateClopResource.cpp
Created April 1, 2019 22:39
decompiled / reverse-engineered Clop deobfuscation of SIXSIX1 resource code
View deobfuscateClopResource.cpp
HINSTANCE LoadExecuteClearSystemsBatchFile()
HMODULE hModule; // eax
HMODULE phModule; // ebx
HRSRC hRsrcSIXSIX1; // eax
HRSRC phRsrcSIXSIX1; // esi
HGLOBAL hGlobalRsrcSIXSIX1; // eax
const void *ResourceLock; // edi
DWORD cbResourceSIXSIX1; // esi
HGLOBAL hDecryptedResourceMemory; // ebx
View singly_linked_list.c
* singly_linked_list.c
* Demo of singly-linked list using simplified Process struct
* I made this for the 2019 KPMG Lunch and Learn series entitled,
* "A heuristic approach to coding in C on Windows"
#include <stdio.h>
danzek / Get-DesktopSearchData.ps1
Created June 11, 2018 21:29
Gets data from Windows Desktop Search
View Get-DesktopSearchData.ps1
Gets data from Windows Desktop Search.
Uses Windows API (ADO) to get data from Windows Desktop Search JET (ESE) database.
File Name : Get-DesktopSearchData.ps1
Author : Dan O'Day -
danzek / makeMetered.ps1
Created April 3, 2018 09:00
Take ownership of key and make Ethernet connection a metered connection
View makeMetered.ps1
.SYNOPSIS : PowerShell script to set Ethernet connection as metered or not metered
.AUTHOR : Michael Pietroforte
# Retrieved from
danzek /
Last active April 14, 2021 12:35
Return formatted SID string given list of integers containing SID from byte array
#!/usr/bin/env python
Module containing class to parse and return formatted SID string given list of integers containing SID from byte array
This was made for formatting the CreatorSID from the Microsoft Windows CIM (WMI) repository database in the standard
Windows SID format ("S-1-5-21-<RID>-<RID>...). For instance, if using a script such as [`python-cim`](
[filter-to-consumer bindings](,
to extract CreatorSID using that script, you would add `'CreatorSID'` to the filter or consumer properties like so:
filter_sid =["CreatorSID"].value
danzek / winlogon.reg
Created February 11, 2018 20:48 — forked from anonymous/winlogon.reg
WinLogon Windows 7 x64 COM Hijack
View winlogon.reg
Windows Registry Editor Version 5.00