Skip to content

Instantly share code, notes, and snippets.

@twodayslate
twodayslate / tornado_sqlalchemy_auto_api.py
Created Jan 10, 2020
A tornado server that creates an API and schema output automatically based on a SQLAlchemy model
View tornado_sqlalchemy_auto_api.py
#!/usr/bin/env python3
# vim: set fileencoding=utf8 :
import tornado.ioloop
from tornado.options import options, define
from tornado_sqlalchemy import SQLAlchemy
from sqlalchemy import create_engine, Column, Integer, String
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
View gist:44fbecb41bdfbd40bb2a832180f56ff1
/*
* Dodgy POC for my CVE-2018-4150 bug - @cmwdotme
*
* Bad locking lets you use BIOCSDLT and race BIOCSBLEN to increase the length without
* increasing/reallocating the buffer.. which lets you overflow ;) Should work up to iOS 11.2.6
*
*/
#include <fcntl.h>
#include <pthread.h>
@twodayslate
twodayslate / jbme.html
Last active May 11, 2018
jbme 9.3.3 qwertyoruiop.com
View jbme.html
<!--
This is licensed under the Anyone But Stefan Esser license.
---
PLZ NO RCE.
sorry 4 indentation but i was using nano lmao
View ShimmerTextView.swift
//
// ShinyTextView.swift
//
import Foundation
import Cocoa
class ShimmerTextView : NSTextView {
// define your colors and locations
View iOS 9.3.2 "guide"
How to jailbreak iOS 9.3.2
This document describes a theoretical chain of vulnerabilities
which could theoretically be exploited by an experienced security
researcher in order to theoretically preform a tethered jailbreak
of iOS 9.3.2, install Cydia, obtain root access. After a reboot,
any devices on which this method are applied will need to be
subject to a restore in order to restore functionality, thus
updating said devices to the latest version of iOS. For this
reason, it is highly not recommended that this guide be followed
View iOS 9.3.2 RCE for AArch64 devices
<!---
KimJongCracks WE OUT HERE // iOS 9.3.2 RCE for AArch64 devices // no infoleaks // no kernel exploit / sb bypass // crappiest exploit ever
Quick and dirty exploit. Some stuff has been removed, so it probably won't work 1:1. The frame src for instance is not included, but it's just slightly modified from WK's testcase for heapPopMin.
Do your own homework.
---!>
View GasGauge - qwertyoruiop
/*
GasGauge race condition yielding double free
(c) 2016 qwertyoruiop
greetz: banty (this one is for you!) / filippobiga / windknown / morpheus / cturt / laughing_mantis / p0sixninja / osxreverser / trimo / beist / sn0w
by Kim Jong Cracks Research (please CVE it to them!)
View depiction.php
<!-- by @bensge -->
<!DOCTYPE html>
<html lang="en" class="cydia depiction">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=0">
<link rel="stylesheet" href="//cdn.hbang.ws/css/ios7.css">
</head>
<body>
View repofresh.sh
#/bin/bash
echo "RepoFresh by @bensge"
echo "Finding old packages files and deleting them"
if [[ -f Packages.bz2 ]];
then rm -rf "Packages.bz2";
fi
if [[ -f Packages ]];
then rm -rf "Packages";
fi
echo "finding packages and integrating them in packages file"
View repoupdate.sh
#!/bin/bash
# Created by @bensge
cd DEBs
file=$(ls -t *.deb | head -1)
ssh user@server 'find /a/b/c/repofiles/ -name "*.deb" -exec rm -rf {} \;'
scp $file user@server:/a/b/c/repofiles/
ssh user@server 'cd /a/b/c/repofiles/ && ./repofresh'
var=$(date +"%B_%d_%kh_%Mmin")
echo $1 >> "$var.txt"