Skip to content

Instantly share code, notes, and snippets.

@alaurie
alaurie / lua
Created March 21, 2025 00:13
Lua Wizard
-- Wizard object
Wizard = {}
Wizard.__index = Wizard
-- Add methods
function Wizard.new(name, stamina, intelligence)
local self = setmetatable({}, Wizard)
self.name = name
self._stamina = stamina
self._intelligence = intelligence
@alaurie
alaurie / decrypt_extract_intunewin.py
Created October 10, 2023 04:40
Updated Intunewin decrypt and extract function
import os
import xml.etree.ElementTree as ET
from Crypto.Cipher import AES
from Crypto.Util.Padding import unpad
import base64
import zipfile
def decrypt_and_extract(metadata_path, encrypted_file_path):
# Read the metadata XML
@alaurie
alaurie / decrypt_intunewin.py
Created October 10, 2023 01:00
Decrypt intunewin content file in python.
import xml.etree.ElementTree as ET
from Crypto.Cipher import AES
from Crypto.Util.Padding import unpad
import base64
# Load the metadata XML
metadata = """<ApplicationInfo xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ToolVersion="1.8.4.0">
<Name>npp.8.5.7.Installer.x64.exe</Name>
<UnencryptedContentSize>4642034</UnencryptedContentSize>
<FileName>IntunePackage.intunewin</FileName>
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
cinst google-chrome-x64
cinst 7zip
cinst notepadplusplus
cinst vlc
cinst powershell4
cinst ccleaner
cinst nodejs
cinst skype