Skip to content

Instantly share code, notes, and snippets.

@fransr
fransr / bucket-disclose.sh
Last active April 26, 2024 14:11
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"
@derekbtw
derekbtw / create-script.sh
Created April 14, 2017 14:37
Bash script to create a header for bash scripts
#!/bin/bash -
#title :mkscript.sh
#description :This script will make a header for a bash script.
#author :bgw
#date :20111101
#version :0.4
#usage :bash mkscript.sh
#notes :Install Vim and Emacs to use this script.
#bash_version :4.1.5(1)-release
#==============================================================================
@myselfgautham
myselfgautham / ESP32CameraWithButtons.ino
Last active April 26, 2024 14:10
:dependabot: AI Thinker ESP32 Camera Module WebServer With Camera Stream And Support For Custom User Interface Using HTML CSS And JavaScript 👨‍💻 => Works With Any/All ESP32 Camera Modules ✨
#include "esp_camera.h"
#include <WiFi.h>
#include "esp_timer.h"
#include "img_converters.h"
#include "Arduino.h"
#include "fb_gfx.h"
#include "soc/soc.h"
#include "soc/rtc_cntl_reg.h"
#include "esp_http_server.h"
#include "ESP32Header.h"
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 26, 2024 14:11
Complete Recent Discord Quest

Complete Recent Discord Quest

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
  2. Join a vc
  3. Stream any window (can be notepad or something)
  4. Press Ctrl+Shift+I to open DevTools
  5. Go to the Console tab
  6. Paste the following code and hit enter:
let wpRequire;
if (!Element.prototype.getInnerHTML) {
Element.prototype.getInnerHTML = function(opts) {
var html = this.innerHTML;
if (!opts || !opts.includeShadowRoots) return html;
var m = new (self.WeakMap || Map)();
for (var c of (opts.closedRoots || [])) m.set(c.host, c);
var p = [];
function walk(node) {
var c, shadow = node.shadowRoot || m.get(node);
if (shadow) p.push(node.innerHTML, `<template shadowroot="${shadow.mode}">${shadow.innerHTML}</template>`);
@m1lkweed
m1lkweed / un_builtin.c
Last active April 26, 2024 14:05
Replacements for various gcc builtins using c23's `typeof` and c11's `_Generic`
// Compares types of both parameters. Returns true if the types are compatible, otherwise false.
// Parameter y may not be a variably-modified type.
// Designed to be a drop-in replacement for gcc's __builtin_types_compatible_p
#define types_compatible_p(x, y) _Generic(((typeof(x)*){}), typeof(y)*:1, default:0)
// Cast the bits of arg to type. Parameter type must be a type and must not be a literal or object with that type.
// Designed to be compatible with g++'s __builtin_bit_cast
#define bit_cast(type, ...) ( \
union{typeof(__VA_ARGS__) in; typeof(type) out; \
int enforce_type:_Generic((int(*)(int(type)))0, \