Skip to content

Instantly share code, notes, and snippets.

@gnachman
gnachman / .emacs
Created June 26, 2020 07:05
Make CSI u mode work in emacs
(unless (display-graphic-p)
(add-hook 'after-make-frame-functions
'(lambda
;; Take advantage of iterm2's CSI u support (https://gitlab.com/gnachman/iterm2/-/issues/8382).
(xterm--init-modify-other-keys)
;; Courtesy https://emacs.stackexchange.com/a/13957, modified per
;; https://gitlab.com/gnachman/iterm2/-/issues/8382#note_365264207
(defun character-apply-modifiers (c &rest modifiers)
"Apply modifiers to the character C.
@wolfadex
wolfadex / elm-portal.js
Last active May 4, 2024 18:05
A Portal web component for Elm
window.customElements.define("elm-portal", class extends HTMLElement {
// Base custom element stuff
constructor() {
super();
this._targetNode = document.createElement('div');
}
connectedCallback() {
document.querySelector(this.getAttribute("data-target-selector")).appendChild(this._targetNode);
}
@alfarom256
alfarom256 / Source.cpp
Last active May 4, 2024 18:05
Thread Execution via NtCreateWorkerFactory
#include <Windows.h>
#include <winternl.h>
#include <stdio.h>
#define WORKER_FACTORY_FULL_ACCESS 0xf00ff
// https://github.com/winsiderss/systeminformer/blob/17fb2e0048f062a04394c4ccd615b611e6ffd45d/phnt/include/ntexapi.h#LL1096C1-L1115C52
typedef enum _WORKERFACTORYINFOCLASS
{
WorkerFactoryTimeout, // LARGE_INTEGER
@RistBS
RistBS / shellcode_exec_workerfactory.c
Last active May 4, 2024 18:05
Just another shellcode execution technique :)
#include <Windows.h>
#include <stdio.h>
#define PRINTDEBUG(fmt, ...) printf(fmt "\n", ##__VA_ARGS__)
#define NT_SUCCESS(Status) ((NTSTATUS)(Status) >= 0)
#define WORKER_FACTORY_FULL_ACCESS 0xf00ff
typedef struct _UNICODE_STRING {
@enigma0x3
enigma0x3 / Backdoor-Minimalist.sct
Last active May 4, 2024 18:03
Execute Remote Scripts Via regsvr32.exe - Referred to As "squiblydoo" Please use this reference...
<?XML version="1.0"?>
<scriptlet>
<registration
progid="PoC"
classid="{F0001111-0000-0000-0000-0000FEEDACDC}" >
<!-- Proof Of Concept - Casey Smith @subTee -->
<!-- License: BSD3-Clause -->
<script language="JScript">
<![CDATA[
@MrTomerLevi
MrTomerLevi / lambda_layers.Jenkinsfile
Last active May 4, 2024 18:02
A Jenkins job file to create aws lambda layers
properties([
parameters ([
choice(choices: ['dev', 'prod'].join("\n"), description: 'What AWS account to use?', name: 'aws_account'),
string(defaultValue: "", description: 'requirements.txt git repo', name: 'requirements_git_repo'),
string(defaultValue: "", description: 'requirements.txt git path', name: 'requirements_git_path'),
string(defaultValue: "", description: 'Layer human readable name, e.g. bijo-tools', name: 'layer_human_name'),
string(defaultValue: "", description: 'Layer description', name: 'layer_description'),
string(defaultValue: "my-s3-bucket", description: 's3 bucket for packaging', name: 's3_bucket')
])
@miguelmota
miguelmota / auth.json
Created February 21, 2019 03:08
AWS Cognito Identity authenticate using cURL
{
"AuthParameters" : {
"USERNAME" : "alice@example.com",
"PASSWORD" : "mysecret"
},
"AuthFlow" : "USER_PASSWORD_AUTH",
"ClientId" : "9..............."
}
@Arutyun2312
Arutyun2312 / CustomGeometryReader.swift
Last active May 4, 2024 17:55
Custom Geometry Reader
//
// CustomGeometryReader.swift
//
//
// Created by Arutyun Enfendzhyan on 10.01.22.
//
import SwiftUI
struct CustomGeometryReader: View {
@juanbrujo
juanbrujo / PlayStationBIOSFilesNAEUJP.md
Last active May 4, 2024 17:54
Files for PlayStation BIOS Files NA-EU-JP