Skip to content

Instantly share code, notes, and snippets.

View mpgn's full-sized avatar
🕹️
Impose ta chance, serre ton bonheur et va vers ton risque.

mpgn

🕹️
Impose ta chance, serre ton bonheur et va vers ton risque.
View GitHub Profile
@mpgn
mpgn / SubtleCrypto.js
Last active December 31, 2023 05:12
SubtleCrypto javascript example
// exemple based on https://github.com/diafygi/webcrypto-examples#rsa-oaep
function importKey() {
return window.crypto.subtle.importKey(
"jwk", //can be "jwk" or "raw"
{ //this is an example jwk key, "raw" would be an ArrayBuffer
kty: "oct",
k: "Y0zt37HgOx-BY7SQjYVmrqhPkO44Ii2Jcb9yydUDPfE",
alg: "A256GCM",
ext: true,
function Invoke-Mi
<#
#>
[CmdletBinding(DefaultParameterSetName="DumpCreds")]
Param(
[Parameter(Position = 0)]
[String[]]
$ComputerName,
@mpgn
mpgn / node.json
Last active December 23, 2018 20:13
{
"nodes": [
{
"id": "Alice"
},
{
"id": "Bob"
},
{
"id": "Carol"
@mpgn
mpgn / estn.ps1
Last active April 3, 2021 07:16
function test
{
[CmdletBinding()]
Param(
[Parameter(Position = 0, Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[Byte[]]
$PEBytes,

Keybase proof

I hereby claim:

  • I am mpgn on github.
  • I am mpgn (https://keybase.io/mpgn) on keybase.
  • I have a public key ASCx85Zi_arDRdU46fjYE-wNhrgMBMUJUp7OSMNS-CFZLQo

To claim this, I am signing this object:

@mpgn
mpgn / test2.txt
Last active March 17, 2018 17:17
testdfsdf
@mpgn
mpgn / DigitalSignature-Hijack.ps1
Created November 12, 2017 15:53 — forked from netbiosX/DigitalSignature-Hijack.ps1
Hijack Digital Signatures and Bypass Authenticode Hash Validation
<#
DigitalSignatureHijack v1.0
License: GPLv3
Author: @netbiosX
#>
# Validate Digital Signature for PowerShell Scripts
function ValidateSignaturePS
{
$ValidateHashFunc = 'HKLM:\SOFTWARE\Microsoft\Cryptography' +'\OID\EncodingType 0\CryptSIPDllVerifyIndirectData'
%s
127.0.0.1
admin
admin.%s
administration
administration.%s
ads
adserver
alerts
alpha
@mpgn
mpgn / ftpserver.py
Created October 19, 2017 13:18 — forked from scturtle/ftpserver.py
simple ftp server by python
#!/usr/bin/env python2
# coding: utf-8
import os,socket,threading,time
#import traceback
allow_delete = False
local_ip = socket.gethostbyname(socket.gethostname())
local_port = 8888
currdir=os.path.abspath('.')
https://wiki.archlinux.org/index.php/Bluetooth_headset
https://unix.stackexchange.com/questions/258074/error-when-trying-to-connect-to-bluetooth-speaker-org-bluez-error-failed