Skip to content

Instantly share code, notes, and snippets.

@EvanMcBroom
EvanMcBroom / encrypting-strings-at-compile-time.md
Last active October 25, 2025 04:54
Encrypting Strings at Compile Time

Encrypting Strings at Compile Time

Thank you to SpecterOps for supporting this research and to Duane and Matt for proofreading and editing! Crossposted on the SpecterOps Blog.

TLDR: You may use this header file for reliable compile time string encryption without needing any additional dependencies.

Programmers of DRM software, security products, or other sensitive code bases are commonly required to minimize the amount of human readable strings in binary output files. The goal of the minimization is to hinder others from reverse engineering their proprietary technology.

Common approaches that are taken to meet this requirement often add an additional maintenance burden to the developer and are prone to error. These approaches will be presented along with t

72,73c72,73
< if [ -d `cd "/${ISO_FILENAME%/*}" /dev/null 2>&1; echo "${PWD}"` ]; then
< ISO_FILENAME=`cd "/${ISO_FILENAME%/*}" /dev/null 2>&1; echo "${PWD}/${ISO_FILENAME##*/}"`
---
> if [ -d `cd "/${ISO_FILENAME%/*}" >/dev/null 2>&1; echo "${PWD}"` ]; then
> ISO_FILENAME=`cd "/${ISO_FILENAME%/*}" >/dev/null 2>&1; echo "${PWD}/${ISO_FILENAME##*/}"`
113c113
< "$MKISOFS" -iso-level 4 -l -r -J -joliet-long -D -V "${VOLUME_ID}" \
---
> "$MKISOFS" -iso-level 3 -l -r -J -joliet-long -D -V "${VOLUME_ID}" \
@JamoCA
JamoCA / CSV_To_XLSX.vbs
Created December 9, 2015 17:25
Visual Basic Script to convert CSV file to XLSX. (Excel is required to be installed.)
'======================================
'Visual Basic Script to convert CSV file to XLSX. (Excel is required to be installed.)
'http://stackoverflow.com/a/31606893/693068
'Further customization ideas and information regarding permissions at:
'http://jeffkinzer.blogspot.com/2010/06/vbscript-to-convert-csv-to-xlsx.html
'
'FORMAT: CSCRIPT CSV_To_XLSX.vbs "c:\base\data.csv"
'(Note: CSCRIPT is required to run VBS file using the command line.)
'======================================
@Robbert
Robbert / message-id.php
Created February 16, 2013 17:51
Message-ID generator in PHP for mail headers.
<?php
/**
* @see http://www.jwz.org/doc/mid.html
*/
function generateMessageID()
{
return sprintf(
"<%s.%s@%s>",
base_convert(microtime(), 10, 36),