Skip to content

Instantly share code, notes, and snippets.

@joshdabosh
joshdabosh / solve.c
Last active November 20, 2023 22:00
Cloudinspect (Hack.lu 2021) escape
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <stdint.h>
#include <assert.h>
#include <unistd.h>
#include <stdarg.h>
#define CLOUDINSPECT_MMIO_OFFSET_CMD 0x78
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@joshdabosh
joshdabosh / change_steam_badge.js
Created April 27, 2021 15:01
Sets steam badge
function change(token, v){
// @token is the steam access token. you can send a dummy change badge request to find this
// @v is protobuf encoded. ex: EAF=, or {"2":1}
// if you want to have no steam badge shown, pass it as "EAA=", which decodes to {"2":0}
let f = new FormData();
f.append("input_protobuf_encoded", v);
return fetch("https://api.steampowered.com/IPlayerService/SetFavoriteBadge/v1?access_token="+token, {
method:"POST",
@joshdabosh
joshdabosh / dockeruptodate.sh
Last active June 30, 2020 22:59
bring docker container up to date
apt-get update && apt-get install -qy nano python-pip python-dev python3-dev python3-pip git libssl-dev libffi-dev build-essential gdb wget tmux vim && wget -q -O- https://github.com/hugsy/gef/raw/master/scripts/gef.sh | sh && export LC_CTYPE=C.UTF-8 && python2 -m pip install --upgrade pip && python2 -m pip install --upgrade pwntools
@joshdabosh
joshdabosh / blurry.css
Last active May 15, 2020 01:18
Discord theme on windows
/**
* @name Glasscord Example Theme
* @description This theme showcases Glasscord's features: glassy Discord!
* @author AryToNeX
* @version 0.1
* @source https://github.com/AryToNeX/Glasscord
* @invite SftnByN
* @patreon https://patreon.com/arytonex
* @donate https://ko-fi.com/arytonex
* @authorLink http://arytonex.pw
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.common.keys import Keys
from selenium import webdriver
import requests
def is_prime(n):
if n == 1:
return False
for i in range(2, int(n**0.5)+1):
@joshdabosh
joshdabosh / trebuchet_data.py
Last active February 25, 2020 05:29
trebuchets :\
# group 10
import matplotlib.pyplot as plt
import numpy as np
avg = lambda x: sum(x)/len(x)
prune = lambda x: [i for i in x if i != None]
def err(x,y):
@joshdabosh
joshdabosh / code.py
Created February 14, 2020 22:53
MCPS Schedules
__all__ = ['code']
# Don't look below, you will not understand this Python code :) I don't.
from js2py.pyjs import *
# setting scope
var = Scope( JS_BUILTINS )
set_global_object(var)
# Code follows:
@joshdabosh
joshdabosh / ws_extract.py
Created February 2, 2020 19:11
extract wireshark keyboard stuff
# taken from a writeup
from __future__ import print_function
import json
with open("dissections.json") as f:
data = json.load(f)
m = {
0:"",2:"PostFail",4:"a",5:"b",6:"c",7:"d",8:"e",9:"f",10:"g",11:"h",12:"i",13:"j",14:"k",15:"l",16:"m",17:"n",18:"o",19:"p",20:"q",21:"r",22:"s",23:"t",24:"u",25:"v",26:"w",27:"x",28:"y",29:"z",30:"1",31:"2",32:"3",33:"4",34:"5",35:"6",36:"7",37:"8",38:"9",39:"0",40:"\n",41:"esc",42:"del",43:"\t",44:" ",45:"-",47:"[",48:"]",56:"/",57:"CapsLock",79:"RightArrow",80:"LetfArrow"
}
M= {
@joshdabosh
joshdabosh / discord_image_downloader.py
Created January 3, 2020 00:44
Downloads any images sent over Discord. Technically a violation of Discord ToS. Use carefully.
import time
import discord
import asyncio
import json
import os
import re
import requests
info = {"email":"REDACT",
"password":"REDACT"}