Skip to content

Instantly share code, notes, and snippets.

View lazerl0rd's full-sized avatar
🌐
Handing DNS so you don't have to.

Diab Neiroukh lazerl0rd

🌐
Handing DNS so you don't have to.
View GitHub Profile
@wilbowma
wilbowma / jail.pl
Last active August 1, 2022 11:16
A perl script to create nginx chroot in arch linux.
#a/usr/bin/perl
# This script was hastily cobbled together for my own use. It can
# probably break your system. Use at your own risk.
$JAIL = "/srv/http";
$USER = "http";
$GROUP = "http";
$WWW_DIR = "www";
sub run{
@raspi
raspi / enable-all-advanced-power-settings.ps1
Last active May 5, 2024 22:24
Enable all advanced power settings in Windows.
# List all possible power config GUIDs in Windows
# Run: this-script.ps1 | Out-File powercfg.ps1
# Then edit and run powercfg.ps1
# (c) Pekka "raspi" Järvinen 2017
$powerSettingTable = Get-WmiObject -Namespace root\cimv2\power -Class Win32_PowerSetting
$powerSettingInSubgroubTable = Get-WmiObject -Namespace root\cimv2\power -Class Win32_PowerSettingInSubgroup
Get-WmiObject -Namespace root\cimv2\power -Class Win32_PowerSettingCapabilities | ForEach-Object {
$tmp = $_.ManagedElement
@raspi
raspi / windows-advanced-power-settings-to-markdown.ps1
Created June 14, 2017 22:10
List Windows advanced power settings as MarkDown
# List Windows advanced power settings as MarkDown
# Use:
# this-script.ps1 | Out-File power.md
# Use powercfg to show hidden settings:
# powercfg -attributes <Group GUID> <GUID> -ATTRIB_HIDE
# example:
# powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 06cadf0e-64ed-448a-8927-ce7bf90eb35d -ATTRIB_HIDE
# (c) Pekka "raspi" Järvinen 2017-
$powerSettingSubgroubTable = Get-WmiObject -Namespace root\cimv2\power -Class Win32_PowerSettingSubgroup | Where-Object {$_.ElementName -ne $null}
@marcan
marcan / bloom.py
Last active February 29, 2024 19:55
Simple Bloom filter implementation in Python 3 (for use with the HIBP password list)
#!/usr/bin/python3
#
# Simple Bloom filter implementation in Python 3
# Copyright 2017 Hector Martin "marcan" <marcan@marcan.st>
# Licensed under the terms of the MIT license
#
# Written to be used with the Have I been pwned? password list:
# https://haveibeenpwned.com/passwords
#
# Download the pre-computed filter here (968MB, k=11, false positive p=0.0005):
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active May 30, 2024 12:19
crack activate Office on mac with license file
@marcan
marcan / asm.py
Created December 22, 2018 10:07
Python module to assemble snippets of code
#!/usr/bin/env python
import os, tempfile, shutil, subprocess
class AsmException(Exception):
pass
class BaseAsm(object):
def __init__(self, source, addr = 0):
self.source = source
self._tmp = tempfile.mkdtemp() + os.sep
@marcan
marcan / m1cat.c
Last active October 26, 2023 15:42
m1cat: a PoC for the M1RACLES covert channel vulnerability in the Apple M1
/*
* m1cat: a proof of concept for the M1RACLES vulnerability in the Apple M1.
*
* This program implements a covert channel that can be used to transmit data
* between two processes when run on the Apple Silicon "M1" CPUs.
*
* The channel is slightly lossy due to (presumably) the scheduler sometimes
* scheduling us on the wrong CPU cluster, so this PoC sends every byte twice
* together with some metadata/framing bits, which is usually good enough.
* A better approach would be to use proper FEC or something like that.
@seyoon20087
seyoon20087 / Activate Office 2019 for macOS VoL.md
Last active August 18, 2022 07:43 — forked from zthxxx/Activate Office 2019 for macOS VoL.md
Activate office on mac with license file

Activate MS Office 2019/2016 for macOS - Microsoft_Office_2019_VL_Serializer

Office 2019 above

Note that Office2019 DO NOT support activate via simple copy/paste plist license file which is the simplest way to activate Office 2016. Fortunately, you can also use the VL Serializer tool, just install Office 2019 and Serializer, then run Serializer to activate.

Ref

The Freenode resignation FAQ, or: "what the fuck is going on?"

IMPORTANT NOTE:

It's come to my attention that some people have been spamming issue trackers with a link to this gist. While it's a good idea to inform people of the situation in principle, please do not do this. By all means spread the word in the communities that you are a part of, after verifying that they are not aware yet, but unsolicited spam is not helpful. It will just frustrate people.

Update 3 (May 24, 2021)

A number of things have happened since the last update.

@mavaddat
mavaddat / Invoke-DownloadAppxPackage.ps1
Last active October 12, 2023 17:00
This correctly downloads neutral and x64 packages but untested for arm and 32bit systems. The path must point to a folder.
# Usage (for one URI):
<#
Import-Module -Name Invoke-DownloadAppxPackage.ps1
$URI = 'https://www.microsoft.com/store/productId/9P6RC76MSMMJ' # From Windows Store 'share'
if( Get-Command -Name Get-AppxPackageDownload -CommandType Function ) {
Get-AppxPackageDownload -Uri $URI -Path $env:TEMP # Use -Force to skip confirmation
} else {
Write-Host 'Get-AppxPackageDownload function not found'
}