Skip to content

Instantly share code, notes, and snippets.

View DarkCoderSc's full-sized avatar

Jean-Pierre LESUEUR (Microsoft MVP) DarkCoderSc

View GitHub Profile
@DarkCoderSc
DarkCoderSc / JavaAppHdpi.sh
Last active February 15, 2023 08:40
Scale JAVA Application on Linux for HDPi support (Example for Burp Suite)
`sudo sh -c 'echo "JAVA_TOOL_OPTIONS=-Dsun.java2d.uiScale=2" >> /etc/environment'`
# Reboot machine and voila!
@DarkCoderSc
DarkCoderSc / ExtractStrings.py
Last active November 21, 2022 13:37
Extract ASCII and/or UNICODE strings from files.
#!/usr/bin/env python3
# Jean-Pierre LESUEUR (@DarkCoderSc)
# https://keybase.io/phrozen
import argparse
import mmap
from itertools import chain

Keybase proof

I hereby claim:

  • I am darkcodersc on github.
  • I am phrozen (https://keybase.io/phrozen) on keybase.
  • I have a public key whose fingerprint is EF3C 6EB6 8C53 6324 C9C3 E612 B99D BFFC A25A A3D1

To claim this, I am signing this object:

using System;
using System.IO;
void timeStomp(String targetFile)
{
targetFile = Path.GetFullPath(targetFile);
if (!File.Exists(targetFile))
{
throw new FileNotFoundException(String.Format("File \"{0}\" does not exists.", targetFile));
// Support both x86-32 and x86-64
program Unprotect_RunPE;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.Classes,
(*
Example of DLL Code to test DLL Injection:
------------------------------------------
BOF>>
library UnprotectTestDLL;
uses
WinApi.Windows,
(*
Example of DLL Code to test DLL Injection:
------------------------------------------
BOF>>
library UnprotectTestDLL;
uses
WinApi.Windows,
using System;
using System.Runtime.InteropServices;
[DllImport("ntdll.dll", SetLastError = true)]
static extern int NtQueryInformationProcess(
IntPtr processHandle,
int processInformationClass,
ref IntPtr processInformation,
uint processInformationLength,
ref IntPtr returnLength
program NtQueryProcessInformation;
{$APPTYPE CONSOLE}
{$R *.res}
uses
Winapi.Windows,
System.SysUtils;
{
32Bit Example of File Melting
}
program Melt;
{$APPTYPE CONSOLE}
{$R *.res}