Navigation Menu

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
@danzek
danzek / Get-DesktopSearchData.ps1
Created June 11, 2018 21:29
Gets data from Windows Desktop Search
<#
.SYNOPSIS
Gets data from Windows Desktop Search.
.DESCRIPTION
Uses Windows API (ADO) to get data from Windows Desktop Search JET (ESE) database.
.NOTES
File Name : Get-DesktopSearchData.ps1
Author : Dan O'Day - d@4n68r.com
/*
* 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
danzek / deobfuscateClopResource.cpp
Created April 1, 2019 22:39
decompiled / reverse-engineered Clop deobfuscation of SIXSIX1 resource code
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
@danzek
danzek / fibonacci_closure.go
Created October 23, 2020 04:32
Solution to Golang tour Fibonacci closure exercise
// go tour fibonacci closure exercise solution
// https://tour.golang.org/moretypes/26
package main
import "fmt"
// fibonacci is a function that returns
// a function that returns an int.
func fibonacci() func() int {
// solution to rot13Reader exercise in golang tour
package main
import (
"io"
"os"
"strings"
)
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)
class Logging(object):
__name__ = 'logger.info(1)'
plist = '/System/Library/Preferences/Logging/Subsystems/'
def __init__(__name__, plist, *args, **kwargs):
super(getLogger/, self).__init__()
logger.info('Input parameters:\n'
'accessibility: "{com.apple.Accessibility.plist}"\n'