Skip to content

Instantly share code, notes, and snippets.

View GeneralTesler's full-sized avatar

2XXE GeneralTesler

View GitHub Profile
import json,os,boto3
def lambda_handler(event, context):
iid = os.getenv('INSTANCE_ID',None)
pd = os.getenv('PAYLOAD_DIR',None)
pipeline = boto3.client('codepipeline')
job = event['CodePipeline.job']['id']
if iid is None or pd is None:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"ssm:SendCommand",
"codepipeline:PutJobFailureResult",
"codepipeline:PutJobSuccessResult",
@GeneralTesler
GeneralTesler / mssql.ps1
Last active December 15, 2019 03:44
Search MSSQL databases for columns containing keywords using SqlServer PowerShell PSDrive
Import-Module SqlServer
function Get-SQLTablesByKeyword {
<#
Usage:
Get-SQLTablesByKeyword -Computer <hostname>
Example:
Get-SQLTablesByKeyword -Computer sql01.domain.local
Example Output:
Table Database Column
@GeneralTesler
GeneralTesler / ladon.go
Created February 17, 2020 01:44
basic code for using Ladon; taken + merged from readme: https://github.com/ory/ladon
package main
import (
"log"
"github.com/ory/ladon"
manager "github.com/ory/ladon/manager/memory"
)
func main() {
@GeneralTesler
GeneralTesler / boto3_patch.py
Last active May 25, 2020 21:25
Patch botocore to log API calls + parameters
import boto3
import botocore
from botocore.client import BaseClient, Config, ClientMeta
import json
def log_api(self, operation_name, api_params):
meta: ClientMeta = self.meta
print(
json.dumps(
@GeneralTesler
GeneralTesler / boto3_log.py
Created May 25, 2020 21:59
Log AWS API calls using boto3 event system
# see: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/events.html#provide-client-params
import boto3
from botocore.client import Config
from botocore import UNSIGNED
import json
def intercept_params(params, **kwargs):
print(
json.dumps(
@GeneralTesler
GeneralTesler / funi.md
Created August 17, 2020 00:09
Enable subtitles on Funimation web player

Enable subtitles on Funimation web player using VideoJS addRemoteTextTrack

// get the player iframe 
var frame = document.getElementsByTagName("iframe")[0].contentWindow
// get the videojs object inside the iframe 
// fp is the instance of the FunimationPlayer inside the iframe and stores the text track info
//     vtt is usually the first item in the text track list
frame.videojs.getPlayer("brightcove-player").addRemoteTextTrack(frame.fp.currentVideo.source.textTracks[0])
@GeneralTesler
GeneralTesler / filters.txt
Last active June 9, 2021 01:52
ublock filters
! hide annoying google drive modal that prompts to sign in
docs.google.com##.docs-dialog.modal-dialog
docs.google.com##.modal-dialog-bg
! crunchyroll filters
||fwmrm.net/ad/*
||facebook.com/rtb_video/*
||crunchyroll.com/*.mp4
@GeneralTesler
GeneralTesler / refl.cpp
Last active November 6, 2023 12:15
PoC using RtlCreateProcessReflection + MiniDumpWriteDump to dump lsass.exe process memory
#include <Windows.h>
#include <iostream>
#include <DbgHelp.h>
#include <processsnapshot.h>
#include <TlHelp32.h>
#include <processthreadsapi.h>
//process reflection stuff copied from: https://github.com/hasherezade/pe-sieve/blob/master/utils/process_reflection.cpp
//minidump/process searching copied from: https://ired.team/offensive-security/credential-access-and-credential-dumping/dumping-lsass-passwords-without-mimikatz-minidumpwritedump-av-signature-bypass
//compile using: cl.exe refl.cpp /DUNICODE