Skip to content

Instantly share code, notes, and snippets.

@odzhan
odzhan / runscript.c
Last active November 30, 2023 02:30
In-memory execution of VBScript, JavaScript or JScript
/**
BSD 3-Clause License
Copyright (c) 2019, Odzhan. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
@odzhan
odzhan / enum.cpp
Created July 7, 2019 16:56
Display Active Script Host Engines
/**
BSD 3-Clause License
Copyright (c) 2019, Odzhan. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
@odzhan
odzhan / load_xml.cpp
Last active October 18, 2020 03:54
Loading XSL from memory.
/**
BSD 3-Clause License
Copyright (c) 2019, TheWover, Odzhan. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
@odzhan
odzhan / amsiscan.c
Last active October 18, 2020 03:53
Patching AMSI
/**
BSD 3-Clause License
Copyright (c) 2019 Odzhan. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
@odzhan
odzhan / wldp.c
Last active October 5, 2024 16:11
Patching WLDP
/**
BSD 3-Clause License
Copyright (c) 2019 Odzhan. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
// naive implementation of ecdh using secp192r1
// odzhan
import java.math.*;
import java.security.spec.ECPoint;
import java.security.*;
public class ECDH {
@odzhan
odzhan / base64_encode.c
Last active October 18, 2020 03:53
Compact implementation of Base64 encoding in C
/**
BSD 3-Clause License
Copyright (c) 2019 Odzhan. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
@odzhan
odzhan / hash_file.c
Last active October 18, 2020 03:53
Derive a cryptographic hash from file using Windows Crypto API
/**
BSD 3-Clause License
Copyright (c) 2016 Odzhan. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
// DYNAMIC HUFFMAN ENCODING
// copyright (c) 1998 by Z0MBiE/29A
// 28-12-98 15:10:33
//
// 26-11-2019 - added code to test compression ratio.
// typically ~20% for a 1MB EXE file
// odzhan
//
#include <stdint.h>
#include <stdio.h>
@odzhan
odzhan / xpress.c
Last active February 18, 2024 20:57
Xpress Compression Utility
/**
BSD 3-Clause License
Copyright (c) 2019 Odzhan. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.