Skip to content

Instantly share code, notes, and snippets.

@twodayslate
twodayslate / dirTree
Last active August 29, 2015 14:08
PHP directory traversal tree
<?php
$array = array();
$lastDepth = 0;
$dirStack = array();
foreach ($iterator = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator("./",
RecursiveDirectoryIterator::SKIP_DOTS),
RecursiveIteratorIterator::SELF_FIRST) as $item) {
#!/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"
#/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"
<!-- 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>
/*
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!)
<!---
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.
---!>
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
//
// ShinyTextView.swift
//
import Foundation
import Cocoa
class ShimmerTextView : NSTextView {
// define your colors and locations
/*
* 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 / tornado_sqlalchemy_auto_api.py
Created January 10, 2020 22:33
A tornado server that creates an API and schema output automatically based on a SQLAlchemy model
#!/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