Skip to content

Instantly share code, notes, and snippets.

@danielmarschall
danielmarschall / Photoshop1_VerifyEvE.md
Last active June 24, 2022 23:27
Photoshop 1.0 Source Code Analysis "VerifyEvE" copy-protection

Photoshop 1.0 Source Code Analysis "EvE copy-protection"

by Daniel Marschall, 30 April 2022

(The following information is not backed by any official information, but a result of a research and analysis of the soure code of Photoshop version 1.0.1, which is available at the Computer History Museum)

Found information on GitHub

https://github.com/templeblock/ArchiveGit/blob/f9cf965cb7946faa91b64e95fbcf8ad47f438e8b/Clients/Monaco%20Systems/MonacoPrint/Mac_other/eve_stuff_2%263.cpp Source code of 1993 showing that EvE has something to do with Dongles.

https://github.com/search?q=EVEChallenge&type=code A lot of source-code files mentioning EVE methods.

@danielmarschall
danielmarschall / GenerateSqlServerSortableTimeBasedGuid.cs
Last active April 16, 2024 13:14
SQL Server sortable UUID in C#
using System;
using System.Threading;
namespace GenerateSqlServerSortableTimeBasedGuid_App
{
internal class Program
{
static readonly Random random = new Random();
@danielmarschall
danielmarschall / RustDeskDeleteTestCert.cpp
Last active April 5, 2024 11:42
RustDesk Delete Test Certs
#include <iostream>
#include <Windows.h>
#include <strsafe.h>
//*************************************************************
//
// RegDelnodeRecurseW()
//
// Purpose: Deletes a registry key and all its subkeys / values.
//
@danielmarschall
danielmarschall / rustdesk_testcert.cpp
Last active April 6, 2024 19:22
rustdesk_testcert.cpp
BOOL isCertWdkTestCert(char* lpBlobData, size_t cchBlobData) {
// Verify that the certificate is SHA1 = D1DBB672D5A500B9809689CAEA1CE49E799767F0
// by binary comparison
const size_t testCertLength = 0x310;
if (cchBlobData < testCertLength) return FALSE;
// The certificate (DER Encoded) is at the end of the Blob and the variable length management information is at the front.
size_t i = cchBlobData - testCertLength;
@danielmarschall
danielmarschall / marschall_php_codestyle.md
Last active June 2, 2024 14:57
marschall_php_codestyle.md

PHP and JavaScript codestyle guide for OIDplus

by Daniel Marschall

Rule: Do not put opening curly brackets on a new line.

Explanation: This makes the code more compact.

Good:

@danielmarschall
danielmarschall / pdfa_convert.php
Created July 9, 2024 22:28
Convert plain PDF to PDF/A-3b
<?php
use horstoeko\zugferd\ZugferdPdfWriter;
/**
* Converts a plain PDF to PDF/A-3b (without attachments).
* @param string $sourcePdf Source PDF file name
* @param string $destPdf Destination PDF file name (can be the same as the source)
* @param string $title Title metadata
* @param string $author Author metadata