Skip to content

Instantly share code, notes, and snippets.

View ivankravchenko's full-sized avatar
🐌
moving fast

Ivan Kravchenko ivankravchenko

🐌
moving fast
View GitHub Profile
@jakubfiala
jakubfiala / custom_console.js
Created February 1, 2016 14:05
this small script intercepts the standard console methods and provides a way of accessing their messages, as well as stack traces, which is really cool. it formats the stack traces for popular browsers
//==========================================================
// CUSTOM JAVASCRIPT CONSOLE
// built by jakub fiala
//
// this small script intercepts the standard console methods
// and provides a way of accessing their messages,
// as well as stack traces, which is really cool.
// it formats the stack traces for popular browsers
//
// contributions welcome!
@thejh
thejh / bettersystem.c
Last active December 18, 2015 15:25
ULTIMATE VULN FIX
#define _GNU_SOURCE
#include <dlfcn.h>
#include <string.h>
int system(const char *cmd) {
static int (*realsystem)(const char *);
if (!realsystem) realsystem = dlsym(RTLD_NEXT, "system");
if (strchr(cmd, ';') || strchr(cmd, '`') || strstr(cmd, "&&") || strstr(cmd, "../")) {
return 1;
}
@ivankravchenko
ivankravchenko / edge
Created November 29, 2013 16:57
handy hipache provision script installation: curl https://gist.github.com/krava/7708703/raw/3c4828c832ec63c66575339f0d1cd7647b0cc62c/edge > /sbin/edge && chmod u+x /sbin/edge
#!/bin/bash
COMMAND=$1
HOST=$2
case $COMMAND in
add)
shift;shift
if [[ ! $HOST ]]; then
echo No host specified.